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 |
|---|---|---|---|---|---|---|
//
// SMViewController.h
// SMPageControl
//
// Created by Jerry Jones on 10/13/12.
// Copyright (c) 2012 Spaceman Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SMPageControl.h"
@interface SMViewController : UIViewController
@property (nonatomic, weak) IBOutlet UIScrollView *scrollview;
@propert... | //
// SMViewController.h
// SMPageControl
//
// Created by Jerry Jones on 10/13/12.
// Copyright (c) 2012 Spaceman Labs. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SMPageControl.h"
@interface SMViewController : UIViewController
@property (nonatomic, readonly) IBOutlet UIScrollView *scrollview;
@pro... | ---
+++
@@ -11,15 +11,15 @@
@interface SMViewController : UIViewController
-@property (nonatomic, readonly) IBOutlet UIScrollView *scrollview;
-@property (nonatomic, readonly) IBOutlet UIPageControl *pageControl;
-@property (nonatomic, readonly) IBOutlet SMPageControl *spacePageControl1;
-@property (nonatomic, r... | Change IBOutlet attributes from readonly to weak
This fixes the warning "readonly IBOutlet property when auto-synthesized may not work correctly with 'nib' loader".
Also, weak is better than assign when using weak references to objects, because weak prevents dangling pointers.
| mit | doanhkisi/SMPageControl,CorzFree/SMPageControl,Spaceman-Labs/SMPageControl,HelloWilliam/SMPageControl | c0cf830770eba3893b0c61317d8772f9e837ddbf |
/*
**
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#ifndef _QIMESSAGING_OBJECT_H_
#define _QIMESSAGING_OBJECT_H_
#include <qimessaging/c/api_c.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct qi_object_t_s {} qi_object_t;
//forward de... | /*
**
** Author(s):
** - Cedric GESTES <gestes@aldebaran-robotics.com>
**
** Copyright (C) 2012 Aldebaran Robotics
*/
#ifndef _QIMESSAGING_OBJECT_H_
#define _QIMESSAGING_OBJECT_H_
#include <qimessaging/c/api_c.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct qi_object_t_s {} qi_object_t;
//forward de... | ---
+++
@@ -23,7 +23,7 @@
typedef struct qi_future_t_s qi_future_t;
- QIMESSAGING_API typedef void (*qi_object_method_t)(const char *complete_signature, qi_message_t *msg, qi_message_t *ret, void *data);
+ typedef void (*qi_object_method_t)(const char *complete_signature, qi_message_t *msg, qi_message_t *re... | Remove unnecessary API export on typedef
Change-Id: Id9b225ad5a7a645763f4377c7f949e9c9bd4f890
Reviewed-on: http://gerrit.aldebaran.lan:8080/4588
Reviewed-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
Tested-by: llec <42f1a1c02cacc0f5b0188f0127ea77bedfdcf21a@aldebaran-robotics.com>
| bsd-3-clause | bsautron/libqi,aldebaran/libqi,aldebaran/libqi,aldebaran/libqi-java,aldebaran/libqi-java,aldebaran/libqi,aldebaran/libqi-java,vbarbaresi/libqi | 79278824c6433ef6634532a1b5192961acc248a4 |
#include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (t... | #include "parser.h"
#include "ast.h"
#include "tests.h"
void test_parse_number();
int main() {
test_parse_number();
return 0;
}
struct token *make_token(enum token_type tk_type, char* str, double dbl,
int number) {
struct token *tk = malloc(sizeof(struct token));
tk->type = tk_type;
if (t... | ---
+++
@@ -16,9 +16,9 @@
if (tk_type == tok_dbl) {
tk->value.dbl = dbl;
} else if (tk_type == tok_number) {
- tk->value.number = number;
+ tk->value.num = number;
} else {
- tk->value.string = string;
+ tk->value.string = str;
}
return tk;
} | Fix typo in parser tests
| mit | iankronquist/yaz,iankronquist/yaz | bab54887404e9f7d4fc68ce2e41ad6bae8035f55 |
// For conditions of distribution and use, see copyright notice in license.txt
#ifndef incl_CoreDefines_h
#define incl_CoreDefines_h
// useful defines
#define SAFE_DELETE(p) { delete p; p=0; }
#define SAFE_DELETE_ARRAY(p) { delete [] p; p=0; }
#define NUMELEMS(x) (sizeof(x)/sizeof(x[0]))
/// Use this template to d... | // For conditions of distribution and use, see copyright notice in license.txt
#ifndef incl_CoreDefines_h
#define incl_CoreDefines_h
// useful defines
#define SAFE_DELETE(p) { delete p; p=0; }
#define SAFE_DELETE_ARRAY(p) { delete [] p; p=0; }
#define NUMELEMS(x) (sizeof(x)/sizeof(x[0]))
/// Use this template to d... | ---
+++
@@ -18,7 +18,7 @@
template<typename Dst, typename Src>
inline Dst checked_static_cast(Src src)
{
- assert(dynamic_cast<Dst>(src) != 0);
+ assert(src == 0 || dynamic_cast<Dst>(src) != 0);
return static_cast<Dst>(src);
}
| Fix checked_static_cast to allow null pointers.
| apache-2.0 | antont/tundra,jesterKing/naali,antont/tundra,antont/tundra,realXtend/tundra,pharos3d/tundra,jesterKing/naali,jesterKing/naali,AlphaStaxLLC/tundra,antont/tundra,BogusCurry/tundra,BogusCurry/tundra,BogusCurry/tundra,antont/tundra,realXtend/tundra,jesterKing/naali,AlphaStaxLLC/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,Bo... | a726bc24664b69fd2f5899dab2a6155d3bd6b963 |
/* chardata.h
Interface to some helper routines used to accumulate and check text
and attribute content.
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of c... | /* chardata.h
*
*
*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1
#ifndef XML_VERSION
#include "expat.h" /* need XML_Char */
#endif
typedef struct {
int count; /* # of chars, < 0 if not set */
XML_Char data[1024];
} CharData;
void CharData_Init(CharData... | ---
+++
@@ -1,7 +1,8 @@
-/* chardata.h
- *
- *
- */
+/* chardata.h
+
+ Interface to some helper routines used to accumulate and check text
+ and attribute content.
+*/
#ifndef XML_CHARDATA_H
#define XML_CHARDATA_H 1 | Add a small comment to tell what this is.
| mit | tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,libexpat/libexpat,libexpat/libexpat,libexpat/libexpat,tiran/expat,tiran/expat | 219908bec636b75ca0c002af697d801ecbcee418 |
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Python.h>
#include <pygobject.h>
#include <pango/pangocairo.h>
#include <pycairo.h>
void pycluttercairo_register_classes (PyObject *d);
void pycluttercairo_add_constants (PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pycluttercairo_functi... | #ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <Python.h>
#include <pygobject.h>
#include <pango/pangocairo.h>
#include <pycairo.h>
void pycluttercairo_register_classes (PyObject *d);
void pycluttercairo_add_constants (PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pycluttercairo_functi... | ---
+++
@@ -11,7 +11,10 @@
void pycluttercairo_add_constants (PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pycluttercairo_functions[];
+
+#if 0
extern PyTypeObject PyClutterCairoContext_Type;
+#endif
Pycairo_CAPI_t *Pycairo_CAPI;
@@ -40,8 +43,14 @@
pycluttercairo_register_classes ... | Comment out the code to subclass CairoContext
We don't have any method on the cairo_t returned by ClutterCairo::create()
at the moment, so we don't need the machinery to register it as our own
subclass type. I prefer to leave it in place, so that we can use it later.
| lgpl-2.1 | GNOME/pyclutter,pmarti/pyclutter,pmarti/pyclutter,pmarti/pyclutter,GNOME/pyclutter,pmarti/pyclutter | 01a10a317285f66f5343aa894388f425168c869b |
#ifdef GUADALUPE_SPREAD
int cpumap(int i, int nprocs)
{
return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2);
}
#elif GUADALUPE_MIC_COMPACT
int cpumap(int i, int nprocs)
{
return (i + 1) % 228;
}
#elif BIOU_COMPACT
int cpumap(int i, int nprocs)
{
return (i % 4) * 32 + i / 4;
}
#else
int cpumap(int id, int np... | #ifdef GUADALUPE_SPREAD
int cpumap(int i, int nprocs)
{
return (i / 36) * 36 + (i % 2) * 18 + (i % 36 / 2);
}
#elif GUADALUPE_MIC_COMPACT
int cpumap(int i, int nprocs)
{
return (i + 1) % 228;
}
#else
int cpumap(int id, int nprocs)
{
return id % nprocs;
}
#endif
| ---
+++
@@ -12,6 +12,13 @@
return (i + 1) % 228;
}
+#elif BIOU_COMPACT
+
+int cpumap(int i, int nprocs)
+{
+ return (i % 4) * 32 + i / 4;
+}
+
#else
int cpumap(int id, int nprocs) | Add compact allocation on BioU.
| mit | chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue,chaoran/hpc-queue,chaoran/fast-wait-free-queue | 2a8c9a3aa4d28232e294877316f4a11bbc03ee7e |
#ifndef HAL1_H
#define HAL1_H
// Configurable constants
int const MAIN_MOTOR_PWM_TOP = 255;
int const MAIN_MOTOR_BRAKE_SPEED = 120;
int const MAIN_MOTOR_MIN_SPEED = 150;
int const MAIN_MOTOR_MED_SPEED = 254;
int const MAIN_MOTOR_MAX_SPEED = 255;
int const MAGNET_OPEN_WAIT = 5; // 10ths of a second
void init(void);
... | // Configurable constants
int const MAIN_MOTOR_PWM_TOP = 255;
int const MAIN_MOTOR_BRAKE_SPEED = 120;
int const MAIN_MOTOR_MIN_SPEED = 150;
int const MAIN_MOTOR_MED_SPEED = 254;
int const MAIN_MOTOR_MAX_SPEED = 255;
int const MAGNET_OPEN_WAIT = 5; // 10ths of a second
void init(void);
| ---
+++
@@ -1,3 +1,6 @@
+#ifndef HAL1_H
+#define HAL1_H
+
// Configurable constants
int const MAIN_MOTOR_PWM_TOP = 255;
@@ -8,3 +11,28 @@
int const MAGNET_OPEN_WAIT = 5; // 10ths of a second
void init(void);
+
+void main_motor_stop();
+void main_motor_cw_open(uint8_t speed);
+void main_motor_ccw_close(uint8_... | Add function prototypes and ifndef wrapper
| unlicense | plzz/ovisysteemi,plzz/ovisysteemi | e5be6c05567bab2c6d13fc3e8b3cb869a387327c |
/*
* (C) 2001 by Matthias Andree
*/
/*
* This file (leafnode-version.c) is public domain. It comes without and
* express or implied warranties. Do with this file whatever you wish, but
* don't remove the disclaimer.
*/
#include <stdio.h>
#include "leafnode.h"
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
#i... | /*
* (C) 2001 by Matthias Andree
*/
/*
* This file (leafnode-version.c) is public domain. It comes without and
* express or implied warranties. Do with this file whatever you wish, but
* don't remove the disclaimer.
*/
#include <stdio.h>
#include "leafnode.h"
#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif
#i... | ---
+++
@@ -40,10 +40,8 @@
puts(bindir);
fputs("sysconfdir: ", stdout);
puts(sysconfdir);
- fputs("spooldir: ", stdout);
- puts(spooldir);
- fputs("lockfile: ", stdout);
- puts(lockfile);
+ fputs("default spooldir: ", stdout);
+ puts(def_spooldir);
#ifdef HAVE_IPV6
puts("IPv6: y... | Fix up the spooldir/lockfile changes that caused a segfault. | lgpl-2.1 | BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode | 04743587bbbf4330680ca61ef7ab4392df3529de |
#include <mongoc.h>
#include <mongoc-openssl-private.h>
#include "TestSuite.h"
static void
test_extract_subject (void)
{
char *subject;
subject = mongoc_ssl_extract_subject (BINARY_DIR"/../certificates/client.pem");
ASSERT_CMPSTR (subject, "CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US")... | #include <mongoc.h>
#include <mongoc-openssl-private.h>
#include "TestSuite.h"
static void
test_extract_subject (void)
{
char *subject;
subject = _mongoc_openssl_extract_subject (BINARY_DIR"/../certificates/client.pem");
ASSERT (0 == strcmp (subject, "CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New ... | ---
+++
@@ -9,8 +9,8 @@
{
char *subject;
- subject = _mongoc_openssl_extract_subject (BINARY_DIR"/../certificates/client.pem");
- ASSERT (0 == strcmp (subject, "CN=client,OU=kerneluser,O=10Gen,L=New York City,ST=New York,C=US"));
+ subject = mongoc_ssl_extract_subject (BINARY_DIR"/../certificates/client.... | Improve test output on failure
| apache-2.0 | remicollet/mongo-c-driver,acmorrow/mongo-c-driver,christopherjwang/mongo-c-driver,mschoenlaub/mongo-c-driver,Convey-Compliance/mongo-c-driver,mongodb/mongo-c-driver,derickr/mongo-c-driver,jmikola/mongo-c-driver,Machyne/mongo-c-driver,Convey-Compliance/mongo-c-driver,remicollet/mongo-c-driver,bjori/mongo-c-driver,bjori/... | 4909c1c0f260f2fcae73dd48982e2a4f22025e99 |
#pragma once
#ifndef INCL_NETWORKOS
#define INCL_NETWORKOS
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <cstdlib>
#if defined(_MSC_VER)
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <inaddr.h>
#include <in6addr.h>
#include <mstcpip.h>
#define SHUT_RDWR SD_BO... | #pragma once
#ifndef INCL_NETWORKOS
#define INCL_NETWORKOS
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <map>
#include <cstdlib>
#ifdef WIN32
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <inaddr.h>
#include <in6addr.h>
#include <mstcpip.h>
#define SHUT_RDWR SD_BOTH
typede... | ---
+++
@@ -9,7 +9,7 @@
#include <map>
#include <cstdlib>
-#ifdef WIN32
+#if defined(_MSC_VER)
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <inaddr.h> | Use variable that cmake defines instead of specific one
| mit | Meisaka/NetPort | eb87dfe4886db065ce24f1f2db3570497366a559 |
#include <ruby.h>
#include "client.h"
static VALUE rb_metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
char * user_id_str, * key_str;
int result = 0;
user_id_str = RSTRING_PTR(user_id);
key_str = RSTRING_PTR(key);
/* Figure out what this belongs to and call the apprioriate one. */
... | #include <ruby.h>
#include "client.h"
static VALUE metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
char * user_id_str, * key_str;
int result = 0;
user_id_str = RSTRING_PTR(user_id);
key_str = RSTRING_PTR(key);
/* Figure out what this belongs to and call the apprioriate one. */
sw... | ---
+++
@@ -1,7 +1,7 @@
#include <ruby.h>
#include "client.h"
-static VALUE metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
+static VALUE rb_metrics_report_metric(VALUE self, VALUE user_id, VALUE key, VALUE val) {
char * user_id_str, * key_str;
int result = 0;
@@ -24,7 +24,21 @@
... | Move this in to an actual class.
| mit | bradhe/metrics-client,bradhe/metrics-client | 472bd7982e5a006fbbe75a0cd88ba494b31719d6 |
#include "plrCompare.h"
#include <stdio.h>
int plrC_compareArgs(const syscallArgs_t *args1, const syscallArgs_t *args2) {
int faultVal = 0;
#define CompareElement(elem, faultBit) \
if (args1->elem != args2->elem) { \
faultVal |= 1 << faultBit; \
printf("Argument miscompare in "... | #include "plrCompare.h"
int plrC_compareArgs(const syscallArgs_t *args1, const syscallArgs_t *args2) {
int foundDiff = 0;
if (args1->addr != args2->addr) { foundDiff = 1; }
else if (args1->arg[0] != args2->arg[0]) { foundDiff = 2; }
else if (args1->arg[1] != args2->arg[1]) { foundDiff = 3; }
else if... | ---
+++
@@ -1,13 +1,23 @@
#include "plrCompare.h"
+#include <stdio.h>
int plrC_compareArgs(const syscallArgs_t *args1, const syscallArgs_t *args2) {
- int foundDiff = 0;
- if (args1->addr != args2->addr) { foundDiff = 1; }
- else if (args1->arg[0] != args2->arg[0]) { foundDiff = 2; }
- else if (args1... | Add logging to syscall arg compare for debugging purposes
| mit | apogeedev/plr,apogeedev/plr | b09bd3d3896c448f8817ee7515e3af0314605ab1 |
#include "minunit.h"
#include <terror/file_utils.h>
#include <assert.h>
char *test_getlines()
{
bstring str = bfromcstr("one\ntwo\nthree\nfour\nfive\n");
struct bstrList *file = bsplit(str, '\n');
DArray *lines = getlines(file, 2, 4);
bstring two = bfromcstr("two");
bstring three = bfromcstr("three");
bs... | #include "minunit.h"
#include <terror/file_utils.h>
#include <assert.h>
char *test_getlines()
{
bstring str = bfromcstr("one\ntwo\nthree\nfour\nfive\n");
struct bstrList *file = bsplit(str, '\n');
DArray *lines = getlines(file, 2, 4);
mu_assert(DArray_count(lines) == 3, "Wrong number of lines.");
mu_assert... | ---
+++
@@ -9,10 +9,21 @@
DArray *lines = getlines(file, 2, 4);
+ bstring two = bfromcstr("two");
+ bstring three = bfromcstr("three");
+ bstring four = bfromcstr("four");
+
mu_assert(DArray_count(lines) == 3, "Wrong number of lines.");
- mu_assert(bstrcmp((bstring)DArray_at(lines, 0), bfromcstr("two"))... | Make file utils tests valgrind-kosher
| mit | txus/terrorvm,txus/terrorvm,txus/terrorvm,txus/terrorvm | b191b25f364aa679173756114884231b4314eb24 |
/*
* Medical Image Registration ToolKit (MIRTK)
*
* Copyright 2013-2015 Imperial College London
* Copyright 2013-2015 Andreas Schuh
*
* 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
*
... | /*
* Medical Image Registration ToolKit (MIRTK)
*
* Copyright 2013-2015 Imperial College London
* Copyright 2013-2015 Andreas Schuh
*
* 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
*
... | ---
+++
@@ -28,7 +28,7 @@
enum Status
{
Active,
- Passive,
+ Passive
};
| style: Remove needless comma after last enumeration value [Common]
| apache-2.0 | schuhschuh/MIRTK,BioMedIA/MIRTK,schuhschuh/MIRTK,BioMedIA/MIRTK,stefanpsz/MIRTK,stefanpsz/MIRTK,stefanpsz/MIRTK,schuhschuh/MIRTK,BioMedIA/MIRTK,BioMedIA/MIRTK,schuhschuh/MIRTK,stefanpsz/MIRTK | 51e169a1422fe902f3b9aa165e7058ea636baf22 |
//
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | //
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | ---
+++
@@ -22,6 +22,8 @@
- (instancetype)initWithFirebaseRef:(FIRDatabaseReference *)firebaseRef snapshotValue:(NSDictionary *)snapshotValue NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithSnapshot:(FIRDataSnapshot *)snapshot;
+- (BOOL)isEqualToFirebaseModel:(MKFirebaseModel *)firebaseModel;
+
@end
NS_ASS... | Add `isEqualToFirebaseModel:` to public header
| mit | mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping | 1a3c1576138400b28ca7093a842dc7d044d5892b |
/* This module exposes to PHP the equivalent of:
* // Creates a chdb file containing the key-value pairs specified in the
* // array $data, or throws an exception in case of error.
* function chdb_create($pathname, $data);
*
* // Represents a loaded chdb file.
* class chdb
* {
* // Loads a... | /* This module exposes to PHP the equivalent of:
* // Creates a chdb file containing the key-value pairs specified in the
* // array $data, or throws an exception in case of error.
* function chdb_create($pathname, $data);
*
* // Represents a loaded chdb file.
* class chdb
* {
* // Loads a... | ---
+++
@@ -23,7 +23,7 @@
#include <php.h>
-#define PHP_CHDB_VERSION "0.1"
+#define PHP_CHDB_VERSION "0.1.0"
extern zend_module_entry chdb_module_entry;
#define phpext_chdb_ptr &chdb_module_entry | Change version to 0.1.0 to follow the PHP standard.
| bsd-3-clause | lcastelli/chdb | d6476e4f3c29fc64ddb0b6ac8db81162deff1a41 |
/*
* 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 | MatChung/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,hbwhlklive/color-emoji.skia,MatChung/color-emoji.skia,Frankie-666/color-emoji.skia,hbwhlklive/color-emoji.skia,Frankie-666/color-emoji.skia,Frankie-666/color-emoji.skia,Hankuo/color-emoji.skia,Hankuo/color-emoji.skia,MatChung/color-emoji... | f4d017d65f7e464baeacc04987f5201eabc90c49 |
#ifndef _NPY_PRIVATE_BUFFER_H_
#define _NPY_PRIVATE_BUFFER_H_
#ifdef NPY_ENABLE_SEPARATE_COMPILATION
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#else
NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#endif
#endif
| #ifndef _NPY_PRIVATE_BUFFER_H_
#define _NPY_PRIVATE_BUFFER_H_
#ifdef NPY_ENABLE_MULTIPLE_COMPILATION
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#else
NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#endif
#endif
| ---
+++
@@ -1,7 +1,7 @@
#ifndef _NPY_PRIVATE_BUFFER_H_
#define _NPY_PRIVATE_BUFFER_H_
-#ifdef NPY_ENABLE_MULTIPLE_COMPILATION
+#ifdef NPY_ENABLE_SEPARATE_COMPILATION
extern NPY_NO_EXPORT PyBufferProcs array_as_buffer;
#else
NPY_NO_EXPORT PyBufferProcs array_as_buffer; | Fix mispelled separate compilation macro.
| bsd-3-clause | numpy/numpy-refactor,ESSS/numpy,mhvk/numpy,ddasilva/numpy,gmcastil/numpy,sonnyhu/numpy,dwf/numpy,Srisai85/numpy,cjermain/numpy,mindw/numpy,GrimDerp/numpy,matthew-brett/numpy,anntzer/numpy,jorisvandenbossche/numpy,felipebetancur/numpy,mingwpy/numpy,SiccarPoint/numpy,rherault-insa/numpy,pbrod/numpy,pelson/numpy,has2k1/nu... | ddd0a6ac92572a6e6016f5fbc9fda7eaedc7b114 |
/**
* @file tree/bounds.h
*
* Bounds that are useful for binary space partitioning trees.
*
* TODO: Come up with a better design so you can do plug-and-play distance
* metrics.
*
* @experimental
*/
#ifndef TREE_BOUNDS_H
#define TREE_BOUNDS_H
#include <mlpack/core/math/math_lib.h>
#include <mlpack/core/math/r... | /**
* @file tree/bounds.h
*
* Bounds that are useful for binary space partitioning trees.
*
* TODO: Come up with a better design so you can do plug-and-play distance
* metrics.
*
* @experimental
*/
#ifndef TREE_BOUNDS_H
#define TREE_BOUNDS_H
#include <mlpack/core/math/math_lib.h>
#include <mlpack/core/kernel... | ---
+++
@@ -13,6 +13,8 @@
#define TREE_BOUNDS_H
#include <mlpack/core/math/math_lib.h>
+#include <mlpack/core/math/range.h>
+#include <mlpack/core/math/kernel.h>
#include <mlpack/core/kernels/lmetric.h>
#include "hrectbound.h"
#include "dhrectperiodicbound.h" | Include the correct files since math_lib.h no longer does that.
| bsd-3-clause | ersanliqiao/mlpack,ranjan1990/mlpack,trungda/mlpack,darcyliu/mlpack,Azizou/mlpack,erubboli/mlpack,ranjan1990/mlpack,thirdwing/mlpack,ajjl/mlpack,BookChan/mlpack,Azizou/mlpack,ajjl/mlpack,bmswgnp/mlpack,stereomatchingkiss/mlpack,stereomatchingkiss/mlpack,Azizou/mlpack,bmswgnp/mlpack,theranger/mlpack,theranger/mlpack,tru... | f503a09cc3e24c8a87a16ab55b8bf2eedb2f0b85 |
#ifndef _HELPERS_H
#define _HELPERS_H
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#define LENGTH(x) (sizeof(x) / sizeof(*x))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define BOOLSTR(A) ((A) ? "true" : "false")
#define MAXLEN 25... | #ifndef _HELPERS_H
#define _HELPERS_H
#include <stdarg.h>
#include <stdio.h>
#include <stdint.h>
#define LENGTH(x) (sizeof(x) / sizeof(*x))
#define MAX(A, B) ((A) > (B) ? (A) : (B))
#define MIN(A, B) ((A) < (B) ? (A) : (B))
#define BOOLSTR(A) ((A) ? "true" : "false")
#define MAXLEN 25... | ---
+++
@@ -16,7 +16,7 @@
#ifdef DEBUG
# define PUTS(x) puts(x)
-# define PRINTF(x,...) printf(x, ##__VA_ARGS__)
+# define PRINTF(x,...) printf(x, __VA_ARGS__)
#else
# define PUTS(x) ((void)0)
# define PRINTF(x,...) ((void)0) | Address the non-portability of the PRINTF macro
| bsd-2-clause | nfnty/bspwm,0re5ama/bspwm,netzverweigerer/bspwm,nfnty/bspwm,JBouron/bspwm,JBouron/bspwm,XiKuuKy/bspwm,JBouron/bspwm,medisun/bspwm,Stebalien/bspwm,jbalint/bspwm,jbalint/bspwm,nfnty/bspwm,baskerville/bspwm,0re5ama/bspwm,medisun/bspwm,medisun/bspwm,XiKuuKy/bspwm,ikn/bspwm,netzverweigerer/bspwm,baskerville/bspwm,0re5ama/bs... | ad7dfb9776553aefa94360bcf87032bea8a069fa |
/*
* Insert Copyright Here.
*/
#ifdef LBS
#define MASTERNODE "192.168.1.25"
#else
#define MASTERNODE "boss.emulab.net"
#endif
#define TBSERVER_PORT 7777
#define MYBUFSIZE 1024
| /*
* Insert Copyright Here.
*/
#ifdef LBS
#define MASTERNODE "206.163.153.25"
#else
#define MASTERNODE "boss.emulab.net"
#endif
#define TBSERVER_PORT 7777
#define MYBUFSIZE 1024
| ---
+++
@@ -3,7 +3,7 @@
*/
#ifdef LBS
-#define MASTERNODE "206.163.153.25"
+#define MASTERNODE "192.168.1.25"
#else
#define MASTERNODE "boss.emulab.net"
#endif | Change the IP of my home machine for testing.
| agpl-3.0 | nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome,nmc-probe/emulab-nome | 509a2f29b962ea555660743a485f97b1dacbaf1d |
//
// OCTClient+Activity.h
// OctoKit
//
// Created by Piet Brauer on 14.02.14.
// Copyright (c) 2014 GitHub. All rights reserved.
//
#import "OCTClient.h"
@class RACSignal;
@class OCTRepository;
@interface OCTClient (Activity)
// Check if the user starred the `repository`.
//
// repository - The repository used... | //
// OCTClient+Activity.h
// OctoKit
//
// Created by Piet Brauer on 14.02.14.
// Copyright (c) 2014 GitHub. All rights reserved.
//
#import "OCTClient.h"
@class RACSignal;
@class OCTRepository;
@interface OCTClient (Activity)
// Check if the user starred the `repository`.
//
// repository - The repository used... | ---
+++
@@ -16,8 +16,8 @@
//
// repository - The repository used to check the starred status. Cannot be nil.
//
-// Returns a signal, which will send completed on success. If the client
-// is not `authenticated`, the signal will error immediately.
+// Returns a signal, which will send a NSNumber valued @YES or @N... | Change documentation to fit return of NSNumber | mit | CHNLiPeng/octokit.objc,jonesgithub/octokit.objc,cnbin/octokit.objc,leichunfeng/octokit.objc,jonesgithub/octokit.objc,cnbin/octokit.objc,CleanShavenApps/octokit.objc,Acidburn0zzz/octokit.objc,wrcj12138aaa/octokit.objc,Palleas/octokit.objc,daemonchen/octokit.objc,CHNLiPeng/octokit.objc,GroundControl-Solutions/octokit.obj... | bcccfa6cd2b6e4335b479bdfc137567fd5585f37 |
#ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT 11122
#define LISTEN_BACKLOG 40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE 512
#define WRITE_BUFFER_CHUNK 512
#define MAX_WRITE_BUFFER_SIZE (10 * (WRITE_BUFFER_CHUNK))
/* Linux specific configs */
#define ... | #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT 11122
#define LISTEN_BACKLOG 40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE 512
#define WRITE_BUFFER_CHUNK 512
#define MAX_WRITE_BUFFER_SIZE 10 * WRITE_BUFFER_CHUNK
/* Linux specific configs */
#define MAX_... | ---
+++
@@ -8,7 +8,7 @@
*/
#define MAX_MESSAGE_SIZE 512
#define WRITE_BUFFER_CHUNK 512
-#define MAX_WRITE_BUFFER_SIZE 10 * WRITE_BUFFER_CHUNK
+#define MAX_WRITE_BUFFER_SIZE (10 * (WRITE_BUFFER_CHUNK))
/* Linux specific configs */
#define MAX_EPOLL_EVENTS 100 | Use some paranthesis around macro parameters.
| mit | mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet | 8b9c56f917399fd11e05f0561c095c275035c095 |
#include <stdlib.h>
#include <stdio.h>
#include <check.h>
#include "check_check.h"
int main (void)
{
int n;
SRunner *sr;
fork_setup();
setup_fixture();
sr = srunner_create (make_master_suite());
srunner_add_suite(sr, make_list_suite());
srunner_add_suite(sr, make_msg_suite());
srunner_add_suite(sr, ma... | #include <stdlib.h>
#include <stdio.h>
#include <check.h>
#include "check_check.h"
int main (void)
{
int n;
SRunner *sr;
fork_setup();
setup_fixture();
sr = srunner_create (make_master_suite());
srunner_add_suite(sr, make_list_suite());
srunner_add_suite(sr, make_msg_suite());
srunner_add_suite(sr, ma... | ---
+++
@@ -20,7 +20,7 @@
srunner_add_suite(sr, make_pack_suite());
setup();
- printf ("Ran %d tests in subordinate suite\n", sub_nfailed);
+ printf ("Ran %d tests in subordinate suite\n", sub_ntests);
srunner_run_all (sr, CK_NORMAL);
cleanup();
fork_teardown(); | Use correct variable for number of tests
git-svn-id: caee63afe878fe2ec7dbba394a86c9654d9110ca@230 64e312b2-a51f-0410-8e61-82d0ca0eb02a
| lgpl-2.1 | dashaomai/check-code,dashaomai/check-code,svn2github/check,svn2github/check,svn2github/check,dashaomai/check-code,svn2github/check,dashaomai/check-code,svn2github/check | 6c39b5e3015535d249699cf4c7dd9e3bfa9ed550 |
#pragma once
#include <pebble.h>
#include "effects.h"
//number of supported effects on a single effect_layer (must be <= 255)
#define MAX_EFFECTS 4
// structure of effect layer
typedef struct {
Layer* layer;
effect_cb* effects[MAX_EFFECTS];
void* params[MAX_EFFECTS];
uint8_t next_effect;... | #pragma once
#include <pebble.h>
#include "effects.h"
//number of supported effects on a single effect_layer (must be <= 255)
#define MAX_EFFECTS 4
// structure of effect layer
typedef struct {
Layer* layer;
effect_cb* effects[MAX_EFFECTS];
void* params[MAX_EFFECTS];
uint8_t next_effect;... | ---
+++
@@ -25,3 +25,11 @@
//gets layer
Layer* effect_layer_get_layer(EffectLayer *effect_layer);
+
+// Recreate inverter_layer for BASALT
+#ifndef PBL_PLATFORM_APLITE
+ #define InverterLayer EffectLayer
+ #define inverter_layer_create(frame)({ EffectLayer* _el=effect_layer_create(frame); effect_layer_add_effec... | Add a few macros to support InverterLayer on BASALT
Re-add support for InverterLayer in SDK3.0.
Just include effect_layer.h in files using InverterLayer and it should
work out of the box.
Warning: This InverterLayer actually invert all colors, unlike the
original InverterLayer that had a weird behavior on Basalt.
| mit | n4ru/EffectLayer,clach04/EffectLayer,clach04/EffectLayer,gregoiresage/EffectLayer,n4ru/EffectLayer,clach04/EffectLayer,nevraw/EffectLayer,nevraw/EffectLayer,ron064/EffectLayer,ron064/EffectLayer,nevraw/EffectLayer,gregoiresage/EffectLayer,n4ru/EffectLayer,gregoiresage/EffectLayer,ron064/EffectLayer | 244047b32d720d65be0b5ef0c832ae16acf8c26c |
/* *
* This file is part of Feng
*
* Copyright (C) 2009 by LScube team <team@lscube.org>
* See AUTHORS for more details
*
* feng is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version... | /* *
* This file is part of Feng
*
* Copyright (C) 2009 by LScube team <team@lscube.org>
* See AUTHORS for more details
*
* feng is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version... | ---
+++
@@ -33,9 +33,4 @@
#include <math.h>
#include <string.h>
-/*! autodescriptive error values */
-#define ERR_NOERROR 0
-#define ERR_GENERIC -1
-#define ERR_ALLOC -4
-
#endif // FN_UTILS_H | Remove the remaining ERR_ constants that are never used or tested for.
| lgpl-2.1 | winlinvip/feng,lscube/feng,winlinvip/feng,lscube/feng,winlinvip/feng,lscube/feng | 2567fa8188b27b97d550c546f7a83211940e91a1 |
#include <pygobject.h>
#include <nbtk/nbtk.h>
void pynbtk_register_classes (PyObject *d);
void pynbtk_add_constants (PyObject *module, const gchar *prefix);
extern PyMethodDef pynbtk_functions[];
static void
sink_nbtkaction (GObject *object)
{
if (g_object_is_floating (object))
g_object_ref_sink (object);
}... | #include <pygobject.h>
#include <clutter/clutter.h>
void pynbtk_register_classes (PyObject *d);
void pynbtk_add_constants (PyObject *module, const gchar *prefix);
extern PyMethodDef pynbtk_functions[];
DL_EXPORT(void)
init_nbtk(void)
{
PyObject *m, *d;
init_pygobject_check (2, 12, 0);
m = Py_InitM... | ---
+++
@@ -1,11 +1,18 @@
#include <pygobject.h>
-#include <clutter/clutter.h>
+#include <nbtk/nbtk.h>
void pynbtk_register_classes (PyObject *d);
void pynbtk_add_constants (PyObject *module, const gchar *prefix);
extern PyMethodDef pynbtk_functions[];
+static void
+sink_nbtkaction (GObject *object)
+{
+... | Add a sink function for nbtk.Action
NbtkAction is a GInitiallyUnowned, so we need to register a sinkfunc.
| lgpl-2.1 | buztard/mxpy,buztard/mxpy,buztard/mxpy | 583acd2de697ec1f6d148755fe01df3ba97d7bfd |
struct T;
struct T {
int x;
};
int
main()
{
struct T v;
{ struct T { int z; }; }
v.x = 2;
if(v.x != 2)
return 1;
return 0;
}
| struct s1 {
int y;
int z;
};
struct s2 {
struct s1 *p;
};
int main()
{
struct s1 nested;
struct s2 v;
v.p = &nested;
v.p->y = 1;
v.p->z = 2;
if (nested.y != 1)
return 1;
if (nested.z != 2)
return 2;
return 0;
}
| ---
+++
@@ -1,22 +1,16 @@
-struct s1 {
- int y;
- int z;
+struct T;
+
+struct T {
+ int x;
};
-struct s2 {
- struct s1 *p;
-};
-
-int main()
+int
+main()
{
- struct s1 nested;
- struct s2 v;
- v.p = &nested;
- v.p->y = 1;
- v.p->z = 2;
- if (nested.y != 1)
- return 1;
- if (ne... | Add test for simple partial structs.
| bsd-2-clause | andrewchambers/c,xtao/c,andrewchambers/c,xtao/c | 01251507d399d412494b6ee7aa5b6ad9c9b2537b |
//
// NSSortDescriptor+Essentials.h
// Essentials
//
// Created by Martin Kiss on 11.4.14.
// Copyright (c) 2014 iAdverti. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef enum : BOOL {
ESSSortDescending = NO,
ESSSortAscending = YES,
} ESSSort;
@interface NSSortDescriptor (Essentials... | //
// NSSortDescriptor+Essentials.h
// Essentials
//
// Created by Martin Kiss on 11.4.14.
// Copyright (c) 2014 iAdverti. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef enum : BOOL {
ESSSortDescending = NO,
ESSSortAscending = YES,
} ESSSort;
@interface NSSortDescriptor (Essentials... | ---
+++
@@ -34,6 +34,10 @@
#define ESSSort(Class, keyPath, ascend) \
(NSSortDescriptor *)({ \
+ if (NO) { \
+ Class *object = nil; \
+ (void)object.keyPath; \
+ } \
[NSSortDescriptor sortDescriptorWithKey:@#keyPath ascending:ESSSort##ascend]; \
})
@@ -42,7 +46,7 @@
(NSSortDescriptor *... | Fix ESSSort to work with non-object properties
| mit | Tricertops/Essentials,Tricertops/Essentials | 4b1d156a39827af50072cf16abffc11dc822ade9 |
/*******************************************************************
**
** Manage system call mode and do remote system calls.
**
*******************************************************************/
#define _POSIX_SOURCE
#include "condor_common.h"
#include "condor_debug.h"
#include "condor_syscall_mode.h"
static int ... | /*******************************************************************
**
** Manage system call mode and do remote system calls.
**
*******************************************************************/
#define _POSIX_SOURCE
#include <stdio.h>
#include "condor_syscall_mode.h"
static int SyscallMode = 1; /* LOCAL and UNM... | ---
+++
@@ -5,7 +5,8 @@
*******************************************************************/
#define _POSIX_SOURCE
-#include <stdio.h>
+#include "condor_common.h"
+#include "condor_debug.h"
#include "condor_syscall_mode.h"
static int SyscallMode = 1; /* LOCAL and UNMAPPED */
@@ -37,6 +38,16 @@
return (Sysc... | Add DisplaySyscallMode() routine for debugging.
| apache-2.0 | zhangzhehust/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,neurodebian/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,zhangzhehust/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,neurodebian/htcondor,clala... | b3fbc27c7a4130904f3cae41eb161832304b6b9d |
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#import <UIKit/UIKit.h>
#include <libkern/OSAtomic.h>
#include <execinfo.h>
@interface ReactNativeExceptionHandler : NSObject <RCTBridgeModule>
+ (void) replaceNativeExceptionHandlerBlock:(void (^... |
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#import <UIKit/UIKit.h>
#include <libkern/OSAtomic.h>
#include <execinfo.h>
@interface ReactNativeExceptionHandler : NSObject <RCTBridgeModule>
+ (void) replaceNativeExceptionHandlerBlock:(void (^)(NSEx... | ---
+++
@@ -1,8 +1,8 @@
-#if __has_include("RCTBridgeModule.h")
+#if __has_include(<React/RCTBridgeModule.h>)
+#import <React/RCTBridgeModule.h>
+#else
#import "RCTBridgeModule.h"
-#else
-#import <React/RCTBridgeModule.h>
#endif
#import <UIKit/UIKit.h> | Change import priority of RCTBridgeModule
This appears to be the accepted fix for this issue: https://github.com/master-atul/react-native-exception-handler/issues/46 per https://github.com/facebook/react-native/issues/15775#issuecomment-326930316 and other posts in the same thread. | mit | master-atul/react-native-exception-handler,master-atul/react-native-exception-handler,master-atul/react-native-exception-handler | 355c5444d721ed0ed3c4fb5ca8286c579c79db69 |
//===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
// This file declares some helper routines, and also the for... | //===------ utils/obj2yaml.hpp - obj2yaml conversion tool -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
// This file declares some helper routines, and also the for... | ---
+++
@@ -10,8 +10,8 @@
// source file, implement it.
//===----------------------------------------------------------------------===//
-#ifndef LLVM_UTILS_OBJ2YAML_H
-#define LLVM_UTILS_OBJ2YAML_H
+#ifndef LLVM_TOOLS_OBJ2YAML_H
+#define LLVM_TOOLS_OBJ2YAML_H
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Sup... | Fix include guards to match new location.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@178877 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers... | 3440d0b857fa6def37c1a4185ac9602be2393c9c |
#include "vk_default_loader.h"
#include "vulkan/vulkan.h"
#if defined(_WIN32)
#elif defined(unix) || defined(__unix__) || defined(__unix)
#include <dlfcn.h>
static void* (*symLoader)(void* lib, const char* procname);
static void* loaderWrap(VkInstance instance, const char* vkproc) {
return (*symLoa... | #include "vk_default_loader.h"
#include "vulkan/vulkan.h"
#if defined(_WIN32)
#elif defined(unix) || defined(__unix__) || defined(__unix)
#include <dlfcn.h>
static void* (*loadSym)(void* lib, const char* procname);
static void* loadSymWrap(VkInstance instance, const char* vkproc) {
return (*loadSym)(instance, vkproc)... | ---
+++
@@ -3,31 +3,37 @@
#if defined(_WIN32)
#elif defined(unix) || defined(__unix__) || defined(__unix)
-#include <dlfcn.h>
-static void* (*loadSym)(void* lib, const char* procname);
-static void* loadSymWrap(VkInstance instance, const char* vkproc) {
- return (*loadSym)(instance, vkproc);
-}
+ #include <dlf... | Fix no-return warning in loader, also change the internal variable names.
| mit | vulkan-go/vulkan,vulkan-go/vulkan | 9b1a95eb03798b3b6d969eca13fbbf6a9b0156b0 |
#ifndef PYPOC_H
#define PYPOC_H
#include <Windows.h>
#include "EmoStateDLL.hpp"
#include "edk.hpp"
#include "edkErrorCode.hpp"
class EPOC {
private:
EmoEngineEventHandle eEvent;
EmoStateHandle eState;
DataHandle hData;
int nChannels;
EE_DataChannel_t *channels;
unsigned int userId;
double *samples;
BOOL ready... | #ifndef PYPOC_H
#define PYPOC_H
#include <Windows.h>
#include "EmoStateDLL.h"
#include "edk.h"
#include "edkErrorCode.h"
class EPOC {
private:
EmoEngineEventHandle eEvent;
EmoStateHandle eState;
DataHandle hData;
int nChannels;
EE_DataChannel_t *channels;
unsigned int userId;
double *samples;
BOOL ready;
BOO... | ---
+++
@@ -2,9 +2,9 @@
#define PYPOC_H
#include <Windows.h>
-#include "EmoStateDLL.h"
-#include "edk.h"
-#include "edkErrorCode.h"
+#include "EmoStateDLL.hpp"
+#include "edk.hpp"
+#include "edkErrorCode.hpp"
class EPOC {
private: | Make legacy header reference old code.
| bsd-3-clause | NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock,NeuralProsthesisLab/unlock | 1f38f2566e6a8b2c7399af25da44104cbc55cdbb |
/*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2010, 2012, 2013, 2014 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free... | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2010, 2012, 2013, 2014 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free... | ---
+++
@@ -29,3 +29,12 @@
load_dir("obj", 1);
load_dir("sys", 1);
}
+
+void bomb(int quota)
+{
+ if (quota) {
+ quota--;
+ clone_object("obj/bomb");
+ call_out("bomb", 0, quota);
+ }
+} | Allow test subsystem to set off clone bombs
| agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka | 646a3d3712809df66fa90bcd7ef21d3659a3e833 |
#include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
typedef enum Cell {
EMPTY
,SNAKE
,FOOD
} Cell;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
#define BOARD_HEIGHT 50
#define BOARD_WIDTH 50
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| ---
+++
@@ -12,6 +12,12 @@
int col;
} Position;
+typedef enum Cell {
+ EMPTY
+ ,SNAKE
+ ,FOOD
+} Cell;
+
int main() {
return EXIT_SUCCESS;
} | Enumerate possible values for cells.
| mit | Hendrikto/Snake | ce8db655cff33b744df07e338e328fb598a5a81c |
/* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following definitions are made:
FASTCALL -- Used for most internal functions to specify that the
fastest possible calling convention be used.
inline -- Used for selected internal functio... | /* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following definitions are made:
FASTCALL -- Used for most internal functions to specify that the
fastest possible calling convention be used.
inline -- Used for selected internal functio... | ---
+++
@@ -15,8 +15,14 @@
#if defined(__GNUC__)
#define FASTCALL __attribute__((stdcall, regparm(3)))
#elif defined(WIN32)
-#define FASTCALL __fastcall
-#else
+/* XXX This seems to have an unexpected negative effect on Windows so
+ we'll disable it for now on that platform. It may be reconsidered
+ for a fut... | Disable FASTCALL on Windows since it turned out not to be as effective
as hoped. Leaving the definition in the file so we'll know what it
was that didn't work, and hopefully find something better in the
future.
| mit | PKRoma/expat,PKRoma/expat,PKRoma/expat,PKRoma/expat | 038fd84030d172d7b94cfd8d84a5fcc274cb3d1f |
//
// Copyright 2013 Jeff Bush
//
// 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 t... | //
// Copyright 2013 Jeff Bush
//
// 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 t... | ---
+++
@@ -43,10 +43,8 @@
{
}
-extern "C" void __dso_handle()
+void *__dso_handle;
+
+extern "C" void __cxa_atexit(void (*f)(void *), void *objptr, void *dso)
{
}
-
-extern "C" void __cxa_atexit()
-{
-} | Make these a bit more correct
| apache-2.0 | FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziPr... | 49248d85df3037126b8282cae0610f9c499da548 |
#include <stdlib.h>
/**
* @author: Hendrik Werner
*/
typedef struct Position {
int row;
int col;
} Position;
int main() {
return EXIT_SUCCESS;
}
| #include <stdlib.h>
/**
* @author: Hendrik Werner
*/
int main() {
return EXIT_SUCCESS;
}
| ---
+++
@@ -4,6 +4,11 @@
* @author: Hendrik Werner
*/
+typedef struct Position {
+ int row;
+ int col;
+} Position;
+
int main() {
return EXIT_SUCCESS;
} | Define a struct to represent 2d positions.
| mit | Hendrikto/Snake | 316572d9a3274a18a8def23c087b139e27f99ac8 |
#include <stdio.h>
#include <float.h>
#if defined(__BORLANDC__)
# include <math.h>
# include <float.h>
#endif
int
main(int argc, char *argv[])
{
#if defined(__BORLANDC__)
// Disable floating point exceptions in Borland
_control87(MCW_EM, MCW_EM);
#endif // defined(__BORLANDC__)
char *me;
float qnan, zero;
... | #include <stdio.h>
#include <float.h>
int
main(int argc, char *argv[])
{
char *me;
float qnan, zero;
int i;
me = argv[0];
if (sizeof(float) != sizeof(int))
{
fprintf(stderr, "%s: MADNESS: sizeof(float)=%d != sizeof(int)=%d\n",
me, (int)sizeof(float), (int)sizeof(int));
return -1;
... | ---
+++
@@ -1,9 +1,20 @@
#include <stdio.h>
#include <float.h>
+
+#if defined(__BORLANDC__)
+# include <math.h>
+# include <float.h>
+#endif
+
int
main(int argc, char *argv[])
{
+#if defined(__BORLANDC__)
+ // Disable floating point exceptions in Borland
+ _control87(MCW_EM, MCW_EM);
+#endif // defined(__BOR... | FIX: Disable floating point exceptions on Borland compiler
| apache-2.0 | LucHermitte/ITK,cpatrick/ITK-RemoteIO,hendradarwin/ITK,PlutoniumHeart/ITK,blowekamp/ITK,InsightSoftwareConsortium/ITK,daviddoria/itkHoughTransform,biotrump/ITK,hendradarwin/ITK,LucHermitte/ITK,CapeDrew/DCMTK-ITK,CapeDrew/DCMTK-ITK,wkjeong/ITK,InsightSoftwareConsortium/ITK,eile/ITK,hinerm/ITK,GEHC-Surgery/ITK,paulnovo/I... | 3201618e6105204892a52265ecd84372f6b7925b |
/* Uncomment to compile with tcpd/libwrap support. */
//#define WITH_WRAP
/* Compile with database upgrading support? If disabled, mosquitto won't
* automatically upgrade old database versions. */
//#define WITH_DB_UPGRADE
/* Compile with memory tracking support? If disabled, mosquitto won't track
* heap memory usa... | /* Uncomment to compile with tcpd/libwrap support. */
//#define WITH_WRAP
/* Compile with database upgrading support? If disabled, mosquitto won't
* automatically upgrade old database versions. */
//#define WITH_DB_UPGRADE
/* Compile with memory tracking support? If disabled, mosquitto won't track
* heap memory usa... | ---
+++
@@ -9,3 +9,8 @@
* heap memory usage nor export '$SYS/broker/heap/current size', but will use
* slightly less memory and CPU time. */
#define WITH_MEMORY_TRACKING
+
+/* Compile with the ability to upgrade from old style sqlite persistent
+ * databases to the new mosquitto format. This means a dependency o... | Add compile option for sqlite db upgrades.
| bsd-3-clause | tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto,tempbottle/mosquitto | c1464c4787ee7dcb3fc4c0fc0622cb7f336a4fe6 |
#include <libutil.h>
#ifndef TAILQ_END
#define TAILQ_END(head) NULL
#endif
#ifndef SIMPLEQ_HEAD
#define SIMPLEQ_HEAD STAILQ_HEAD
#define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
#define SIMPLEQ_ENTRY STAILQ_ENTRY
#define SIMPLEQ_INIT STAILQ_INIT
#define SIMPLEQ_INSERT_AFTER STAILQ_INSERT_AFTER
#defin... | #include <libutil.h>
#ifndef TAILQ_END
#define TAILQ_END(head) NULL
#endif
| ---
+++
@@ -1,5 +1,21 @@
#include <libutil.h>
#ifndef TAILQ_END
-#define TAILQ_END(head) NULL
+#define TAILQ_END(head) NULL
#endif
+
+#ifndef SIMPLEQ_HEAD
+#define SIMPLEQ_HEAD STAILQ_HEAD
+#define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
+#define SIMPLEQ_ENTRY STAILQ_ENTRY
+#define SIMPLEQ_INIT ... | Add SIMPLEQ->STAILQ macros for freebsd.
| isc | conformal/spectrwm,conformal/spectrwm,conformal/spectrwm | 0e4d41f065f7803d096e6c53b3956c820186c3ea |
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | // Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... | ---
+++
@@ -18,11 +18,6 @@
#include <string>
-// Dump a backtrace to stderr.
-// |skip_frames| is how many frames to skip;
-// DumpBacktrace implicitly skips itself already.
-void DumpBacktrace(int skip_frames);
-
// Log a fatal message, dump a backtrace, and exit.
void Fatal(const char* msg, ...);
| Remove the declaration of DumpBacktrace.
This function was removed on 01880fb3a2a13f9071e9729c3a13752846828ed2.
| apache-2.0 | synaptek/ninja,rjogrady/ninja,maximuska/ninja,dabrahams/ninja,yannicklm/ninja,hnney/ninja,ninja-build/ninja,dendy/ninja,sorbits/ninja,Ju2ender/ninja,sgraham/ninja,liukd/ninja,purcell/ninja,metti/ninja,tychoish/ninja,jimon/ninja,justinsb/ninja,nocnokneo/ninja,dendy/ninja,dabrahams/ninja,jimon/ninja,dabrahams/ninja,dorgo... | ece2d63323bde9fd89956193167e09708802d73c |
//Move this directory to ~/sketchbook/libraries
// and clone https://github.com/mavlink/c_library_v2.git inside
// git clone https://github.com/mavlink/c_library_V2.git ~/Arduino/libraries/MavlinkForArduino/c_library_v2
#include "c_library_v2/ardupilotmega/mavlink.h"
| //Move this directory to ~/sketchbook/libraries
// and clone https://github.com/mavlink/c_library.git inside
// git clone https://github.com/mavlink/c_library.git ~/sketchbook/libraries/MavlinkForArduino
#include "c_library/ardupilotmega/mavlink.h"
| ---
+++
@@ -1,5 +1,5 @@
//Move this directory to ~/sketchbook/libraries
-// and clone https://github.com/mavlink/c_library.git inside
-// git clone https://github.com/mavlink/c_library.git ~/sketchbook/libraries/MavlinkForArduino
+// and clone https://github.com/mavlink/c_library_v2.git inside
+// git clone https://... | Use updated mavlink library v2
| mit | baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite | 687d7dd560c87624776c33d62b4646b6824bf3c4 |
#ifndef HMLIB_CONFIGVC_INC
#define HMLIB_CONFIGVC_INC 101
#
/*===config_vc===
VisualStudio C/C++の設定用マクロ
config_vc_v1_01/121204 hmIto
拡張子をhppからhに変更
インクルードガードマクロの不要なアンダーバーを消去
*/
#ifdef _MSC_VER
# //windows.hのmin,maxを使わせない
# ifndef NOMINMAX
# define NOMINMAX
# endif
# //古いunsafeな関数群使用による警告回避
# define _CRT_SECURE_NO_W... | #ifndef HMLIB_CONFIGVC_INC
#define HMLIB_CONFIGVC_INC 101
#
/*===config_vc===
VisualStudio C/C++の設定用マクロ
config_vc_v1_01/121204 hmIto
拡張子をhppからhに変更
インクルードガードマクロの不要なアンダーバーを消去
*/
#ifdef _MSC_VER
# //windows.hのmin,maxを使わせない
# ifndef NOMINMAX
# define NOMINMAX
# endif
# //古いunsafeな関数群使用による警告回避
# define _CRT_SECURE_NO_W... | ---
+++
@@ -18,6 +18,9 @@
# define _AFX_SECURE_NO_WARNINGS
# define _ATL_SECURE_NO_WARNINGS
# define _SCL_SECURE_NO_WARNINGS
+# define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
+# define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
+
#endif
#
#endif | Add C++17 depricated error ignore tag.
| mit | hmito/hmLib,hmito/hmLib | 88cd7aa7965d5a7bade3f943e1419cf0c59d225b |
#ifndef UTILS_H
#define UTILS_H
#include <string>
/** \brief Convert given container to it's hex representation */
template< typename T >
std::string toHex( const T& data )
{
static const char charTable[] = "0123456789abcdef";
std::string ret;
if ( data.size() > 80 )
{
ret = "*** LARGE *** ";... | #ifndef UTILS_H
#define UTILS_H
#include <string>
/** \brief Convert given container to it's hex representation */
template< typename T >
std::string toHex( const T& data )
{
static const char charTable[] = "0123456789abcdef";
std::string ret;
if ( data.size() > 1024 )
{
ret = "*** LARGE *** ... | ---
+++
@@ -10,7 +10,7 @@
static const char charTable[] = "0123456789abcdef";
std::string ret;
- if ( data.size() > 1024 )
+ if ( data.size() > 80 )
{
ret = "*** LARGE *** ";
for ( size_t i=0; i<40; i++ ) | Make the hex dump size limit much smaller
| bsd-3-clause | cinode/cpptestapp,cinode/cpptestapp | e6afdae011102bc110d072c33e2704bccc7cc6e4 |
/*
* Copyright (c) 2004-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
*/
#ifndef FB_SK_MACROS_H
#define FB_SK_MACROS_H
#define FB_LINK_REQUIRE_(NAME)
#define FB_LINKABLE(NAME)
#define FB_LINK_... | /*
* Copyright (c) 2004-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
*/
#ifndef FB_SK_MACROS_H
#define FB_SK_MACROS_H
#define FB_LINK_REQUIRE_(NAME, UNIQUE)
#define FB_LINKABLE(NAME)
... | ---
+++
@@ -1,13 +1,13 @@
-/*
- * Copyright (c) 2004-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the LICENSE
- * file in the root directory of this source tree.
- *
- */
-#ifndef FB_SK_MACROS_H
- #define FB_SK_MACROS_H
- #define FB_LINK_REQUIRE_(NAME, UN... | Delete second argument to FB_LINK_REQUIRE_
Summary: It is now always NAME.
Reviewed By: adamjernst
Differential Revision: D13577665
fbshipit-source-id: 9d9330fd17b7e214ef807760d0314c34bd06ebd5
| mit | facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper,facebook/flipper | 6cfdf1a8a98e6fd02227724fb6cab225671cb016 |
//
// GrowlBezelWindowView.h
// Display Plugins
//
// Created by Jorge Salvador Caffarena on 09/09/04.
// Copyright 2004 Jorge Salvador Caffarena. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "GrowlNotificationView.h"
@interface GrowlBezelWindowView : GrowlNotificationView {
NSImage *icon;
NSString... | //
// GrowlBezelWindowView.h
// Display Plugins
//
// Created by Jorge Salvador Caffarena on 09/09/04.
// Copyright 2004 Jorge Salvador Caffarena. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "GrowlNotificationView.h"
@interface GrowlBezelWindowView : GrowlNotificationView {
NSImage *icon;
NSString... | ---
+++
@@ -13,8 +13,6 @@
NSImage *icon;
NSString *title;
NSString *text;
- SEL action;
- id target;
NSColor *textColor;
NSColor *backgroundColor; | Remove duplicate members so this compiles again
--HG--
extra : convert_revision : svn%3A99687598-2e92-11dd-8019-fe7b9d601d1b/trunk%403400
| bsd-3-clause | PersonifyInc/growl,incbee/Growl,PersonifyInc/growl,incbee/Growl,incbee/Growl,incbee/Growl,PersonifyInc/growl,PersonifyInc/growl,PersonifyInc/growl,incbee/Growl | 607893ef3f8ff351c68e8a057704d40a34c56872 |
#include <errno.h>
#include "iobuf.h"
#include "iopoll.h"
int iobuf_timeout(iobuf* io, int poll_out)
{
iopoll_fd pfd;
int result;
if (!io->timeout) return 1;
pfd.fd = io->fd;
pfd.events = poll_out ? IOPOLL_WRITE : IOPOLL_READ;
while ((result = iopoll(&pfd, 1, io->timeout)) == -1) {
if (errno == EAG... | #include <errno.h>
#include <sys/poll.h>
#include "iobuf.h"
int iobuf_timeout(iobuf* io, int poll_out)
{
struct pollfd pfd;
int result;
if (!io->timeout) return 1;
pfd.fd = io->fd;
pfd.events = poll_out ? POLLOUT : POLLIN;
while ((result = poll(&pfd, 1, io->timeout)) == -1) {
if (errno == EAGAIN) c... | ---
+++
@@ -1,17 +1,17 @@
#include <errno.h>
-#include <sys/poll.h>
#include "iobuf.h"
+#include "iopoll.h"
int iobuf_timeout(iobuf* io, int poll_out)
{
- struct pollfd pfd;
+ iopoll_fd pfd;
int result;
if (!io->timeout) return 1;
pfd.fd = io->fd;
- pfd.events = poll_out ? POLLOUT : POLLIN;
- ... | Use iopoll instead of poll directly.
| lgpl-2.1 | bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs | 9cbbb1707f067cd7806a6a408e9e25a258649209 |
#include <stdio.h>
void print_fib(int n)
{
int a = 0;
int b = 1;
while (a < n)
{
int old_a = a;
printf("%d ", a);
a = b;
b = old_a + b;
}
}
int main()
{
print_fib(500);
printf("\n");
return 0;
}
| #include <stdio.h>
void print_fib(int n)
{
int a = 0;
int b = 1;
while (a < n)
{
printf("%d ", a);
int old_a = a;
a = b;
b = old_a + b;
}
}
int main()
{
print_fib(500);
printf("\n");
return 0;
}
| ---
+++
@@ -6,9 +6,8 @@
int b = 1;
while (a < n)
{
+ int old_a = a;
printf("%d ", a);
-
- int old_a = a;
a = b;
b = old_a + b;
} | Fix variable declaration non-conformant to C89
Declaring variables on C89 need to be done at the beginning of the
function scope. The old code failed on VS2010. | bsd-3-clause | webmaster128/clcache,webmaster128/clcache,webmaster128/clcache | c8bb5693469744e0deeb03a552f190faa2146764 |
#include <stdlib.h>
#include <ncurses.h>
#include <time.h>
typedef struct {
} AtcsoData;
void mainloop();
WINDOW *createRadarWin();
void updateRadarWin(AtcsoData *data, WINDOW *radarWin);
/**
* The main function, called when atcso is started (duh).
*/
int main(int argc, char **argv) {
initscr();
raw(); ... | #include <stdlib.h>
#include <ncurses.h>
/**
* The main function, called when atcso is started (duh).
*/
int main(int argc, char** argv) {
initscr();
raw(); // Disable line buffering
noecho(); // Don't show things the user is typing
printw("hai wurld");
refresh();
while (getch() != ... | ---
+++
@@ -1,20 +1,90 @@
#include <stdlib.h>
#include <ncurses.h>
+#include <time.h>
+
+
+typedef struct {
+} AtcsoData;
+
+
+void mainloop();
+WINDOW *createRadarWin();
+void updateRadarWin(AtcsoData *data, WINDOW *radarWin);
/**
* The main function, called when atcso is started (duh).
*/
-int main(int a... | Implement outline of "radar window"
The radar window is simply the "main" window, with all the planes and
stuff.
This commit draws the outline of this window, and it also adds a few
pieces of code that will serve as a framework for future inter-window
communication.
| mit | KeyboardFire/atcso | 1d092135d5973e22550e260c944c2c5e7678923a |
#ifndef ROOT_RVersion
#define ROOT_RVersion
/* Version information automatically generated by installer. */
/*
* These macros can be used in the following way:
*
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h>
* #else
* #include <oldheader.h>
* #endif
*
*/
#defin... | #ifndef ROOT_RVersion
#define ROOT_RVersion
/* Version information automatically generated by installer. */
/*
* These macros can be used in the following way:
*
* #if ROOT_VERSION_CODE >= ROOT_VERSION(2,23,4)
* #include <newheader.h>
* #else
* #include <oldheader.h>
* #endif
*
*/
#defin... | ---
+++
@@ -14,13 +14,13 @@
*
*/
-#define ROOT_RELEASE "5.34/22"
-#define ROOT_RELEASE_DATE "Oct 10 2014"
-#define ROOT_RELEASE_TIME "15:29:14"
+#define ROOT_RELEASE "5.34/23"
+#define ROOT_RELEASE_DATE "Nov 7 2014"
+#define ROOT_RELEASE_TIME "15:06:58"
#define ROOT_SVN_REVISION 49361
-#define ROOT_GIT_COMMIT ... | Update ROOT version files to v5.34/23.
| lgpl-2.1 | tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot,tc3t/qoot | 80867bf2320444893e7248bead8b63aec23993a4 |
/*
* mjs copyright
*/
/*
* Obtain memory configuration information from the BIOS
*
* Note that we don't try too hard here; knowing the size of
* base memory and extended memory out to 16 or 64M is enough for
* the requirements of the bootstrap.
*
* We also maintain a pointer to the top of physical memory
* o... | /*
* mjs copyright
*/
/*
* Obtain memory configuration information from the BIOS
*
* Note that we don't try too hard here; knowing the size of
* base memory and extended memory out to 16 or 64M is enough for
* the requirements of the bootstrap.
*
* We also maintain a pointer to the top of physical memory
* o... | ---
+++
@@ -24,7 +24,7 @@
getbasemem(void)
{
v86.ctl = 0;
- v86.addr = 0x1a; /* int 0x12 */
+ v86.addr = 0x12; /* int 0x12 */
v86int();
return(v86.eax & 0xffff);
@@ -39,7 +39,7 @@
int extkb;
v86.ctl = 0;
- v86.addr = 0x15; /* int 0x12 function 0x88*/
+ v86.addr = 0x1... | Fix typos.. The vector for "int 0x12" (get base mem) is not written in
hex as "0x1a". :-)
Fix a comment about the extended memory checks, that's int 0x15.
| 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 | 3a7eff1835fa925382f1130d6fdc34cf4d2966b1 |
/*-
* Copyright (c) 2004 David E. O'Brien
* Copyright (c) 2004 Andrey A. Chernov
* 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... | /* $FreeBSD$ */
#warning "<gnuregex.h> has been replaced by <gnu/regex.h>"
#include <gnu/regex.h>
| ---
+++
@@ -1,3 +1,33 @@
-/* $FreeBSD$ */
+/*-
+ * Copyright (c) 2004 David E. O'Brien
+ * Copyright (c) 2004 Andrey A. Chernov
+ * 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.... | Allow to compile with non-GCC compiler.
| 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 | 6dde82a036afb3d1a6e012f2f8273b401c8b47d1 |
/*
* Copyright 2014 MongoDB, 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 to ... | /*
* Copyright 2014 MongoDB, 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 to ... | ---
+++
@@ -21,10 +21,11 @@
#include <bson.h>
-#ifndef _WIN32
+#ifdef _WIN32
+# include <stddef.h>
+#else
# include <sys/uio.h>
#endif
-
BSON_BEGIN_DECLS
@@ -35,6 +36,11 @@
u_long iov_len;
char *iov_base;
} mongoc_iovec_t;
+
+BSON_STATIC_ASSERT(sizeof(mongoc_iovec_t) == sizeof(WSABUF));
+BSON_... | CDRIVER-756: Make sure our iovec abstraction is compatible with Windows WSABUF
We cast mongoc_iovec_t to LPWSABUF in our sendmsg() wrapper
| apache-2.0 | ajdavis/mongo-c-driver,rcsanchez97/mongo-c-driver,acmorrow/mongo-c-driver,ajdavis/mongo-c-driver,rcsanchez97/mongo-c-driver,derickr/mongo-c-driver,christopherjwang/mongo-c-driver,christopherjwang/mongo-c-driver,jmikola/mongo-c-driver,derickr/mongo-c-driver,jmikola/mongo-c-driver,acmorrow/mongo-c-driver,beingmeta/mongo-... | 724948b4d891a91e2912497c1a3e544543b501b1 |
/*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | ---
+++
@@ -26,11 +26,11 @@
extern "C" {
#endif
-inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); }
+static inline uint16_t bswap_16(uint16_t n) { return __builtin_bswap16(n); }
-inline uint32_t bswap_32(uint32_t n) { return __builtin_bswap32(n); }
+static inline uint32_t bswap_32(uint32_t n)... | Declare bswap functions as static inline
Change declaration to static inline to avoid multiple definition
during linking.
PiperOrigin-RevId: 207000800
| apache-2.0 | google/asylo,google/asylo,google/asylo,google/asylo,google/asylo,google/asylo | 0ded12b69f0834a48f2310cc7f1a5f1852b2b41f |
/*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _LIBYAUL_H_
#define _LIBYAUL_H_
/* CPU-bus CPU */
#include <cpu.h>
/* CPU-bus SMPC */
#include <smpc.h>
/* SCU */
#include <scu.h>
/* CS0 */
#include <arp.h>
#include <dram-cartridge.h>
#in... | /*
* Copyright (c) 2012-2014 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#ifndef _LIBYAUL_H_
#define _LIBYAUL_H_
/* CPU */
#include <cpu.h>
/* SCU */
#include <scu.h>
/* CS0 */
#include <arp.h>
#include <dram-cartridge.h>
#include <usb-cartridge.h>
/* CS2 */
#include <c... | ---
+++
@@ -8,8 +8,11 @@
#ifndef _LIBYAUL_H_
#define _LIBYAUL_H_
-/* CPU */
+/* CPU-bus CPU */
#include <cpu.h>
+
+/* CPU-bus SMPC */
+#include <smpc.h>
/* SCU */
#include <scu.h>
@@ -22,14 +25,14 @@
/* CS2 */
#include <cd-block.h>
-/* VDP1 */
+/* B-bus VDP1 */
#include <vdp1.h>
-/* VDP2 */
+/* B-bus ... | Add missing header (for SCSP)
| mit | ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul | e59e627e6e8ef1baab2dcd79e5b28f1a6d31978c |
// ext/foo/foo_vector.h
// Declarations for wrapped struct
#ifndef FOO_VECTOR_H
#define FOO_VECTOR_H
#include <ruby.h>
#include <math.h>
// Ruby 1.8.7 compatibility patch
#ifndef DBL2NUM
#define DBL2NUM( dbl_val ) rb_float_new( dbl_val )
#endif
void init_foo_vector( VALUE parent_module );
// This is the struct t... | // ext/foo/foo_vector.h
// Declarations for wrapped struct
#ifndef FOO_VECTOR_H
#define FOO_VECTOR_H
#include <ruby.h>
#include <math.h>
// Ruby 1.8.7 compatibility patch
#ifndef DBL2NUM
#define DBL2NUM( dbl_val ) rb_float_new( dbl_val )
#endif
void init_foo_vector( VALUE parent_module );
// This is the struct t... | ---
+++
@@ -23,4 +23,9 @@
double z;
} FVStruct;
+FVStruct *create_fv_struct();
+void destroy_fv_struct( FVStruct *fv );
+FVStruct *copy_fv_struct( FVStruct *orig );
+double fv_magnitude( FVStruct *fv );
+
#endif | Add sharable methods to header file
| mit | neilslater/ruby_nex_c,neilslater/ruby_nex_c | fbc9dce9bce1097692f5ce1bbab2d6b4ac2297e6 |
// RUN: %ucc -o %t %s
// RUN: %ocheck 0 %t
// RUN: %t | %output_check 'Hello 5 5.9' '7.3 8.7 10.1 11.5 12.9 14.3 15.7 17.1 18.5 19.9' 'Hello 5 15.7' '14.3 12.9 11.5 10.1 8.7 7.3 5.9 4.5 3.1 1.7 0.3'
// should run without segfaulting
main()
{
printf("Hello %d %.1f\n"
"%.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %... | // RUN: %ucc -o %t %s
// RUN: %ocheck 0 %t
// RUN: %t | %output_check 'Hello 5 2.3' 'Hello 5 2.3'
// should run without segfaulting
main()
{
printf("Hello %d %.1f\n",
5,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3); // this causes an infinite loop in glibc's printf()
pr... | ---
+++
@@ -1,38 +1,41 @@
// RUN: %ucc -o %t %s
// RUN: %ocheck 0 %t
-// RUN: %t | %output_check 'Hello 5 2.3' 'Hello 5 2.3'
+// RUN: %t | %output_check 'Hello 5 5.9' '7.3 8.7 10.1 11.5 12.9 14.3 15.7 17.1 18.5 19.9' 'Hello 5 15.7' '14.3 12.9 11.5 10.1 8.7 7.3 5.9 4.5 3.1 1.7 0.3'
+
// should run without segfaul... | Format strings and more through test for stack floats
| mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler | df717db1600e062dcd96be7ba4ae431252d578dd |
/* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| /* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
/*
* On Origin and Octane families, DMA to 32-bit PCI devices is restricted.
*
* Systems with physical mem... | ---
+++
@@ -1,21 +1,10 @@
-/* $OpenBSD: vmparam.h,v 1.9 2011/05/30 22:25:22 oga Exp $ */
+/* $OpenBSD: vmparam.h,v 1.10 2014/07/13 15:48:32 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
-/*
- * O... | Remove stale comment which used to explain why we had a special 31-bit freelist
for DMA, back when this was applicable.
| isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars | 1b30978d7c553bdb9786286374f02c9e41ebb6bd |
#ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
virtual Action *close(EventCallback *);
virtual Action *read(size_t, EventCallback *);
virtual Action *write(B... | #ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
virtual Action *close(EventCallback *);
virtual Action *read(size_t, EventCallback *);
virtual Action *write(B... | ---
+++
@@ -17,7 +17,7 @@
virtual bool shutdown(bool, bool)
{
- return (false);
+ return (true);
}
};
| Return success rather than failure from shutdown() on FileDescriptor, since it
is entirely immaterial.
| bsd-2-clause | wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy | cd73593a424a38f7e79b749086d6e3543ba88356 |
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | ---
+++
@@ -31,11 +31,11 @@
set_ = true;
}
- bool has_value() { return set_; }
+ bool has_value() const { return set_; }
void reset() { set_ = false; }
- T value() { return value_; }
+ T value() const { return value_; }
private:
T value_; | Add const qualifiers to member methods in Optional
| apache-2.0 | jboeuf/grpc,ejona86/grpc,stanley-cheung/grpc,ctiller/grpc,sreecha/grpc,ctiller/grpc,nicolasnoble/grpc,sreecha/grpc,ctiller/grpc,donnadionne/grpc,donnadionne/grpc,sreecha/grpc,ctiller/grpc,ctiller/grpc,pszemus/grpc,muxi/grpc,jtattermusch/grpc,vjpai/grpc,jboeuf/grpc,vjpai/grpc,grpc/grpc,firebase/grpc,sreecha/grpc,jtatter... | bf8777dc307e2938a7d7e02ff761580b9917f529 |
// mruby libraries
#include "mruby.h"
#include "mruby/array.h"
#include "mruby/data.h"
#include "mruby/string.h"
#include <X11/Xlib.h>
mrb_value x11_simple_test(mrb_state* mrb, mrb_value self)
{
Display* dpy = XOpenDisplay(NULL);
Window* win = mrb_malloc(mrb, sizeof(Window));
*win = XCreateSimpleWindow(dpy, Def... | // mruby libraries
#include "mruby.h"
#include "mruby/array.h"
#include "mruby/data.h"
#include "mruby/string.h"
#include <X11/Xlib.h>
mrb_value x11_simple_test(mrb_state* mrb, mrb_value self)
{
Display *dpy = XOpenDisplay(NULL);
Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 256, 256, 0, 0, ... | ---
+++
@@ -8,12 +8,12 @@
mrb_value x11_simple_test(mrb_state* mrb, mrb_value self)
{
- Display *dpy = XOpenDisplay(NULL);
- Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0, 256, 256, 0, 0, 0);
- XMapWindow(dpy, win);
+ Display* dpy = XOpenDisplay(NULL);
+ Window* win = mrb_malloc(mrb, siz... | Return an adress of Window object.
| mit | dyama/mruby-x11-simple,dyama/mruby-x11-simple | 21198b75ca5bb408bd77a54232418b8aef8ce8dc |
#ifndef FILESYSTEM_H
#define FILESYSTEM_H
#include "Partition.h"
#include <vector>
#include <string>
class Directory;
enum class FileType {
File, Directory
};
class File : public HDDBytes {
public:
virtual FileType getType();
virtual Directory * dir() {return nullptr;};
};
class Directory : public ... | #ifndef FILESYSTEM_H
#define FILESYSTEM_H
#include "Partition.h"
#include <vector>
#include <string>
class Directory;
enum class FileType {
File, Directory
};
class File : public HDDBytes {
std::string _name;
public:
std::string getName(){return _name;}
//virtual void setName(const std::string& ... | ---
+++
@@ -12,11 +12,7 @@
};
class File : public HDDBytes {
- std::string _name;
public:
- std::string getName(){return _name;}
- //virtual void setName(const std::string& name) = 0;
- //virtual Directory * getParent() = 0; // null => root directory
virtual FileType getType();
virtual ... | Remove unused methods in File
| mit | TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres,TWal/ENS_sysres | 9dc6b784c3c1a4c800ee111e2d317d2ddd02fb2b |
// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR3459
struct bar {
char n[1];
};
struct foo {
char name[(int)&((struct bar *)0)->n];
char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
};
// PR3430
struct s {
struct st {
int v;
} *ts;
};
struct st;
int foo() {
stru... | // RUN: %clang_cc1 -fsyntax-only -verify %s
// PR3459
struct bar {
char n[1];
};
struct foo {
char name[(int)&((struct bar *)0)->n];
char name2[(int)&((struct bar *)0)->n - 1]; //expected-error{{array size is negative}}
};
// PR3430
struct s {
struct st {
int v;
} *ts;
};
struct st;
int foo() {
stru... | ---
+++
@@ -41,3 +41,8 @@
};
struct s0 f0(void) {}
+
+// <rdar://problem/8177927> - This previously triggered an assertion failure.
+struct x0 {
+ unsigned int x1;
+}; | Add test case for <rdar://problem/8177927> (which triggered an assertion failure in SemaChecking).
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@108159 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... | cfd41cfd0bd199672449db88d0502d37131a5c1f |
#ifndef PLUGIN_H_
#define PLUGIN_H_
#include <windows.h>
// TODO use __stdcall
#define EXPORT_CALLING __cdecl
#define EXPORT __declspec(dllexport) EXPORT_CALLING
#include "common.h"
// just defined to make compilation work ; ignored
#define RTLD_DEFAULT NULL
#define RTLD_LOCAL -1
#define RTLD_LAZY -1
static i... | #ifndef PLUGIN_H_
#define PLUGIN_H_
#include <windows.h>
#define EXPORT_CALLING __stdcall
#define EXPORT __declspec(dllexport) EXPORT_CALLING
#include "common.h"
// just defined to make compilation work ; ignored
#define RTLD_DEFAULT NULL
#define RTLD_LOCAL -1
#define RTLD_LAZY -1
static inline void *dlopen(c... | ---
+++
@@ -3,7 +3,8 @@
#include <windows.h>
-#define EXPORT_CALLING __stdcall
+// TODO use __stdcall
+#define EXPORT_CALLING __cdecl
#define EXPORT __declspec(dllexport) EXPORT_CALLING
#include "common.h" | Switch to __cdecl till we get --kill-at to work
With this build, 32-bit windows DLL loads and checks out, but we really
want to use __stdcall for the DLL entry points.
| mit | kulp/tenyr,kulp/tenyr,kulp/tenyr | 2e1f71bdc24f162a88b0262350743d641b67bc4d |
#ifndef FFTW_HAO_H
#define FFTW_HAO_H
#include "fftw_define.h"
class FFTServer
{
public:
int dimen;
int* n;
int L;
std::complex<double>* inforw;
std::complex<double>* outforw;
std::complex<double>* inback;
std::complex<double>* outback;
fftw_plan planforw;
fftw_plan planback;
... | #ifndef FFTW_HAO_H
#define FFTW_HAO_H
#include "fftw_define.h"
class FFTServer
{
int dimen;
int* n;
int L;
std::complex<double>* inforw;
std::complex<double>* outforw;
std::complex<double>* inback;
std::complex<double>* outback;
fftw_plan planforw;
fftw_plan planback;
public:
... | ---
+++
@@ -5,6 +5,7 @@
class FFTServer
{
+ public:
int dimen;
int* n;
int L;
@@ -14,7 +15,7 @@
std::complex<double>* outback;
fftw_plan planforw;
fftw_plan planback;
- public:
+
FFTServer();
FFTServer(int Dc, const int* Nc, char format); //'C' Column-major: fortran style... | Remove friend function in FFTServer.
| mit | hshi/fftw_lib_hao,hshi/fftw_lib_hao | d6631b5abcdb414436c0a90bc11ba0cd4808eda0 |
/* metatag.c: Program for adding metadata to a file
* By: Forrest Kerslager, Nick Noto, David Taylor, Kevin Yeap,
* Connie Yu
*
* 2014/06/06
* */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LEN 1024
int main(int argc, char** argv){
char* buffer;
int fd, i, len;
i... | /* metatag.c: Program for adding metadata to a file
* By: Forrest Kerslager, Nick Noto, David Taylor, Kevin Yeap,
* Connie Yu
*
* 2014/06/06
* */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char** argv){
char* buffer;
int fd, i, len;
if(argc < 3){
... | ---
+++
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include <string.h>
+#define MAX_LEN 1024
int main(int argc, char** argv){
char* buffer;
@@ -29,6 +30,10 @@
strcat(buffer, " ");
}
len = strlen(buffer);
+ if(len > MAX_LEN-1){
+ fprintf(stderr, "Input stream exceeds max length\n");
+... | Add max length error check
| mit | dmtaylor/cmps111-proj4,dmtaylor/cmps111-proj4 | 97d3b3cf2a7b220c34f7b467129fe9de8558e2be |
// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
#include <wchar.h>
struct {
wchar_t *name;
} syms = { L"NUL" };
| // RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
// XFAIL: *
// See PR2452
struct {
int *name;
} syms = { L"NUL" };
| ---
+++
@@ -1,7 +1,7 @@
// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
-// XFAIL: *
-// See PR2452
+
+#include <wchar.h>
struct {
- int *name;
+ wchar_t *name;
} syms = { L"NUL" }; | Fix a warning, closing PR2452
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@52529 91177308-0d34-0410-b5e6-96231b3b80d8
| bsd-2-clause | dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chub... | a3de6e9ab8fbd4c9462880dc5c138488b322efd0 |
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel_structs.h>
#include <cmsis_os.h>
#include <ksched.h>
extern const k_tid_t _main_thread;
/**
* @brief Get the RTOS kernel system timer counter
*/
uint32_t osKernelSysTick(void)
{
return k_cycle_get_32();
}
/*... | /*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel_structs.h>
#include <cmsis_os.h>
#include <ksched.h>
extern const k_tid_t _main_thread;
/**
* @brief Get the RTOS kernel system timer counter
*/
uint32_t osKernelSysTick(void)
{
return k_cycle_get_32();
}
/*... | ---
+++
@@ -31,7 +31,10 @@
*/
osStatus osKernelStart(void)
{
- return osOK;
+ if (_is_in_isr()) {
+ return osErrorISR;
+ }
+ return osOK;
}
/** | lib/cmsis_rtos_v1: Check if osKernelStart() is called from ISR
Check if osKernelStart() is called from ISR and return error code
appropriately.
Signed-off-by: Spoorthi K <c4ff46ff4cba9c2c6c6c9d55497ae534451b4309@intel.com>
| apache-2.0 | explora26/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,punitvara/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,punitvara/z... | 0b8792c05c59b3eb9dad6eb054618d8e9f7cacc7 |
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <glib.h>
#include "td-radio.h"
#include "td-radio-scan.h"
/*
* Send the RESPONDER message to the radio.
*/
in... |
#include <errno.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <glib.h>
#include "td-radio.h"
#include "td-radio-scan.h"
/*
* Send the RESPONDER message to the radio.
*/
in... | ---
+++
@@ -21,34 +21,18 @@
*/
int radio_read(int fd, char* buffer)
{
- bool debug = true;
+ bool debug = false;
int bytes = 0;
memset(buffer, '\0', BUFFER_SZ);
- if (debug) {
- g_message("radio_read(): enter");
- g_message("\ts_addr = %d", radio_address.sin_addr.s_addr);
- g_message("\tsin_port = %d"... | Clean up some debugging cruft.
| lgpl-2.1 | ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead | 1581fbd86b5beb465b07d575fc74e61073ec8893 |
//
// RNSketchManager.m
// RNSketch
//
// Created by Jeremy Grancher on 28/04/2016.
// Copyright © 2016 Jeremy Grancher. All rights reserved.
//
#if __has_include(<React/RCTViewManager.h>)
// React Native >= 0.40
#import <React/RCTViewManager.h>
#else
// React Native <= 0.39
#import "RCTViewManager.h"
#endif
#impo... | //
// RNSketchManager.m
// RNSketch
//
// Created by Jeremy Grancher on 28/04/2016.
// Copyright © 2016 Jeremy Grancher. All rights reserved.
//
#import "RCTViewManager.h"
#import "RNSketch.h"
@interface RNSketchManager : RCTViewManager
@property (strong) RNSketch *sketchView;
@end;
| ---
+++
@@ -6,7 +6,13 @@
// Copyright © 2016 Jeremy Grancher. All rights reserved.
//
+#if __has_include(<React/RCTViewManager.h>)
+// React Native >= 0.40
+#import <React/RCTViewManager.h>
+#else
+// React Native <= 0.39
#import "RCTViewManager.h"
+#endif
#import "RNSketch.h"
@interface RNSketchManager : R... | Support RN 0.40 headers while retaining backwards compatibility.
Use #if to conditionally import React headers. | mit | jgrancher/react-native-sketch | 69ec185fd5de8c133808a5aeec5b0435a3d2025e |
#ifndef SAUCE_MEMORY_H_
#define SAUCE_MEMORY_H_
#if SAUCE_STD_SMART_PTR
#include <sauce/internal/memory/std.h>
#elif SAUCE_STD_TR1_SMART_PTR
#include <sauce/internal/memory/tr1.h>
#elif SAUCE_BOOST_SMART_PTR
#include <sauce/internal/memory/boost.h>
#else
#include <sauce/internal/memory/std.h>
#endif
#endif //... | #ifndef SAUCE_MEMORY_H_
#define SAUCE_MEMORY_H_
#if SAUCE_STD_SMART_PTR
#include <sauce/internal/memory/std.h>
#elif SAUCE_STD_TR1_SMART_PTR
#include <sauce/internal/memory/tr1.h>
#elif SAUCE_BOOST_SMART_PTR
#include <sauce/internal/memory/boost.h>
#else
#error Please define SAUCE_STD_SMART_PTR, SAUCE_STD_TR1_... | ---
+++
@@ -8,7 +8,7 @@
#elif SAUCE_BOOST_SMART_PTR
#include <sauce/internal/memory/boost.h>
#else
- #error Please define SAUCE_STD_SMART_PTR, SAUCE_STD_TR1_SMART_PTR or SAUCE_BOOST_SMART_PTR
+ #include <sauce/internal/memory/std.h>
#endif
#endif // SAUCE_MEMORY_H_ | Use standard smart pointers by default.
| mit | phs/sauce,phs/sauce,phs/sauce,phs/sauce | ce941743ce1eefc51c98401514f9165d6d66040e |
#define VT_POINT 1
#define VT_LINE 2
#define VT_POLYGON 3
#define VT_END 0
#define VT_MOVETO 1
#define VT_LINETO 2
#define VT_CLOSEPATH 7
#define VT_STRING 1
#define VT_NUMBER 2
#define VT_BOOLEAN 7
struct pool;
void deserialize_int(char **f, int *n);
struct pool_val *deserialize_string(char **f, struct pool *p, in... | #define VT_POINT 1
#define VT_LINE 2
#define VT_POLYGON 3
#define VT_END 0
#define VT_MOVETO 1
#define VT_LINETO 2
#define VT_CLOSEPATH 7
#define VT_STRING 1
#define VT_NUMBER 2
#define VT_BOOLEAN 7
struct pool;
void deserialize_int(char **f, int *n);
struct pool_val *deserialize_string(char **f, struct pool *p, in... | ---
+++
@@ -18,9 +18,9 @@
struct index {
- unsigned long long index;
- long long fpos;
- int maxzoom;
+ unsigned long long index;
+ long long fpos : 56;
+ int maxzoom : 8;
};
long long write_tile(struct index *start, struct index *end, char *metabase, unsigned *file_bbox, int z, unsigned x, uns... | Use a bitfield to make the index 2/3 the size, to save some disk churn
| bsd-2-clause | joykuotw/tippecanoe,mapbox/tippecanoe,mapbox/tippecanoe,joykuotw/tippecanoe,mapbox/tippecanoe,landsurveyorsunited/tippecanoe,mapbox/tippecanoe,landsurveyorsunited/tippecanoe | 097d6ccf7da44013c6d28fea7dce23708b77a044 |
#include <stdio.h>
#include <stdlib.h>
#include <vulkan/vulkan.h>
VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
VkDebugUtilsMessageTypeFlagsEXT messageType,
const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *... | #include <stdio.h>
#include <stdlib.h>
#include <vulkan/vulkan.h>
VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
VkDebugUtilsMessageTypeFlagsEXT messageType,
const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *... | ---
+++
@@ -16,12 +16,9 @@
VkDebugUtilsMessageTypeFlagsEXT messageType,
const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
void *pUserData) {
- int errorBitSet = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT & messageSeverity;
- int isError = VK_DE... | Write debugCallbackFatal in terms of debugCallback
| bsd-3-clause | expipiplus1/vulkan,expipiplus1/vulkan,expipiplus1/vulkan | cd84c7964893696d19844fdd281095ad57c109b2 |
/**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2008 Appcelerator, Inc. All Rights Reserved.
*/
#ifndef TITANIUM_URL_H_
#define TITANIUM_URL_H_
#ifndef KEYVALUESTRUCT
typedef struct {
char* key;
char* val... | /**
* Appcelerator Titanium - licensed under the Apache Public License 2
* see LICENSE in the root folder for details on the license.
* Copyright (c) 2008 Appcelerator, Inc. All Rights Reserved.
*/
#ifndef TITANIUM_URL_H_
#define TITANIUM_URL_H_
namespace ti
{
void NormalizeURLCallback(const char* url, char* buff... | ---
+++
@@ -6,6 +6,15 @@
#ifndef TITANIUM_URL_H_
#define TITANIUM_URL_H_
+
+#ifndef KEYVALUESTRUCT
+typedef struct {
+ char* key;
+ char* value;
+} KeyValuePair;
+#define KEYVALUESTRUCT 1
+#endif
+
namespace ti
{
void NormalizeURLCallback(const char* url, char* buffer, int bufferLength); | Include KeyValuePair definition, if needed.
| apache-2.0 | wyrover/titanium_desktop,appcelerator/titanium_desktop,appcelerator/titanium_desktop,jvkops/titanium_desktop,jvkops/titanium_desktop,wyrover/titanium_desktop,wyrover/titanium_desktop,jvkops/titanium_desktop,wyrover/titanium_desktop,wyrover/titanium_desktop,appcelerator/titanium_desktop,appcelerator/titanium_desktop,jvk... | 7575a6a3eec8a72cb36276f11924ad7a77185c43 |
#ifndef _SWAY_EXTENSIONS_H
#define _SWAY_EXTENSIONS_H
#include <wayland-server.h>
#include <wlc/wlc-wayland.h>
#include "wayland-desktop-shell-server-protocol.h"
#include "list.h"
struct background_config {
wlc_handle output;
wlc_resource surface;
// we need the wl_resource of the surface in the destructor
struct... | #ifndef _SWAY_EXTENSIONS_H
#define _SWAY_EXTENSIONS_H
#include <wayland-server.h>
#include <wlc/wlc-wayland.h>
#include "wayland-desktop-shell-server-protocol.h"
#include "list.h"
struct background_config {
wlc_handle output;
wlc_resource surface;
// we need the wl_resource of the surface in t... | ---
+++
@@ -7,37 +7,37 @@
#include "list.h"
struct background_config {
- wlc_handle output;
- wlc_resource surface;
- // we need the wl_resource of the surface in the destructor
- struct wl_resource *wl_surface_res;
- // used to determine if client is a background
+ wlc_handle o... | Fix formatting guide violations (spaces instead of tabs)
| mit | 1ace/sway,sleep-walker/sway,mikkeloscar/sway,taiyu-len/sway,1ace/sway,ascent12/sway,ascent12/sway,4e554c4c/sway,ascent12/sway,mikkeloscar/sway,sleep-walker/sway,johalun/sway,SirCmpwn/sway,4e554c4c/sway,ptMuta/sway,1ace/sway,taiyu-len/sway,taiyu-len/sway | d9bcea381a69ebc6367aede7816b8e27d5fc9417 |
#pragma once
#include "drake/drakeOptimization_export.h"
#include "drake/solvers/MathematicalProgram.h"
namespace drake {
namespace solvers {
class DRAKEOPTIMIZATION_EXPORT LinearSystemSolver :
public MathematicalProgramSolverInterface {
public:
bool available() const override;
SolutionResult Solve(Opti... | #pragma once
#include "drake/drakeOptimization_export.h"
#include "drake/solvers/MathematicalProgram.h"
namespace drake {
namespace solvers {
class DRAKEOPTIMIZATION_EXPORT LinearSystemSolver :
public MathematicalProgramSolverInterface {
public:
// This solver is implemented in various pieces depending on... | ---
+++
@@ -10,8 +10,6 @@
class DRAKEOPTIMIZATION_EXPORT LinearSystemSolver :
public MathematicalProgramSolverInterface {
public:
- // This solver is implemented in various pieces depending on if
- // Ipopt was available during compilation.
bool available() const override;
SolutionResult Solve(Opti... | Remove errant comment from copypasta
| bsd-3-clause | billhoffman/drake,sheim/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,billhoffman/drake,sheim/drake,sheim/drake,billhoffman/drake,sheim/drake | 42e4da04ad4740ab12e955f67c36b557d8a56169 |
/*
* startup.h
*
* Created on: Nov 15, 2016
* Author: RoyerAriel
*/
#ifndef STARTUP_C_
#define STARTUP_C_
#include "Timer.h"
void startup()
{
//Start Systick Timer at 1ms
Systick_Startup();
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; //0x2000000disable jtag
}
#endif /* STARTU... | /*
* startup.h
*
* Created on: Nov 15, 2016
* Author: RoyerAriel
*/
#ifndef STARTUP_C_
#define STARTUP_C_
#include "Timer.h"
void startup()
{
//Start Systick Timer at 1ms
Systick_Startup();
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; //0x2000000
}
#endif /* STARTUP_C_ */
| ---
+++
@@ -13,7 +13,7 @@
{
//Start Systick Timer at 1ms
Systick_Startup();
- AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; //0x2000000
+ AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; //0x2000000disable jtag
}
| Disable Jtag came enable by default
Disable Jtag came enable by default and use GPIOB P04,P03 and P05 | epl-1.0 | royel21/STM32F103GNU,royel21/STM32F103GNU | 27e5d7c74125784cb278b44e12881ca3596ee868 |
/* Copyright (C) 2015 Joakim Plate
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is... | /* Copyright (C) 2015 Joakim Plate
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is... | ---
+++
@@ -20,6 +20,9 @@
#include "TcpIp.h"
+#define SOAD_MODULEID 56u
+#define SOAD_INSTANCEID 0u
+
typedef struct {
uint8 dummy;
} SoAd_SocketConnection; | Add moduleid and instance id
| lgpl-2.1 | elupus/autosar-soad,elupus/autosar-soad | a7deb40634762debd15fe2e3f13c869aef9608d8 |
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Module: $URL$
Copyright (c) 2006-2010 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is dist... | /*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Module: $URL$
Copyright (c) 2006-2010 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is dist... | ---
+++
@@ -20,7 +20,7 @@
#ifdef GDCM_USE_SYSTEM_ZLIB
// $ dpkg -S /usr/include/zlib.h
// zlib1g-dev: /usr/include/zlib.h
-# include <zlib.h>
+# include <itk_zlib.h>
#else
# include <gdcmzlib/zlib.h>
#endif | Make sure to use proper name mangling
| apache-2.0 | ajjl/ITK,vfonov/ITK,hinerm/ITK,richardbeare/ITK,LucHermitte/ITK,fedral/ITK,LucHermitte/ITK,atsnyder/ITK,spinicist/ITK,LucHermitte/ITK,blowekamp/ITK,rhgong/itk-with-dom,spinicist/ITK,LucasGandel/ITK,fuentesdt/InsightToolkit-dev,daviddoria/itkHoughTransform,heimdali/ITK,eile/ITK,jcfr/ITK,CapeDrew/DCMTK-ITK,fuentesdt/Insi... | 4c73133037265abea9f8c6706197fbed6326630b |
#ifndef SAXBOPHONE_RISKY_RISKY_H
#define SAXBOPHONE_RISKY_RISKY_H
#include <stdint.h>
#ifdef __cplusplus
extern "C"{
#endif
// struct for representing version of RISKY
typedef struct version_t {
uint8_t major;
uint8_t minor;
uint8_t patch;
} version_t;
// enum for storing information about the error st... | #ifndef SAXBOPHONE_RISKY_RISKY_H
#define SAXBOPHONE_RISKY_RISKY_H
#include <stdint.h>
#ifdef __cplusplus
extern "C"{
#endif
typedef struct version_t {
uint8_t major;
uint8_t minor;
uint8_t patch;
} version_t;
extern const version_t VERSION;
#ifdef __cplusplus
} // extern "C"
#endif
// end of header f... | ---
+++
@@ -8,11 +8,20 @@
extern "C"{
#endif
+// struct for representing version of RISKY
typedef struct version_t {
uint8_t major;
uint8_t minor;
uint8_t patch;
} version_t;
+
+// enum for storing information about the error status of a function
+typedef enum status_t {
+ UNKNOWN = 0,
+ MA... | Add a function return status enum
| mpl-2.0 | saxbophone/risky | 98997692a6a8bf1ae6bbe15dd18ec4e27e0e6fcf |
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD ... | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 8
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD ... | ---
+++
@@ -6,13 +6,13 @@
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
-#define CLIENT_VERSION_MAJOR 0
-#define CLIENT_VERSION_MINOR 8
-#define CLIENT_VERSION_REVISION 7
-#define CLIENT_VERSION_BUILD 5
+#define CLIENT_VERSION_MAJOR 1
+#define CL... | Update client version number and set false for prerelease
| mit | Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin | 3dfdf82baff2eea1b02fcba51ea71fbedb0987a4 |
#ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | #ifndef LLIST_H
#define LLIST_H
/* Doubly linked list */
#define DLLIST_PREPEND(list, item) STMT_START { \
(item)->prev = NULL; \
(item)->next = *(list); \
if (*(list) != NULL) (*(list))->prev = (item); \
*(list) = (item); \
} STMT_END
#define DLLIST_REMOVE(list, item) STMT_START { \
if ((item)->prev == NULL) \... | ---
+++
@@ -14,8 +14,11 @@
*(list) = (item)->next; \
else \
(item)->prev->next = (item)->next; \
- if ((item)->next != NULL) \
+ if ((item)->next != NULL) { \
(item)->next->prev = (item)->prev; \
+ (item)->next = NULL; \
+ } \
+ (item)->prev = NULL; \
} STMT_END
#endif | DLLIST_REMOVE(): Set removed item's prev/next pointers to NULL.
| mit | Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot | adee120a170ac38009f875d4819f89be5eac9198 |
// This file is a part of the OpenSurgSim project.
// Copyright 2013-2016, SimQuest Solutions 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... | // This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions 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/LICE... | ---
+++
@@ -1,5 +1,5 @@
// This file is a part of the OpenSurgSim project.
-// Copyright 2013, SimQuest Solutions Inc.
+// Copyright 2013-2016, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -24,7... | Fix uninitialed member variable in ParticlesShape
The radius was uninitialized when using the ParticlesShape copy
constructor that takes another Vertices type.
| apache-2.0 | simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim,simquest/opensurgsim | 5acf8d688ec5e75ebf8cdc7f29925b0d21ad90b1 |
#include <stdio.h>
#include <string.h>
#include <efivar.h>
#define TEST_GUID EFI_GUID(0x84be9c3e,0x8a32,0x42c0,0x891c,0x4c,0xd3,0xb0,0x72,0xbe,0xcc)
static void
clean_test_environment(void)
{
efi_del_variable(TEST_GUID, "small");
efi_del_variable(TEST_GUID, "large");
}
#define report_error(str) ({fprintf(stderr, ... | #include <stdio.h>
#include <string.h>
#include <efivar.h>
#define TEST_GUID EFI_GUID(0x84be9c3e,0x8a32,0x42c0,0x891c,0x4c,0xd3,0xb0,0x72,0xbe,0xcc)
static void
clean_test_environment(void)
{
efi_del_variable(TEST_GUID, "small");
efi_del_variable(TEST_GUID, "large");
}
#define report_error(str) ({fprintf(stderr, ... | ---
+++
@@ -30,7 +30,9 @@
int rc;
rc = efi_set_variable(TEST_GUID, "small",
smallvalue, strlen(smallvalue)+1,
- EFI_VARIABLE_RUNTIME_ACCESS);
+ EFI_VARIABLE_BOOTSERVICE_ACCESS |
+ EFI_VARIABLE_RUNTIME_ACCESS |
+ EFI_VARIABLE_NON_VOLATILE);
if (rc < 0)
report_error("... | Use flags that will actually work when testing.
| lgpl-2.1 | rhboot/efivar,rhinstaller/efivar,android-ia/vendor_intel_external_efivar,rhinstaller/efivar,rhboot/efivar,CyanogenMod/android_vendor_intel_external_efivar,vathpela/efivar-devel | 3b09a6a7faae7363ffc90749e041788a17559f0f |
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Game... | #ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
//#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Ga... | ---
+++
@@ -5,7 +5,7 @@
#include "LevelSelectState.h"
#include <vector>
-//#define START_WITHOUT_MENU
+#define START_WITHOUT_MENU
class GameStateHandler
{ | UPDATE defined start without menu
| apache-2.0 | Chringo/SSP,Chringo/SSP | ba61ebd978b1f3a7646f220ece3bab09c44c55cd |
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef CRATE_DEMO_GAME_STATE_MANAGER_H
#define CRATE_DEMO_GAME_STATE_MANAGER_H
#include "common/game_state_manager_base.h"
namespace CrateDemo {
class Game... | /* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef CRATE_DEMO_GAME_STATE_MANAGER_H
#define CRATE_DEMO_GAME_STATE_MANAGER_H
#include "common/game_state_manager_interface.h"
namespace CrateDemo {
class... | ---
+++
@@ -7,12 +7,12 @@
#ifndef CRATE_DEMO_GAME_STATE_MANAGER_H
#define CRATE_DEMO_GAME_STATE_MANAGER_H
-#include "common/game_state_manager_interface.h"
+#include "common/game_state_manager_base.h"
namespace CrateDemo {
-class GameStateManager : public Common::IGameStateManager {
+class GameStateManager... | CRATE_DEMO: Update GameStateManager to use new base class name
| apache-2.0 | RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject | 6dfebcd2cca5a3e6cb7668c43ff30c4619026c75 |
/*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once... | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once... | ---
+++
@@ -17,14 +17,15 @@
class CyclesObserver : public folly::fibers::ExecutionObserver {
public:
- void starting() noexcept override {
+ void starting(uintptr_t id) noexcept override {
if (!cycles::start()) {
// Should never happen
DCHECK(false) << "There is already one cycles interval "... | Add 'runnable' callback to ExecutionObserver
Summary: Add a callback when a fiber becomes runnable
Test Plan: unit tests
Reviewed By: @andriigrynenko
Differential Revision: D2081306 | bsd-3-clause | synecdoche/mcrouter,yqzhang/mcrouter,tempbottle/mcrouter,easyfmxu/mcrouter,reddit/mcrouter,is00hcw/mcrouter,nvaller/mcrouter,is00hcw/mcrouter,easyfmxu/mcrouter,easyfmxu/mcrouter,tempbottle/mcrouter,leitao/mcrouter,leitao/mcrouter,facebook/mcrouter,facebook/mcrouter,nvaller/mcrouter,reddit/mcrouter,zhlong73/mcrouter,is0... | 979b40c26118cfc50d27eed458d71020e87dc629 |
#include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv... | #include <stdio.h>
#include "bincookie.h"
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s [Full path to Cookies.binarycookies file]\n", argv[0]);
printf("Example: %s Cookies.binarycookies\n", argv[0]);
return 1;
}
binarycookies_t *bc = binarycookies_init(argv... | ---
+++
@@ -11,19 +11,16 @@
binarycookies_t *bc = binarycookies_init(argv[1]);
unsigned int i, j;
- binarycookies_flag flags;
// Output in Netscape cookies.txt format
for (i = 0; i < bc->num_pages; i++) {
for (j = 0; j < bc->pages[i]->number_of_cookies; j++) {
- flags = ... | Use macro to check security of cookie
| mit | Tatsh/libbinarycookies,Tatsh/libbinarycookies | b56a4389c1ae7ce29e2221db3339ce7a9ec2ff62 |
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2009 Bastian Holst <bastianholst@gmx.de>
//
#ifndef BBCWEATHERITEM_H
#define BBCWE... | //
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2009 Bastian Holst <bastianholst@gmx.de>
//
#ifndef BBCWEATHERITEM_H
#define BBCWE... | ---
+++
@@ -21,6 +21,8 @@
class BBCWeatherItem : public WeatherItem
{
+ Q_OBJECT
+
public:
BBCWeatherItem( QObject *parent = 0 );
~BBCWeatherItem(); | Add Q_OBJECT macro (requested by lupdate).
svn path=/trunk/KDE/kdeedu/marble/; revision=1205732
| lgpl-2.1 | David-Gil/marble-dev,oberluz/marble,quannt24/marble,adraghici/marble,tzapzoor/marble,rku/marble,tzapzoor/marble,David-Gil/marble-dev,utkuaydin/marble,probonopd/marble,quannt24/marble,adraghici/marble,oberluz/marble,adraghici/marble,utkuaydin/marble,Earthwings/marble,Earthwings/marble,oberluz/marble,tzapzoor/marble,utku... | 5c443e8dd6db31588d8926af0ebb6dc60501c5f2 |
/**
* common.h
*
* Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com>
*/
#ifndef GIT_STASHD_COMMON_H
#define GIT_STASHD_COMMON_H
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define _GNU_SOURCE
#define NULL_BYTE 1
#define NOT_FOUND ... | /**
* common.h
*
* Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com>
*/
#ifndef GIT_STASHD_COMMON_H
#define GIT_STASHD_COMMON_H
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define _GNU_SOURCE
#define NOOPT_FOUND_V -1
#define CLEAN... | ---
+++
@@ -16,7 +16,8 @@
#define _GNU_SOURCE
-#define NOOPT_FOUND_V -1
-#define CLEAN_CATCH_V -2
+#define NULL_BYTE 1
+#define NOT_FOUND -1
+#define ERR_CATCH -2
#endif | Add NULL_BYTE macro, rename others
| mit | nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd | f606322980ae5739c9358a5b374da676ce796627 |
#pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class FlowGraphWidget;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockCon... | #pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyView;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI MiniGraph: public QWidget, public DockCon... | ---
+++
@@ -9,7 +9,7 @@
#include "uitypes.h"
class ContextMenuManager;
-class DisassemblyView;
+class FlowGraphWidget;
class Menu;
class ViewFrame;
@@ -17,7 +17,7 @@
{
Q_OBJECT
- DisassemblyView* m_disassemblyView = nullptr;
+ FlowGraphWidget* m_flowGraphWidget = nullptr;
public:
MiniGraph(QWidget* ... | Update MiniGraph to work with FlowGraphWidet.
| mit | Vector35/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api,joshwatson/binaryninja-api,Vector35/binaryninja-api,joshwatson/binaryninja-api | 39e3614c7136029acb6b18cd71e12ef2feaeaac7 |
//#####################################################################
// Function Dot
//#####################################################################
#pragma once
namespace other {
template<class T,int d> class Vector;
static inline float dot(const float a1,const float a2)
{return a1*a2;}
static inline do... | //#####################################################################
// Function Dot
//#####################################################################
#pragma once
namespace other {
template<class T,int d> class Vector;
inline float dot(const float a1,const float a2)
{return a1*a2;}
inline double dot(const... | ---
+++
@@ -7,20 +7,20 @@
template<class T,int d> class Vector;
-inline float dot(const float a1,const float a2)
+static inline float dot(const float a1,const float a2)
{return a1*a2;}
-inline double dot(const double a1,const double a2)
+static inline double dot(const double a1,const double a2)
{return a1*a2... | vector/dot: Mark some functions static inline
| bsd-3-clause | omco/geode,mikest/geode,omco/geode,mikest/geode,mikest/geode,omco/geode,omco/geode,mikest/geode | efb2710d75e39e0297d88636001c43185a92c407 |
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include "rtpp_types.h"
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct rtpp_module_priv {
int foo;
};
static struct rtpp_module_priv *rtpp_csv_acct_ctor(struct rtpp_cfg_stable *);
static... | #include <stdint.h>
#include <stdlib.h>
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
struct moduleinfo rtpp_module = {
.name = "csv_acct",
.ver = MI_VER_INIT(struct moduleinfo)
};
| ---
+++
@@ -1,11 +1,40 @@
+#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
+#include "rtpp_types.h"
#include "rtpp_module.h"
#define MI_VER_INIT(sname) {.rev = MODULE_API_REVISION, .mi_size = sizeof(sname)}
+struct rtpp_module_priv {
+ int foo;
+};
+
+static struct rtpp_module_priv *rtpp_csv_a... | Add simple constructor and destructor.
| bsd-2-clause | synety-jdebp/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,jevonearth/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,sippy/rtpproxy | 9ab39d421665c1420afae6d8e006b01e7d0e6c61 |
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVal... | #ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base48 entry widget validator.
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddressVali... | ---
+++
@@ -3,8 +3,8 @@
#include <QValidator>
-/** Base48 entry widget validator.
- Corrects near-miss characters and refuses characters that are no part of base48.
+/** Base58 entry widget validator.
+ Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddre... | Fix typo in a comment: it's base58, not base48.
| mit | GroundRod/anoncoin,Mrs-X/Darknet,donaloconnor/bitcoin,sstone/bitcoin,ahmedbodi/vertcoin,11755033isaprimenumber/Feathercoin,Earlz/renamedcoin,jimmykiselak/lbrycrd,shouhuas/bitcoin,litecoin-project/litecoin,rustyrussell/bitcoin,nmarley/dash,pstratem/elements,goku1997/bitcoin,BTCTaras/bitcoin,NicolasDorier/bitcoin,Flowdal... | ccf3af77c10c3b06acde8ee55930051a862bd728 |
// 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 WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
#define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
#include "third_party/ppapi/c/pp_var.h"
#define PPB_PRIVATE_IN... | // 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 WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
#define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
#include "ppapi/c/pp_var.h"
#define PPB_PRIVATE_INTERFACE "PPB... | ---
+++
@@ -5,7 +5,7 @@
#ifndef WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
#define WEBKIT_GLUE_PLUGINS_PPB_PRIVATE_H_
-#include "ppapi/c/pp_var.h"
+#include "third_party/ppapi/c/pp_var.h"
#define PPB_PRIVATE_INTERFACE "PPB_Private;1"
| Add third_party/ prefix to ppapi include for checkdeps.
The only users of this ppb should be inside chrome so this should work fine.
TBR=jam@chromium.org
Review URL: http://codereview.chromium.org/3019006
git-svn-id: http://src.chromium.org/svn/trunk/src@52766 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id:... | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-u... | 822b9fd29f6ce8b69dc2705f04cae44fbb3e78f7 |
// Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ORBIT_BASE_RESULT_H_
#define ORBIT_BASE_RESULT_H_
#include <string>
#include <type_traits>
#include "outcome.hpp"
class [[nodiscard]] ErrorMes... | // Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ORBIT_BASE_RESULT_H_
#define ORBIT_BASE_RESULT_H_
#include <string>
#include <type_traits>
#include "outcome.hpp"
class ErrorMessage final {
... | ---
+++
@@ -10,7 +10,7 @@
#include "outcome.hpp"
-class ErrorMessage final {
+class [[nodiscard]] ErrorMessage final {
public:
ErrorMessage() = default;
explicit ErrorMessage(std::string message) : message_(std::move(message)) {}
@@ -25,7 +25,7 @@
using Result = outcome::result<T, E, outcome::policy::te... | Add nodiscard to ErrorMessage and ErrorMessageOr
Test: builds
| bsd-2-clause | google/orbit,google/orbit,google/orbit,google/orbit | 0ef3023b55fd36cace3db6e95dfa650485e54569 |
/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | ---
+++
@@ -21,15 +21,6 @@
uint32_t min_rate;
};
-struct SkipEncodingUnusedStreams {
- SkipEncodingUnusedStreams() : enabled(false) {}
- explicit SkipEncodingUnusedStreams(bool set_enabled)
- : enabled(set_enabled) {}
- virtual ~SkipEncodingUnusedStreams() {}
-
- const bool enabled;
-};
-
struct AimdRem... | Remove no longer used SkipEncodingUnusedStreams.
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/18829004
git-svn-id: 03ae4fbe531b1eefc9d815f31e49022782c42458@6753 4adac7df-926f-26a2-2b94-8c16560cd09d
| bsd-3-clause | Alkalyne/webrtctrunk,xin3liang/platform_external_chromium_org_third_party_webrtc,geekboxzone/lollipop_external_chromium_org_third_party_webrtc,bpsinc-native/src_third_party_webrtc,svn2github/webrtc-Revision-8758,jgcaaprom/android_external_chromium_org_third_party_webrtc,xin3liang/platform_external_chromium_org_third_pa... | 00f7b82571bef17086f65cd6c2f827c565eff40e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.