after
stringlengths 72
2.11k
| before
stringlengths 21
1.55k
| diff
stringlengths 85
2.31k
| instruction
stringlengths 20
1.71k
| license
stringclasses 13
values | repos
stringlengths 7
82.6k
| commit
stringlengths 40
40
|
---|---|---|---|---|---|---|
#include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "utils/builtins.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
We need to use "parrot_config includedir"
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "parrot/runcore_api.h"
*/
PG_MODULE_MAGIC;
int execq(text *sql, int cnt);
int
execq(text *sql, int cnt)
{
char *command;
int ret;
int proc;
SPI_connect();
SPI_finish();
//pfree(command);
return (proc);
}
Datum plparrot_call_handler(PG_FUNCTION_ARGS);
void plparrot_elog(int level, char *message);
PG_FUNCTION_INFO_V1(plparrot_call_handler);
Datum
plparrot_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
retval = PG_GETARG_DATUM(0);
PG_TRY();
{
}
PG_CATCH();
{
}
PG_END_TRY();
return retval;
}
void
plparrot_elog(int level, char *message)
{
elog(level, "%s", message);
}
| #include "postgres.h"
#include "executor/spi.h"
#include "commands/trigger.h"
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "parrot/runcore_api.h"
*/
PG_MODULE_MAGIC;
Datum plparrot_call_handler(PG_FUNCTION_ARGS);
void plparrot_elog(int level, char *message);
PG_FUNCTION_INFO_V1(plparrot_call_handler);
Datum
plparrot_call_handler(PG_FUNCTION_ARGS)
{
Datum retval;
retval = PG_GETARG_DATUM(0);
PG_TRY();
{
}
PG_CATCH();
{
}
PG_END_TRY();
return retval;
}
void
plparrot_elog(int level, char *message)
{
elog(level, "%s", message);
}
| ---
+++
@@ -4,11 +4,15 @@
#include "fmgr.h"
#include "access/heapam.h"
#include "utils/syscache.h"
+#include "utils/builtins.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
/*
Figure out how to include these properly
+
+We need to use "parrot_config includedir"
+
#include "parrot/embed.h"
#include "parrot/debugger.h"
#include "parrot/runcore_api.h"
@@ -16,6 +20,22 @@
PG_MODULE_MAGIC;
+int execq(text *sql, int cnt);
+
+int
+execq(text *sql, int cnt)
+{
+ char *command;
+ int ret;
+ int proc;
+
+ SPI_connect();
+
+ SPI_finish();
+ //pfree(command);
+
+ return (proc);
+}
Datum plparrot_call_handler(PG_FUNCTION_ARGS);
void plparrot_elog(int level, char *message); | Add the beginnings of something that does SPI
| artistic-2.0 | leto/plparrot,leto/plparrot,leto/plparrot | 821e790e9f14828382c787ca907ef4c7c86ff1de |
#include "maxminddb_test_helper.h"
void run_tests(int mode, const char *mode_desc)
{
const char *filename = "MaxMind-DB-test-decoder.mmdb";
const char *path = test_database_path(filename);
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
free((void *)path);
const char *ip = "1.1.1.1";
MMDB_lookup_result_s result =
lookup_string_ok(mmdb, ip, filename, mode_desc);
MMDB_entry_data_s entry_data;
char *lookup_path[] = { "array", "0", NULL };
int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path);
cmp_ok(status, "==", MMDB_SUCCESS,
"status for MMDB_aget_value() is MMDB_SUCCESS");
ok(entry_data.has_data, "found a value with MMDB_aget_value");
cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UINT32,
"returned entry type is uint32");
cmp_ok(entry_data.uint32, "==", 1, "entry value is 1");
MMDB_close(mmdb);
free(mmdb);
}
int main(void)
{
plan(NO_PLAN);
for_all_modes(&run_tests);
done_testing();
}
| #include "maxminddb_test_helper.h"
void run_tests(int mode, const char *mode_desc)
{
const char *filename = "MaxMind-DB-test-decoder.mmdb";
const char *path = test_database_path(filename);
MMDB_s *mmdb = open_ok(path, mode, mode_desc);
free((void *)path);
const char *ip = "1.1.1.1";
MMDB_lookup_result_s result =
lookup_string_ok(mmdb, ip, filename, mode_desc);
MMDB_entry_data_s entry_data;
char *lookup_path[] = { "array", "0", NULL };
int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path);
cmp_ok(status, "==", MMDB_SUCCESS,
"status for MMDB_get_value() is MMDB_SUCCESS");
ok(entry_data.has_data, "found a value with MMDB_aget_value");
cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UINT32,
"returned entry type is uint32");
cmp_ok(entry_data.uint32, "==", 1, "entry value is 1");
MMDB_close(mmdb);
free(mmdb);
}
int main(void)
{
plan(NO_PLAN);
for_all_modes(&run_tests);
done_testing();
}
| ---
+++
@@ -16,7 +16,7 @@
int status = MMDB_aget_value(&result.entry, &entry_data, lookup_path);
cmp_ok(status, "==", MMDB_SUCCESS,
- "status for MMDB_get_value() is MMDB_SUCCESS");
+ "status for MMDB_aget_value() is MMDB_SUCCESS");
ok(entry_data.has_data, "found a value with MMDB_aget_value");
cmp_ok(entry_data.type, "==", MMDB_DATA_TYPE_UINT32,
"returned entry type is uint32"); | Fix typo in test description
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | b675c4d898d18514312a867ffca73d09e438f7c0 |
#ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/memblock.h>
#include <asm/types.h>
#include <asm/page.h>
#include <asm/prom.h>
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#define abs_to_virt(aa) __va(aa)
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_ABS_ADDR_H */
| #ifndef _ASM_POWERPC_ABS_ADDR_H
#define _ASM_POWERPC_ABS_ADDR_H
#ifdef __KERNEL__
/*
* c 2001 PPC 64 Team, IBM Corp
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/memblock.h>
#include <asm/types.h>
#include <asm/page.h>
#include <asm/prom.h>
#define phys_to_abs(pa) (pa)
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#define abs_to_virt(aa) __va(aa)
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_ABS_ADDR_H */
| ---
+++
@@ -18,8 +18,6 @@
#include <asm/page.h>
#include <asm/prom.h>
-#define phys_to_abs(pa) (pa)
-
/* Convenience macros */
#define virt_to_abs(va) __pa(va)
#define abs_to_virt(aa) __va(aa) | powerpc: Remove phys_to_abs() now all users have been removed
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
| apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs | 6bfa5c586b87a36f742e0525e6c337074b68978d |
#ifndef __COMMON_H__
#define __COMMON_H__
#ifdef NODE_VERSION_AT_LEAST
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
#endif
#endif
#endif
| #ifndef __COMMON_H__
#define __COMMON_H__
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
#endif
#endif
| ---
+++
@@ -1,8 +1,10 @@
#ifndef __COMMON_H__
#define __COMMON_H__
+#ifdef NODE_VERSION_AT_LEAST
#if NODE_VERSION_AT_LEAST(0,11,0)
#define __NODE_V0_11__
+#endif
#endif
#endif | Fix build under node.js 0.10.0
| lgpl-2.1 | zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js,zenozeng/yapcduino.js | f7499f65a6149495f5750a1aade611d7ce44d9e9 |
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nShowCmd)
{
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
if (szArgList == NULL) {
fprintf(stderr, "Unable to parse the command line.\n");
return 255;
}
if (argCount < 3 || argCount > 4) {
fprintf(stderr, "Batch MessageBox v" VERSION "\n");
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n"
URL "\nfor the possible values of \"type\". "
"ERRORLEVEL is the return value or 255 on\nerror.\n");
return 255;
}
/* Ignore _wtoi errors. */
int type = _wtoi(szArgList[3]);
int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type);
LocalFree(szArgList);
return button;
}
| #include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <windows.h>
#define URL "https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505\
(v=vs.85).aspx"
#define VERSION "0.1.0"
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine,
int nShowCmd)
{
LPWSTR *szArgList;
int argCount;
szArgList = CommandLineToArgvW(GetCommandLineW(), &argCount);
if (szArgList == NULL) {
fprintf(stderr, "Unable to parse the command line.\n");
return 255;
}
if (argCount < 3 || argCount > 4) {
fprintf(stderr, "Batch MessageBox v" VERSION "\n", szArgList[0]);
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n"
URL "\nfor the possible values of \"type\". "
"ERRORLEVEL is the return value or 255 on\nerror.\n");
return 255;
}
int type = _wtoi(szArgList[3]);
int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type);
LocalFree(szArgList);
return button;
}
| ---
+++
@@ -19,7 +19,7 @@
return 255;
}
if (argCount < 3 || argCount > 4) {
- fprintf(stderr, "Batch MessageBox v" VERSION "\n", szArgList[0]);
+ fprintf(stderr, "Batch MessageBox v" VERSION "\n");
fprintf(stderr, "Usage: %ls message title [type]\n\n", szArgList[0]);
fprintf(stderr, "Calls MessageBoxW() with the given arguments. See\n"
@@ -27,6 +27,7 @@
"ERRORLEVEL is the return value or 255 on\nerror.\n");
return 255;
}
+ /* Ignore _wtoi errors. */
int type = _wtoi(szArgList[3]);
int button = MessageBoxW(NULL, szArgList[1], szArgList[2], type);
LocalFree(szArgList); | Remove unused fprintf arg; add comment on _wtoi
| mit | dbohdan/messagebox,dbohdan/messagebox | 8597a0bd12c09d88dc5a41072446af219055b1ae |
/***************************************************************************//**
* \file domain.h
* \author Anush Krishnan ([email protected])
* \brief Definition of the class \c domain.
*/
#pragma once
#include "types.h"
/**
* \class domain
* \brief Stores information about the computational grid.
*/
class domain
{
public:
int nx, ///< number of cells in the x-direction
ny; ///< number of cells in the y-direction
vecH x, ///< x-coordinates of the nodes
y, ///< y-coordinates of the nodes
dx, ///< cell widths in the x-direction
dy; ///< cell widths in the y-direction
vecD xD, ///< x-coordinates of the nodes stored on the device
yD, ///< y-coordinates of the nodes stored on the device
dxD, ///< x- cell widths stored on the device
dyD; ///< y- cell widths stored on the device
vecH xu, ///< x-coordinates of the locations at which the x-component of velocity is evaluated
yu, ///< y-coordinates of the locations at which the x-component of velocity is evaluated
xv, ///< x-coordinates of the locations at which the y-component of velocity is evaluated
yv; ///< y-coordinates of the locations at which the y-component of velocity is evaluated
};
| /***************************************************************************//**
* \file domain.h
* \author Krishnan, A. ([email protected])
* \brief Definition of the class \c domain
*/
#pragma once
#include "types.h"
/**
* \class domain
* \brief Store the mesh grid information
*/
class domain
{
public:
int nx, ///< number of cells in the x-direction
ny; ///< number of cells in the y-direction
vecH x, ///< x-coordinates of the nodes
y, ///< y-coordinates of the nodes
dx, ///< cell widths in the x-direction
dy; ///< cell widths in the y-direction
vecD xD, ///< x-coordinates of the nodes stored on the device
yD, ///< y-coordinates of the nodes stored on the device
dxD, ///< x- cell widths stored on the device
dyD; ///< y- cell widths stored on the device
vecH xu, ///< x-coordinates of the locations at which the x-component of velocity is evaluated
yu, ///< y-coordinates of the locations at which the x-component of velocity is evaluated
xv, ///< x-coordinates of the locations at which the y-component of velocity is evaluated
yv; ///< y-coordinates of the locations at which the y-component of velocity is evaluated
};
| ---
+++
@@ -1,8 +1,8 @@
/***************************************************************************//**
-* \file domain.h
-* \author Krishnan, A. ([email protected])
-* \brief Definition of the class \c domain
-*/
+ * \file domain.h
+ * \author Anush Krishnan ([email protected])
+ * \brief Definition of the class \c domain.
+ */
#pragma once
@@ -11,9 +11,9 @@
/**
-* \class domain
-* \brief Store the mesh grid information
-*/
+ * \class domain
+ * \brief Stores information about the computational grid.
+ */
class domain
{
public: | Update Doxygen documentation with conventions
| mit | barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM | ee758e12198cd82c29a387193a154e6a8f88fc99 |
/* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ \ / / | _____| \ \ / / / \ | _ \ \ \ / / |___ ___| | _____| |
| \ \ / / | |_____ \ \_/ / / /\ \ | |_| / \ \_/ / | | | |_____ |
| \ \ / / | _____| ) _ ( / /__\ \ | _ | \ / | | | _____| |
| \ \/ / | |_____ / / \ \ / ______ \ | |_| \ | | | | | |_____ |
| \__/ |________| /_/ \_\ /_/ \_\ |______/ |_| |_| |________| |
|___________________________________________________________________________________________________|
====================================================================================================== */
static void a_base_encoders_reset(void);
void pre_auton()
{
a_base_encoders_reset();
}
task autonomous()
{
}
static void a_base_encoders_reset()
{
resetMotorEncoder(mBaseFL);
resetMotorEncoder(mBaseFR);
resetMotorEncoder(mBaseBL);
resetMotorEncoder(mBaseBR);
}
| /* ======================================================================================================
___________________________________________________________________________________________________
| __ __ ________ __ __ __ ______ __ __ _________ ________ |
| \ \ / / | _____| \ \ / / / \ | _ \ \ \ / / |___ ___| | _____| |
| \ \ / / | |_____ \ \_/ / / /\ \ | |_| / \ \_/ / | | | |_____ |
| \ \ / / | _____| ) _ ( / /__\ \ | _ | \ / | | | _____| |
| \ \/ / | |_____ / / \ \ / ______ \ | |_| \ | | | | | |_____ |
| \__/ |________| /_/ \_\ /_/ \_\ |______/ |_| |_| |________| |
|___________________________________________________________________________________________________|
====================================================================================================== */
void pre_auton()
{
}
task autonomous()
{
}
| ---
+++
@@ -10,12 +10,22 @@
====================================================================================================== */
+static void a_base_encoders_reset(void);
+
void pre_auton()
{
-
+ a_base_encoders_reset();
}
task autonomous()
{
}
+
+static void a_base_encoders_reset()
+{
+ resetMotorEncoder(mBaseFL);
+ resetMotorEncoder(mBaseFR);
+ resetMotorEncoder(mBaseBL);
+ resetMotorEncoder(mBaseBR);
+} | Reset motor encoders in pre_auton
| mit | qsctr/vex-4194b-2016 | b17244b8aaacaa4bdd06d076f16831ad76b6fb9f |
#ifdef E_TYPEDEFS
/* enum for various event types */
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
E_ACPI_TYPE_FAN,
E_ACPI_TYPE_LID,
E_ACPI_TYPE_PROCESSOR,
E_ACPI_TYPE_SLEEP,
E_ACPI_TYPE_POWER,
E_ACPI_TYPE_THERMAL,
E_ACPI_TYPE_VIDEO,
E_ACPI_TYPE_WIFI
} E_Acpi_Type;
/* struct used to pass to event handlers */
typedef struct _E_Event_Acpi E_Event_Acpi;
#else
# ifndef E_ACPI_H
# define E_ACPI_H
struct _E_Event_Acpi
{
const char *device, *bus_id;
int type, data;
};
EAPI int e_acpi_init(void);
EAPI int e_acpi_shutdown(void);
extern EAPI int E_EVENT_ACPI_LID;
extern EAPI int E_EVENT_ACPI_BATTERY;
extern EAPI int E_EVENT_ACPI_BUTTON;
extern EAPI int E_EVENT_ACPI_SLEEP;
extern EAPI int E_EVENT_ACPI_WIFI;
# endif
#endif
| #ifdef E_TYPEDEFS
/* enum for various event types */
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
E_ACPI_TYPE_LID,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
E_ACPI_TYPE_SLEEP,
E_ACPI_TYPE_WIFI
} E_Acpi_Type;
/* struct used to pass to event handlers */
typedef struct _E_Event_Acpi E_Event_Acpi;
#else
# ifndef E_ACPI_H
# define E_ACPI_H
struct _E_Event_Acpi
{
const char *device, *bus_id;
int type, data;
};
EAPI int e_acpi_init(void);
EAPI int e_acpi_shutdown(void);
extern EAPI int E_EVENT_ACPI_LID;
extern EAPI int E_EVENT_ACPI_BATTERY;
extern EAPI int E_EVENT_ACPI_BUTTON;
extern EAPI int E_EVENT_ACPI_SLEEP;
extern EAPI int E_EVENT_ACPI_WIFI;
# endif
#endif
| ---
+++
@@ -4,10 +4,15 @@
typedef enum _E_Acpi_Type
{
E_ACPI_TYPE_UNKNOWN = 0,
- E_ACPI_TYPE_LID,
E_ACPI_TYPE_BATTERY,
E_ACPI_TYPE_BUTTON,
+ E_ACPI_TYPE_FAN,
+ E_ACPI_TYPE_LID,
+ E_ACPI_TYPE_PROCESSOR,
E_ACPI_TYPE_SLEEP,
+ E_ACPI_TYPE_POWER,
+ E_ACPI_TYPE_THERMAL,
+ E_ACPI_TYPE_VIDEO,
E_ACPI_TYPE_WIFI
} E_Acpi_Type;
| Add some more acpi event types that we will handle.
git-svn-id: 6ac5796aeae0cef97fb47bcc287d4ce899c6fa6e@48916 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
| bsd-2-clause | jordemort/e17,jordemort/e17,jordemort/e17 | e3a82a7ee478b4693a7f250004d628e822c105ed |
/*
* waysome - wayland based window manager
*
* Copyright in alphabetical order:
*
* Copyright (C) 2014-2015 Julian Ganz
* Copyright (C) 2014-2015 Manuel Messner
* Copyright (C) 2014-2015 Marcel Müller
* Copyright (C) 2014-2015 Matthias Beyer
* Copyright (C) 2014-2015 Nadja Sommerfeld
*
* This file is part of waysome.
*
* waysome 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.
*
* waysome is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with waysome. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @addtogroup storage "Storage"
*
* @{
*/
#ifndef __WS_STORAGE_MODULE_H__
#define __WS_STORAGE_MODULE_H__
#endif // __WS_STORAGE_MODULE_H__
/**
* @}
*/
| /*
* waysome - wayland based window manager
*
* Copyright in alphabetical order:
*
* Copyright (C) 2014-2015 Julian Ganz
* Copyright (C) 2014-2015 Manuel Messner
* Copyright (C) 2014-2015 Marcel Müller
* Copyright (C) 2014-2015 Matthias Beyer
* Copyright (C) 2014-2015 Nadja Sommerfeld
*
* This file is part of waysome.
*
* waysome 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.
*
* waysome is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with waysome. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WS_STORAGE_MODULE_H__
#define __WS_STORAGE_MODULE_H__
#endif // __WS_STORAGE_MODULE_H__
| ---
+++
@@ -25,9 +25,20 @@
* along with waysome. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * @addtogroup storage "Storage"
+ *
+ * @{
+ */
+
#ifndef __WS_STORAGE_MODULE_H__
#define __WS_STORAGE_MODULE_H__
#endif // __WS_STORAGE_MODULE_H__
+
+/**
+ * @}
+ */
+ | Add storage files to storage documentation group
| lgpl-2.1 | waysome/waysome,waysome/waysome | 1a3e5dcc47629e1707191ab1641a89be5eb1328b |
//
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) NSString * last4;
@property (nonatomic, readonly) NSString * lastGroup;
@property (nonatomic, readonly) NSString * string;
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
@property (nonatomic, readonly, getter = isValid) BOOL valid;
@property (nonatomic, readonly, getter = isValidLength) BOOL validLength;
@property (nonatomic, readonly, getter = isValidLuhn) BOOL validLuhn;
@property (nonatomic, readonly, getter = isPartiallyValid) BOOL partiallyValid;
+ (id) cardNumberWithString:(NSString *)string;
- (id) initWithString:(NSString *)string;
@end
| //
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) NSString * last4;
@property (nonatomic, readonly) NSString * lastGroup;
@property (nonatomic, readonly) NSString * string;
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
+ (id) cardNumberWithString:(NSString *)string;
- (id) initWithString:(NSString *)string;
- (BOOL)isValid;
- (BOOL)isValidLength;
- (BOOL)isValidLuhn;
- (BOOL)isPartiallyValid;
@end
| ---
+++
@@ -18,11 +18,12 @@
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
+@property (nonatomic, readonly, getter = isValid) BOOL valid;
+@property (nonatomic, readonly, getter = isValidLength) BOOL validLength;
+@property (nonatomic, readonly, getter = isValidLuhn) BOOL validLuhn;
+@property (nonatomic, readonly, getter = isPartiallyValid) BOOL partiallyValid;
+
+ (id) cardNumberWithString:(NSString *)string;
- (id) initWithString:(NSString *)string;
-- (BOOL)isValid;
-- (BOOL)isValidLength;
-- (BOOL)isValidLuhn;
-- (BOOL)isPartiallyValid;
@end | Make validity booleans properties as well
| mit | onevcat/PaymentKit,loudnate/PaymentKit,tictail/TICPaymentKit,spinlister/PaymentKit,RidePal/PaymentKit,loudnate/PaymentKit,mobitar/PaymentKit,oanaBan/PaymentKit,jonathanrauch/PaymentKit,vikas100/Vikas,tictail/TICPaymentKit,jonathanrauch/PaymentKit,zsw12abc/PaymentKit,bobbyski/PaymentKit,stripe/PaymentKit,prolificinteractive/PaymentKit,ichu501/PaymentKit,andris-zalitis/PaymentKit,baoquanjing/newss,spinlister/PaymentKit,vikas100/Vikas,bobbyski/PaymentKit,Dwellers/PaymentKit,insanoid/PaymentKit,Dwellers/PaymentKit,mobitar/PaymentKit,baoquanjing/newss,RidePal/PaymentKit,triposo/PaymentKit,oanaBan/PaymentKit,zsw12abc/PaymentKit,ernestopino/PaymentKit,ernestopino/PaymentKit,andris-zalitis/PaymentKit,heetch/PaymentKit,heetch/PaymentKit | 31f9fa46901ed41ea21f43b1a05481112370e8f1 |
// options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsigned long machine_uint_t; // must be pointer size
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
typedef int machine_int_t; // must be pointer size
typedef unsigned int machine_uint_t; // must be pointer size
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef double machine_float_t;
machine_float_t machine_sqrt(machine_float_t x);
| // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_ENABLE_FLOAT (1)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsigned long machine_uint_t; // must be pointer size
#else
// These are definitions for machines where sizeof(int) == sizeof(void*),
// regardless for actual size.
typedef int machine_int_t; // must be pointer size
typedef unsigned int machine_uint_t; // must be pointer size
#endif
#define BYTES_PER_WORD sizeof(machine_int_t)
typedef void *machine_ptr_t; // must be of pointer size
typedef const void *machine_const_ptr_t; // must be of pointer size
typedef double machine_float_t;
machine_float_t machine_sqrt(machine_float_t x);
| ---
+++
@@ -2,7 +2,7 @@
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
-#define MICROPY_ENABLE_FLOAT (1)
+#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
| unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
| mit | micropython/micropython-esp32,SHA2017-badge/micropython-esp32,torwag/micropython,AriZuu/micropython,xhat/micropython,utopiaprince/micropython,AriZuu/micropython,ahotam/micropython,heisewangluo/micropython,firstval/micropython,hiway/micropython,cloudformdesign/micropython,mianos/micropython,kostyll/micropython,Timmenem/micropython,xuxiaoxin/micropython,matthewelse/micropython,rubencabrera/micropython,Vogtinator/micropython,bvernoux/micropython,infinnovation/micropython,deshipu/micropython,cnoviello/micropython,henriknelson/micropython,omtinez/micropython,adamkh/micropython,lowRISC/micropython,mgyenik/micropython,martinribelotta/micropython,infinnovation/micropython,kerneltask/micropython,trezor/micropython,dxxb/micropython,ryannathans/micropython,mianos/micropython,blazewicz/micropython,tuc-osg/micropython,methoxid/micropystat,lowRISC/micropython,rubencabrera/micropython,utopiaprince/micropython,ericsnowcurrently/micropython,pfalcon/micropython,torwag/micropython,ganshun666/micropython,xyb/micropython,blmorris/micropython,hosaka/micropython,adafruit/micropython,firstval/micropython,ChuckM/micropython,feilongfl/micropython,orionrobots/micropython,SungEun-Steve-Kim/test-mp,paul-xxx/micropython,adamkh/micropython,Peetz0r/micropython-esp32,ceramos/micropython,aitjcize/micropython,martinribelotta/micropython,micropython/micropython-esp32,KISSMonX/micropython,rubencabrera/micropython,dmazzella/micropython,mpalomer/micropython,supergis/micropython,ceramos/micropython,ChuckM/micropython,danicampora/micropython,firstval/micropython,cwyark/micropython,dhylands/micropython,slzatz/micropython,Timmenem/micropython,ceramos/micropython,noahwilliamsson/micropython,cwyark/micropython,stonegithubs/micropython,suda/micropython,mpalomer/micropython,ChuckM/micropython,blmorris/micropython,MrSurly/micropython-esp32,methoxid/micropystat,blazewicz/micropython,oopy/micropython,EcmaXp/micropython,AriZuu/micropython,dmazzella/micropython,feilongfl/micropython,bvernoux/micropython,jlillest/micropython,tdautc19841202/micropython,jlillest/micropython,trezor/micropython,stonegithubs/micropython,redbear/micropython,hosaka/micropython,ganshun666/micropython,warner83/micropython,neilh10/micropython,lbattraw/micropython,ahotam/micropython,skybird6672/micropython,bvernoux/micropython,HenrikSolver/micropython,oopy/micropython,kostyll/micropython,aethaniel/micropython,galenhz/micropython,MrSurly/micropython-esp32,paul-xxx/micropython,torwag/micropython,matthewelse/micropython,vriera/micropython,PappaPeppar/micropython,pozetroninc/micropython,selste/micropython,MrSurly/micropython,ruffy91/micropython,tuc-osg/micropython,jmarcelino/pycom-micropython,danicampora/micropython,chrisdearman/micropython,heisewangluo/micropython,ernesto-g/micropython,praemdonck/micropython,swegener/micropython,ahotam/micropython,pfalcon/micropython,alex-robbins/micropython,redbear/micropython,drrk/micropython,infinnovation/micropython,cloudformdesign/micropython,henriknelson/micropython,Vogtinator/micropython,adamkh/micropython,torwag/micropython,TDAbboud/micropython,dinau/micropython,turbinenreiter/micropython,martinribelotta/micropython,adafruit/micropython,redbear/micropython,hosaka/micropython,SungEun-Steve-Kim/test-mp,MrSurly/micropython-esp32,SungEun-Steve-Kim/test-mp,dmazzella/micropython,adafruit/circuitpython,tralamazza/micropython,henriknelson/micropython,jimkmc/micropython,SHA2017-badge/micropython-esp32,mpalomer/micropython,methoxid/micropystat,KISSMonX/micropython,jlillest/micropython,galenhz/micropython,alex-march/micropython,tobbad/micropython,kerneltask/micropython,drrk/micropython,aethaniel/micropython,dinau/micropython,pramasoul/micropython,alex-march/micropython,tobbad/micropython,xuxiaoxin/micropython,vitiral/micropython,deshipu/micropython,alex-robbins/micropython,selste/micropython,Timmenem/micropython,tdautc19841202/micropython,mgyenik/micropython,feilongfl/micropython,lowRISC/micropython,ryannathans/micropython,cwyark/micropython,micropython/micropython-esp32,EcmaXp/micropython,noahwilliamsson/micropython,mhoffma/micropython,ahotam/micropython,adafruit/circuitpython,skybird6672/micropython,mianos/micropython,PappaPeppar/micropython,ernesto-g/micropython,omtinez/micropython,aitjcize/micropython,vitiral/micropython,chrisdearman/micropython,heisewangluo/micropython,cnoviello/micropython,swegener/micropython,ernesto-g/micropython,ryannathans/micropython,mpalomer/micropython,rubencabrera/micropython,mianos/micropython,mgyenik/micropython,emfcamp/micropython,neilh10/micropython,trezor/micropython,lowRISC/micropython,ericsnowcurrently/micropython,slzatz/micropython,xhat/micropython,jmarcelino/pycom-micropython,AriZuu/micropython,ruffy91/micropython,galenhz/micropython,ganshun666/micropython,dxxb/micropython,mpalomer/micropython,toolmacher/micropython,jimkmc/micropython,supergis/micropython,Vogtinator/micropython,pfalcon/micropython,ruffy91/micropython,bvernoux/micropython,omtinez/micropython,PappaPeppar/micropython,swegener/micropython,deshipu/micropython,paul-xxx/micropython,mhoffma/micropython,matthewelse/micropython,vriera/micropython,vitiral/micropython,ryannathans/micropython,xhat/micropython,alex-march/micropython,lbattraw/micropython,jmarcelino/pycom-micropython,tuc-osg/micropython,drrk/micropython,firstval/micropython,blazewicz/micropython,tdautc19841202/micropython,tralamazza/micropython,warner83/micropython,ernesto-g/micropython,misterdanb/micropython,aitjcize/micropython,deshipu/micropython,dhylands/micropython,xuxiaoxin/micropython,matthewelse/micropython,PappaPeppar/micropython,MrSurly/micropython,xyb/micropython,AriZuu/micropython,xyb/micropython,alex-robbins/micropython,puuu/micropython,ernesto-g/micropython,aethaniel/micropython,ganshun666/micropython,feilongfl/micropython,dhylands/micropython,tdautc19841202/micropython,MrSurly/micropython,suda/micropython,emfcamp/micropython,turbinenreiter/micropython,PappaPeppar/micropython,noahchense/micropython,MrSurly/micropython,dinau/micropython,warner83/micropython,noahchense/micropython,henriknelson/micropython,tobbad/micropython,noahchense/micropython,adamkh/micropython,dxxb/micropython,trezor/micropython,orionrobots/micropython,ceramos/micropython,misterdanb/micropython,adafruit/micropython,hosaka/micropython,infinnovation/micropython,martinribelotta/micropython,turbinenreiter/micropython,noahchense/micropython,SungEun-Steve-Kim/test-mp,cwyark/micropython,selste/micropython,dxxb/micropython,jlillest/micropython,tobbad/micropython,omtinez/micropython,ryannathans/micropython,dhylands/micropython,ericsnowcurrently/micropython,emfcamp/micropython,galenhz/micropython,swegener/micropython,feilongfl/micropython,adamkh/micropython,emfcamp/micropython,danicampora/micropython,pramasoul/micropython,vriera/micropython,praemdonck/micropython,dmazzella/micropython,xyb/micropython,noahwilliamsson/micropython,kostyll/micropython,suda/micropython,hiway/micropython,drrk/micropython,danicampora/micropython,alex-march/micropython,heisewangluo/micropython,tuc-osg/micropython,adafruit/micropython,pozetroninc/micropython,ruffy91/micropython,alex-robbins/micropython,ceramos/micropython,KISSMonX/micropython,chrisdearman/micropython,MrSurly/micropython-esp32,HenrikSolver/micropython,vriera/micropython,cloudformdesign/micropython,aethaniel/micropython,misterdanb/micropython,TDAbboud/micropython,tralamazza/micropython,turbinenreiter/micropython,orionrobots/micropython,firstval/micropython,pfalcon/micropython,praemdonck/micropython,misterdanb/micropython,dinau/micropython,SungEun-Steve-Kim/test-mp,supergis/micropython,Timmenem/micropython,chrisdearman/micropython,deshipu/micropython,misterdanb/micropython,blazewicz/micropython,skybird6672/micropython,mhoffma/micropython,warner83/micropython,adafruit/micropython,micropython/micropython-esp32,adafruit/circuitpython,suda/micropython,turbinenreiter/micropython,SHA2017-badge/micropython-esp32,neilh10/micropython,kerneltask/micropython,methoxid/micropystat,lbattraw/micropython,ruffy91/micropython,redbear/micropython,KISSMonX/micropython,bvernoux/micropython,jmarcelino/pycom-micropython,dhylands/micropython,kostyll/micropython,mianos/micropython,neilh10/micropython,toolmacher/micropython,lowRISC/micropython,alex-robbins/micropython,HenrikSolver/micropython,heisewangluo/micropython,supergis/micropython,selste/micropython,warner83/micropython,praemdonck/micropython,utopiaprince/micropython,EcmaXp/micropython,micropython/micropython-esp32,noahwilliamsson/micropython,mhoffma/micropython,blmorris/micropython,pramasoul/micropython,kerneltask/micropython,xuxiaoxin/micropython,henriknelson/micropython,slzatz/micropython,rubencabrera/micropython,cwyark/micropython,chrisdearman/micropython,galenhz/micropython,jmarcelino/pycom-micropython,orionrobots/micropython,oopy/micropython,ChuckM/micropython,suda/micropython,Timmenem/micropython,Vogtinator/micropython,puuu/micropython,HenrikSolver/micropython,Peetz0r/micropython-esp32,toolmacher/micropython,oopy/micropython,neilh10/micropython,pozetroninc/micropython,adafruit/circuitpython,jimkmc/micropython,jlillest/micropython,paul-xxx/micropython,swegener/micropython,lbattraw/micropython,cloudformdesign/micropython,hiway/micropython,emfcamp/micropython,EcmaXp/micropython,cnoviello/micropython,trezor/micropython,lbattraw/micropython,Peetz0r/micropython-esp32,xuxiaoxin/micropython,pramasoul/micropython,drrk/micropython,puuu/micropython,dinau/micropython,MrSurly/micropython,Peetz0r/micropython-esp32,cloudformdesign/micropython,vitiral/micropython,blmorris/micropython,jimkmc/micropython,hosaka/micropython,omtinez/micropython,matthewelse/micropython,cnoviello/micropython,hiway/micropython,aitjcize/micropython,methoxid/micropystat,tdautc19841202/micropython,ahotam/micropython,cnoviello/micropython,SHA2017-badge/micropython-esp32,SHA2017-badge/micropython-esp32,mhoffma/micropython,martinribelotta/micropython,matthewelse/micropython,noahwilliamsson/micropython,oopy/micropython,ChuckM/micropython,puuu/micropython,KISSMonX/micropython,tuc-osg/micropython,mgyenik/micropython,xyb/micropython,adafruit/circuitpython,praemdonck/micropython,ericsnowcurrently/micropython,redbear/micropython,HenrikSolver/micropython,noahchense/micropython,utopiaprince/micropython,aethaniel/micropython,orionrobots/micropython,dxxb/micropython,mgyenik/micropython,utopiaprince/micropython,slzatz/micropython,hiway/micropython,pramasoul/micropython,toolmacher/micropython,puuu/micropython,vitiral/micropython,blazewicz/micropython,danicampora/micropython,supergis/micropython,blmorris/micropython,ganshun666/micropython,TDAbboud/micropython,Vogtinator/micropython,tobbad/micropython,Peetz0r/micropython-esp32,stonegithubs/micropython,xhat/micropython,torwag/micropython,TDAbboud/micropython,toolmacher/micropython,jimkmc/micropython,pfalcon/micropython,pozetroninc/micropython,adafruit/circuitpython,TDAbboud/micropython,ericsnowcurrently/micropython,MrSurly/micropython-esp32,kostyll/micropython,paul-xxx/micropython,infinnovation/micropython,skybird6672/micropython,vriera/micropython,alex-march/micropython,stonegithubs/micropython,EcmaXp/micropython,xhat/micropython,selste/micropython,tralamazza/micropython,slzatz/micropython,kerneltask/micropython,skybird6672/micropython,stonegithubs/micropython,pozetroninc/micropython | 75488d5639819f31b01f76433b82d6259323230d |
/*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
float *measure_delta(object a, object b)
{
object cc;
float dx, dy, dz;
cc = SUBD->query_common_container(a, b);
if (!cc) {
error("Objects not on same plane of existence");
}
while (b != cc) {
dx += b->query_x_position();
dy += b->query_y_position();
dz += b->query_z_position();
b = b->query_environment();
}
while (a != cc) {
dx -= a->query_x_position();
dy -= a->query_y_position();
dz -= a->query_z_position();
a = a->query_environment();
}
return ({ dx, dy, dz });
}
| /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
| ---
+++
@@ -17,3 +17,31 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+float *measure_delta(object a, object b)
+{
+ object cc;
+
+ float dx, dy, dz;
+
+ cc = SUBD->query_common_container(a, b);
+
+ if (!cc) {
+ error("Objects not on same plane of existence");
+ }
+
+ while (b != cc) {
+ dx += b->query_x_position();
+ dy += b->query_y_position();
+ dz += b->query_z_position();
+ b = b->query_environment();
+ }
+
+ while (a != cc) {
+ dx -= a->query_x_position();
+ dy -= a->query_y_position();
+ dz -= a->query_z_position();
+ a = a->query_environment();
+ }
+
+ return ({ dx, dy, dz });
+} | Add difference delta measurement routine
| agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka | 05bf8903188764ffe423b03b72b8c2cb44eeb6b2 |
//-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
template<class T>
const T& matrix<T>::at( std::size_t row, std::size_t col ) const{
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
return matrix_row(this,row);
}
template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
std::size_t row ) const{
return matrix_row(this,row);
}
//-----------------------------------------------------------------------------
// Row class element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::matrix_row::operator[](std::size_t col){
return matrix_->data_[row_*matrix_->cols_+col];
}
template<class T>
const T& matrix<T>::matrix_row::operator[](std::size_t col) const{
return matrix_->data_[row_*matrix_->cols_+col];
}
| //-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------
template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
template<class T>
const T& matrix<T>::at( std::size_t row, std::size_t col ) const{
// TODO throw if out of bounds
return data_.at(row*cols_+col);
}
template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
return 0;
}
template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
std::size_t row ) const{
return 0;
}
| ---
+++
@@ -16,12 +16,26 @@
template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
- return 0;
+ return matrix_row(this,row);
}
template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
std::size_t row ) const{
- return 0;
+ return matrix_row(this,row);
}
+//-----------------------------------------------------------------------------
+// Row class element Access
+//-----------------------------------------------------------------------------
+
+template<class T>
+T& matrix<T>::matrix_row::operator[](std::size_t col){
+ return matrix_->data_[row_*matrix_->cols_+col];
+}
+
+template<class T>
+const T& matrix<T>::matrix_row::operator[](std::size_t col) const{
+ return matrix_->data_[row_*matrix_->cols_+col];
+}
+ | Add square bracket opertator access.
| mit | actinium/cppMatrix,actinium/cppMatrix | 0c55d02164a8fcc6682791603e53d7c099f59699 |
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkMesaGLContext_DEFINED
#define SkMesaGLContext_DEFINED
#include "SkGLContext.h"
#if SK_MESA
class SkMesaGLContext : public SkGLContext {
private:
typedef intptr_t Context;
public:
SkMesaGLContext();
virtual ~SkMesaGLContext();
virtual void makeCurrent() const SK_OVERRIDE;
class AutoContextRestore {
public:
AutoContextRestore();
~AutoContextRestore();
private:
Context fOldContext;
GrGLint fOldWidth;
GrGLint fOldHeight;
GrGLint fOldFormat;
void* fOldImage;
};
protected:
virtual const GrGLInterface* createGLContext() SK_OVERRIDE;
virtual void destroyGLContext() SK_OVERRIDE;
private:
Context fContext;
GrGLubyte *fImage;
};
#endif
#endif
|
/*
* 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 intptr_t Context;
public:
SkMesaGLContext();
virtual ~SkMesaGLContext();
virtual void makeCurrent() const SK_OVERRIDE;
class AutoContextRestore {
public:
AutoContextRestore();
~AutoContextRestore();
private:
Context fOldContext;
GLint fOldWidth;
GLint fOldHeight;
GLint fOldFormat;
void* fOldImage;
};
protected:
virtual const GrGLInterface* createGLContext() SK_OVERRIDE;
virtual void destroyGLContext() SK_OVERRIDE;
private:
Context fContext;
GrGLubyte *fImage;
};
#endif
#endif
| ---
+++
@@ -30,9 +30,9 @@
private:
Context fOldContext;
- GLint fOldWidth;
- GLint fOldHeight;
- GLint fOldFormat;
+ GrGLint fOldWidth;
+ GrGLint fOldHeight;
+ GrGLint fOldFormat;
void* fOldImage;
};
| Fix undefined GLint in Mac builds
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@3736 2bbb7eff-a529-9590-31e7-b0007b416f81
| bsd-3-clause | geekboxzone/lollipop_external_chromium_org_third_party_skia,sombree/android_external_skia,rubenvb/skia,Purity-Lollipop/platform_external_skia,FusionSP/android_external_skia,PAC-ROM/android_external_skia,aosp-mirror/platform_external_skia,DiamondLovesYou/skia-sys,zhaochengw/platform_external_skia,aospo/platform_external_skia,fire855/android_external_skia,Khaon/android_external_skia,FusionSP/android_external_skia,google/skia,TeamTwisted/external_skia,houst0nn/external_skia,fire855/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,aospo/platform_external_skia,GladeRom/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,mydongistiny/android_external_skia,amyvmiwei/skia,MinimalOS/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,Infusion-OS/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,mydongistiny/android_external_skia,Samsung/skia,Euphoria-OS-Legacy/android_external_skia,NamelessRom/android_external_skia,FusionSP/external_chromium_org_third_party_skia,tmpvar/skia.cc,xzzz9097/android_external_skia,chenlian2015/skia_from_google,GladeRom/android_external_skia,TeslaProject/external_skia,pacerom/external_skia,temasek/android_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,ominux/skia,NamelessRom/android_external_skia,boulzordev/android_external_skia,TeslaProject/external_skia,samuelig/skia,TeslaOS/android_external_skia,TeamEOS/external_skia,MinimalOS/external_chromium_org_third_party_skia,mmatyas/skia,Igalia/skia,Jichao/skia,Hybrid-Rom/external_skia,ominux/skia,sudosurootdev/external_skia,RadonX-ROM/external_skia,Infusion-OS/android_external_skia,invisiblek/android_external_skia,mozilla-b2g/external_skia,Hybrid-Rom/external_skia,DesolationStaging/android_external_skia,FusionSP/android_external_skia,aosp-mirror/platform_external_skia,Jichao/skia,ench0/external_skia,Omegaphora/external_skia,MarshedOut/android_external_skia,Asteroid-Project/android_external_skia,AOSPB/external_skia,Plain-Andy/android_platform_external_skia,F-AOSP/platform_external_skia,jtg-gg/skia,Pure-Aosp/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,Omegaphora/external_skia,larsbergstrom/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,BrokenROM/external_skia,timduru/platform-external-skia,todotodoo/skia,noselhq/skia,VRToxin-AOSP/android_external_skia,jtg-gg/skia,TeamEOS/external_chromium_org_third_party_skia,sudosurootdev/external_skia,AOSPA-L/android_external_skia,byterom/android_external_skia,Omegaphora/external_skia,Infinitive-OS/platform_external_skia,Hikari-no-Tenshi/android_external_skia,fire855/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,TeamTwisted/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,AOSPA-L/android_external_skia,UBERMALLOW/external_skia,larsbergstrom/skia,sigysmund/platform_external_skia,nox/skia,MyAOSP/external_chromium_org_third_party_skia,timduru/platform-external-skia,NamelessRom/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,houst0nn/external_skia,TeamTwisted/external_skia,Jichao/skia,android-ia/platform_external_skia,YUPlayGodDev/platform_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,MinimalOS/external_skia,suyouxin/android_external_skia,Jichao/skia,boulzordev/android_external_skia,zhaochengw/platform_external_skia,MonkeyZZZZ/platform_external_skia,suyouxin/android_external_skia,YUPlayGodDev/platform_external_skia,vanish87/skia,MinimalOS-AOSP/platform_external_skia,nfxosp/platform_external_skia,ctiao/platform-external-skia,google/skia,pcwalton/skia,spezi77/android_external_skia,OptiPop/external_skia,todotodoo/skia,DiamondLovesYou/skia-sys,F-AOSP/platform_external_skia,AndroidOpenDevelopment/android_external_skia,sigysmund/platform_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,TeamTwisted/external_skia,OptiPop/external_chromium_org_third_party_skia,OneRom/external_skia,Infusion-OS/android_external_skia,FusionSP/android_external_skia,MinimalOS/external_skia,OptiPop/external_chromium_org_third_party_skia,chenlian2015/skia_from_google,PAC-ROM/android_external_skia,Hikari-no-Tenshi/android_external_skia,geekboxzone/mmallow_external_skia,geekboxzone/mmallow_external_skia,nfxosp/platform_external_skia,todotodoo/skia,aospo/platform_external_skia,Fusion-Rom/android_external_skia,AOSPA-L/android_external_skia,Asteroid-Project/android_external_skia,shahrzadmn/skia,VRToxin-AOSP/android_external_skia,ench0/external_skia,HalCanary/skia-hc,Tesla-Redux/android_external_skia,AOSP-YU/platform_external_skia,TeamTwisted/external_skia,Purity-Lollipop/platform_external_skia,AOSPB/external_skia,OneRom/external_skia,nox/skia,InfinitiveOS/external_skia,houst0nn/external_skia,MarshedOut/android_external_skia,TeslaProject/external_skia,larsbergstrom/skia,codeaurora-unoffical/platform-external-skia,noselhq/skia,rubenvb/skia,fire855/android_external_skia,MIPS/external-chromium_org-third_party-skia,SlimSaber/android_external_skia,NamelessRom/android_external_skia,TeslaOS/android_external_skia,NamelessRom/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,mmatyas/skia,YUPlayGodDev/platform_external_skia,ominux/skia,Hybrid-Rom/external_skia,TeslaProject/external_skia,Euphoria-OS-Legacy/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,sombree/android_external_skia,nvoron23/skia,amyvmiwei/skia,Igalia/skia,pacerom/external_skia,aosp-mirror/platform_external_skia,PAC-ROM/android_external_skia,nfxosp/platform_external_skia,jtg-gg/skia,byterom/android_external_skia,android-ia/platform_external_skia,YUPlayGodDev/platform_external_skia,houst0nn/external_skia,UBERMALLOW/external_skia,android-ia/platform_external_chromium_org_third_party_skia,Igalia/skia,w3nd1go/android_external_skia,nox/skia,nvoron23/skia,timduru/platform-external-skia,pcwalton/skia,nvoron23/skia,GladeRom/android_external_skia,noselhq/skia,Fusion-Rom/external_chromium_org_third_party_skia,aospo/platform_external_skia,qrealka/skia-hc,DARKPOP/external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,ctiao/platform-external-skia,chenlian2015/skia_from_google,Tesla-Redux/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSPB/external_skia,android-ia/platform_external_skia,amyvmiwei/skia,HalCanary/skia-hc,vanish87/skia,geekboxzone/lollipop_external_skia,android-ia/platform_external_chromium_org_third_party_skia,pcwalton/skia,YUPlayGodDev/platform_external_skia,nox/skia,FusionSP/android_external_skia,rubenvb/skia,MinimalOS/android_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,Purity-Lollipop/platform_external_skia,Pure-Aosp/android_external_skia,samuelig/skia,Asteroid-Project/android_external_skia,suyouxin/android_external_skia,HalCanary/skia-hc,temasek/android_external_skia,Omegaphora/external_skia,Euphoria-OS-Legacy/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,tmpvar/skia.cc,FusionSP/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,ench0/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,CyanogenMod/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,OneRom/external_skia,qrealka/skia-hc,Infinitive-OS/platform_external_skia,F-AOSP/platform_external_skia,ench0/external_skia,HalCanary/skia-hc,MinimalOS-AOSP/platform_external_skia,TeslaOS/android_external_skia,vvuk/skia,MarshedOut/android_external_skia,nox/skia,MinimalOS/android_external_skia,OptiPop/external_skia,ominux/skia,OptiPop/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,byterom/android_external_skia,SlimSaber/android_external_skia,GladeRom/android_external_skia,Khaon/android_external_skia,TeamExodus/external_skia,nvoron23/skia,OptiPop/external_chromium_org_third_party_skia,Pure-Aosp/android_external_skia,w3nd1go/android_external_skia,VRToxin-AOSP/android_external_skia,sudosurootdev/external_skia,akiss77/skia,suyouxin/android_external_skia,AOSPB/external_skia,Jichao/skia,ctiao/platform-external-skia,geekboxzone/lollipop_external_skia,ench0/external_chromium_org_third_party_skia,Infusion-OS/android_external_skia,mozilla-b2g/external_skia,nox/skia,MIPS/external-chromium_org-third_party-skia,zhaochengw/platform_external_skia,wildermason/external_skia,ctiao/platform-external-skia,qrealka/skia-hc,Infinitive-OS/platform_external_skia,InfinitiveOS/external_skia,rubenvb/skia,scroggo/skia,ench0/external_chromium_org_third_party_skia,TeslaProject/external_skia,Pure-Aosp/android_external_skia,Igalia/skia,DiamondLovesYou/skia-sys,invisiblek/android_external_skia,AndroidOpenDevelopment/android_external_skia,temasek/android_external_skia,samuelig/skia,geekboxzone/mmallow_external_skia,codeaurora-unoffical/platform-external-skia,VRToxin-AOSP/android_external_skia,suyouxin/android_external_skia,OptiPop/external_chromium_org_third_party_skia,Android-AOSP/external_skia,aosp-mirror/platform_external_skia,shahrzadmn/skia,pacerom/external_skia,Android-AOSP/external_skia,AOSPA-L/android_external_skia,vanish87/skia,xin3liang/platform_external_chromium_org_third_party_skia,Samsung/skia,OneRom/external_skia,houst0nn/external_skia,OptiPop/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,noselhq/skia,SlimSaber/android_external_skia,aosp-mirror/platform_external_skia,sigysmund/platform_external_skia,larsbergstrom/skia,MIPS/external-chromium_org-third_party-skia,android-ia/platform_external_skia,Tesla-Redux/android_external_skia,xzzz9097/android_external_skia,TeamEOS/external_skia,timduru/platform-external-skia,BrokenROM/external_skia,google/skia,todotodoo/skia,Fusion-Rom/android_external_skia,Purity-Lollipop/platform_external_skia,AsteroidOS/android_external_skia,xzzz9097/android_external_skia,SlimSaber/android_external_skia,Hikari-no-Tenshi/android_external_skia,Tesla-Redux/android_external_skia,w3nd1go/android_external_skia,amyvmiwei/skia,sudosurootdev/external_skia,fire855/android_external_skia,TeamBliss-LP/android_external_skia,TeamEOS/external_skia,AndroidOpenDevelopment/android_external_skia,AsteroidOS/android_external_skia,TeamEOS/external_skia,AOSPA-L/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_skia,UBERMALLOW/external_skia,OptiPop/external_skia,MarshedOut/android_external_skia,sigysmund/platform_external_skia,F-AOSP/platform_external_skia,FusionSP/android_external_skia,Euphoria-OS-Legacy/android_external_skia,qrealka/skia-hc,MIPS/external-chromium_org-third_party-skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,vvuk/skia,Tesla-Redux/android_external_skia,ench0/external_chromium_org_third_party_skia,byterom/android_external_skia,AOSP-YU/platform_external_skia,nfxosp/platform_external_skia,TeslaProject/external_skia,Hikari-no-Tenshi/android_external_skia,TeamEOS/external_skia,aosp-mirror/platform_external_skia,Tesla-Redux/android_external_skia,geekboxzone/lollipop_external_skia,pcwalton/skia,xzzz9097/android_external_skia,MonkeyZZZZ/platform_external_skia,mydongistiny/android_external_skia,sombree/android_external_skia,ench0/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,HalCanary/skia-hc,sombree/android_external_skia,tmpvar/skia.cc,android-ia/platform_external_skia,Euphoria-OS-Legacy/android_external_skia,wildermason/external_skia,VentureROM-L/android_external_skia,jtg-gg/skia,MyAOSP/external_chromium_org_third_party_skia,DesolationStaging/android_external_skia,MinimalOS-AOSP/platform_external_skia,MonkeyZZZZ/platform_external_skia,MinimalOS-AOSP/platform_external_skia,jtg-gg/skia,vvuk/skia,todotodoo/skia,boulzordev/android_external_skia,amyvmiwei/skia,pcwalton/skia,YUPlayGodDev/platform_external_skia,VentureROM-L/android_external_skia,boulzordev/android_external_skia,ench0/external_skia,chenlian2015/skia_from_google,codeaurora-unoffical/platform-external-skia,TeslaProject/external_skia,AOSPB/external_skia,Infinitive-OS/platform_external_skia,temasek/android_external_skia,zhaochengw/platform_external_skia,Fusion-Rom/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,shahrzadmn/skia,fire855/android_external_skia,Igalia/skia,sombree/android_external_skia,aospo/platform_external_skia,boulzordev/android_external_skia,AOSPU/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,pacerom/external_skia,TeamTwisted/external_skia,mydongistiny/android_external_skia,Euphoria-OS-Legacy/android_external_skia,OptiPop/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,TeamTwisted/external_skia,geekboxzone/mmallow_external_skia,TeamEOS/external_chromium_org_third_party_skia,w3nd1go/android_external_skia,scroggo/skia,MinimalOS/external_skia,AOSP-YU/platform_external_skia,YUPlayGodDev/platform_external_skia,amyvmiwei/skia,Infusion-OS/android_external_skia,RadonX-ROM/external_skia,TeamTwisted/external_skia,boulzordev/android_external_skia,mmatyas/skia,Khaon/android_external_skia,aospo/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,ominux/skia,zhaochengw/platform_external_skia,AsteroidOS/android_external_skia,UBERMALLOW/external_skia,VentureROM-L/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,MIPS/external-chromium_org-third_party-skia,vanish87/skia,OptiPop/external_chromium_org_third_party_skia,Jichao/skia,TeamTwisted/external_skia,nvoron23/skia,RadonX-ROM/external_skia,TeamBliss-LP/android_external_skia,zhaochengw/platform_external_skia,boulzordev/android_external_skia,ctiao/platform-external-skia,DiamondLovesYou/skia-sys,Hybrid-Rom/external_skia,Omegaphora/external_chromium_org_third_party_skia,temasek/android_external_skia,Android-AOSP/external_skia,Purity-Lollipop/platform_external_skia,mmatyas/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,wildermason/external_skia,vvuk/skia,MinimalOS/android_external_skia,shahrzadmn/skia,shahrzadmn/skia,TeslaOS/android_external_skia,MinimalOS/external_skia,MinimalOS/external_skia,android-ia/platform_external_skia,Omegaphora/external_chromium_org_third_party_skia,vvuk/skia,TeamExodus/external_skia,Khaon/android_external_skia,Plain-Andy/android_platform_external_skia,ench0/external_skia,MinimalOS/external_skia,Euphoria-OS-Legacy/android_external_skia,BrokenROM/external_skia,MonkeyZZZZ/platform_external_skia,MarshedOut/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,xin3liang/platform_external_chromium_org_third_party_skia,mozilla-b2g/external_skia,vanish87/skia,VRToxin-AOSP/android_external_skia,Khaon/android_external_skia,samuelig/skia,FusionSP/external_chromium_org_third_party_skia,Pure-Aosp/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,GladeRom/android_external_skia,noselhq/skia,AOSPU/external_chromium_org_third_party_skia,AOSPA-L/android_external_skia,vanish87/skia,rubenvb/skia,pcwalton/skia,AOSPA-L/android_external_skia,w3nd1go/android_external_skia,larsbergstrom/skia,InfinitiveOS/external_skia,DARKPOP/external_chromium_org_third_party_skia,vanish87/skia,VentureROM-L/android_external_skia,VRToxin-AOSP/android_external_skia,Hybrid-Rom/external_skia,scroggo/skia,spezi77/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,Omegaphora/external_skia,MyAOSP/external_chromium_org_third_party_skia,byterom/android_external_skia,vvuk/skia,samuelig/skia,sudosurootdev/external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,akiss77/skia,sigysmund/platform_external_skia,Pure-Aosp/android_external_skia,spezi77/android_external_skia,Android-AOSP/external_skia,ctiao/platform-external-skia,google/skia,samuelig/skia,GladeRom/android_external_skia,Jichao/skia,mydongistiny/android_external_skia,Purity-Lollipop/platform_external_skia,MinimalOS/android_external_skia,VentureROM-L/android_external_skia,OptiPop/external_skia,Infinitive-OS/platform_external_skia,UBERMALLOW/external_skia,nfxosp/platform_external_skia,AOSPB/external_skia,TeamExodus/external_skia,FusionSP/android_external_skia,byterom/android_external_skia,RadonX-ROM/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,AndroidOpenDevelopment/android_external_skia,zhaochengw/platform_external_skia,ench0/external_chromium_org_third_party_skia,OptiPop/external_skia,BrokenROM/external_skia,Igalia/skia,android-ia/platform_external_chromium_org_third_party_skia,TeamEOS/external_skia,sudosurootdev/external_skia,todotodoo/skia,larsbergstrom/skia,AOSP-YU/platform_external_skia,Tesla-Redux/android_external_skia,geekboxzone/mmallow_external_skia,noselhq/skia,mozilla-b2g/external_skia,RadonX-ROM/external_skia,xzzz9097/android_external_skia,ench0/external_skia,AOSPU/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,OptiPop/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,OneRom/external_skia,mydongistiny/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,SlimSaber/android_external_skia,scroggo/skia,Android-AOSP/external_skia,Samsung/skia,FusionSP/external_chromium_org_third_party_skia,TeamExodus/external_skia,NamelessRom/android_external_skia,TeamExodus/external_skia,pcwalton/skia,Hybrid-Rom/external_skia,akiss77/skia,MarshedOut/android_external_skia,VentureROM-L/android_external_skia,TeslaOS/android_external_skia,w3nd1go/android_external_skia,HealthyHoney/temasek_SKIA,google/skia,HalCanary/skia-hc,MinimalOS-AOSP/platform_external_skia,OneRom/external_skia,Khaon/android_external_skia,Igalia/skia,xin3liang/platform_external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,UBERMALLOW/external_skia,timduru/platform-external-skia,Infusion-OS/android_external_skia,TeamBliss-LP/android_external_skia,jtg-gg/skia,android-ia/platform_external_skia,nfxosp/platform_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,OneRom/external_skia,Hikari-no-Tenshi/android_external_skia,Samsung/skia,DARKPOP/external_chromium_org_third_party_skia,OptiPop/external_skia,akiss77/skia,AOSP-YU/platform_external_skia,pacerom/external_skia,w3nd1go/android_external_skia,AsteroidOS/android_external_skia,mydongistiny/android_external_skia,w3nd1go/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,w3nd1go/android_external_skia,android-ia/platform_external_skia,Samsung/skia,MonkeyZZZZ/platform_external_skia,OptiPop/external_skia,amyvmiwei/skia,tmpvar/skia.cc,AsteroidOS/android_external_skia,FusionSP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,google/skia,TeslaOS/android_external_skia,tmpvar/skia.cc,geekboxzone/lollipop_external_skia,VentureROM-L/android_external_skia,TeamExodus/external_skia,SlimSaber/android_external_skia,invisiblek/android_external_skia,sombree/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,ctiao/platform-external-skia,Omegaphora/external_chromium_org_third_party_skia,AOSPB/external_skia,AOSPB/external_skia,MyAOSP/external_chromium_org_third_party_skia,AsteroidOS/android_external_skia,tmpvar/skia.cc,ench0/external_skia,Samsung/skia,Fusion-Rom/android_external_skia,Tesla-Redux/android_external_skia,amyvmiwei/skia,xzzz9097/android_external_skia,vvuk/skia,DARKPOP/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,RadonX-ROM/external_skia,aosp-mirror/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,Fusion-Rom/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,boulzordev/android_external_skia,Khaon/android_external_skia,temasek/android_external_skia,mmatyas/skia,MyAOSP/external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,Asteroid-Project/android_external_skia,spezi77/android_external_skia,InfinitiveOS/external_skia,aosp-mirror/platform_external_skia,boulzordev/android_external_skia,ominux/skia,Jichao/skia,xin3liang/platform_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,mozilla-b2g/external_skia,pcwalton/skia,vvuk/skia,ominux/skia,Android-AOSP/external_skia,larsbergstrom/skia,AOSP-YU/platform_external_skia,AOSPB/external_skia,Purity-Lollipop/platform_external_skia,MonkeyZZZZ/platform_external_skia,aospo/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,Asteroid-Project/android_external_skia,pcwalton/skia,wildermason/external_skia,UBERMALLOW/external_skia,RadonX-ROM/external_skia,AsteroidOS/android_external_skia,HealthyHoney/temasek_SKIA,chenlian2015/skia_from_google,Asteroid-Project/android_external_skia,byterom/android_external_skia,suyouxin/android_external_skia,GladeRom/android_external_skia,timduru/platform-external-skia,Hybrid-Rom/external_skia,TeslaOS/android_external_skia,mmatyas/skia,MarshedOut/android_external_skia,MarshedOut/android_external_skia,F-AOSP/platform_external_skia,Hikari-no-Tenshi/android_external_skia,NamelessRom/android_external_skia,byterom/android_external_skia,wildermason/external_skia,rubenvb/skia,AOSP-YU/platform_external_skia,sigysmund/platform_external_skia,xzzz9097/android_external_skia,suyouxin/android_external_skia,invisiblek/android_external_skia,qrealka/skia-hc,GladeRom/android_external_skia,sigysmund/platform_external_skia,HalCanary/skia-hc,Fusion-Rom/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_skia,DesolationStaging/android_external_skia,Infusion-OS/android_external_skia,Plain-Andy/android_platform_external_skia,Infinitive-OS/platform_external_skia,geekboxzone/lollipop_external_skia,aosp-mirror/platform_external_skia,fire855/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,google/skia,AOSPA-L/android_external_skia,SlimSaber/android_external_skia,NamelessRom/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,akiss77/skia,wildermason/external_skia,F-AOSP/platform_external_skia,sombree/android_external_skia,VentureROM-L/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,TeamEOS/external_chromium_org_third_party_skia,larsbergstrom/skia,HalCanary/skia-hc,PAC-ROM/android_external_skia,TeamExodus/external_skia,scroggo/skia,rubenvb/skia,ominux/skia,aospo/platform_external_skia,codeaurora-unoffical/platform-external-skia,TeslaOS/android_external_skia,HealthyHoney/temasek_SKIA,MinimalOS/external_skia,Omegaphora/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,todotodoo/skia,rubenvb/skia,wildermason/external_skia,mmatyas/skia,PAC-ROM/android_external_skia,HalCanary/skia-hc,DARKPOP/external_chromium_org_third_party_skia,Pure-Aosp/android_external_skia,OneRom/external_skia,Asteroid-Project/android_external_skia,MIPS/external-chromium_org-third_party-skia,Jichao/skia,pacerom/external_skia,MinimalOS-AOSP/platform_external_skia,noselhq/skia,TeamExodus/external_skia,MinimalOS/android_external_skia,ench0/external_skia,Infinitive-OS/platform_external_skia,todotodoo/skia,DesolationStaging/android_external_skia,Omegaphora/external_skia,invisiblek/android_external_skia,BrokenROM/external_skia,nox/skia,xzzz9097/android_external_skia,akiss77/skia,noselhq/skia,mydongistiny/external_chromium_org_third_party_skia,tmpvar/skia.cc,F-AOSP/platform_external_skia,BrokenROM/external_skia,AOSPU/external_chromium_org_third_party_skia,timduru/platform-external-skia,mozilla-b2g/external_skia,larsbergstrom/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,houst0nn/external_skia,TeamBliss-LP/android_external_skia,Infusion-OS/android_external_skia,DiamondLovesYou/skia-sys,wildermason/external_skia,MarshedOut/android_external_skia,google/skia,nox/skia,AndroidOpenDevelopment/android_external_skia,nvoron23/skia,MinimalOS/android_external_skia,vvuk/skia,MinimalOS/android_external_chromium_org_third_party_skia,mmatyas/skia,Samsung/skia,chenlian2015/skia_from_google,Plain-Andy/android_platform_external_skia,mydongistiny/android_external_skia,ench0/external_chromium_org_third_party_skia,nvoron23/skia,aosp-mirror/platform_external_skia,Samsung/skia,PAC-ROM/android_external_skia,scroggo/skia,Omegaphora/external_skia,nvoron23/skia,sombree/android_external_skia,AOSP-YU/platform_external_skia,HealthyHoney/temasek_SKIA,Fusion-Rom/android_external_skia,MIPS/external-chromium_org-third_party-skia,ench0/external_chromium_org_third_party_skia,tmpvar/skia.cc,geekboxzone/mmallow_external_skia,zhaochengw/platform_external_skia,codeaurora-unoffical/platform-external-skia,DiamondLovesYou/skia-sys,PAC-ROM/android_external_skia,samuelig/skia,vanish87/skia,tmpvar/skia.cc,samuelig/skia,MinimalOS/android_external_chromium_org_third_party_skia,Euphoria-OS-Legacy/android_external_skia,PAC-ROM/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,ominux/skia,Plain-Andy/android_platform_external_skia,sudosurootdev/external_skia,Infinitive-OS/platform_external_skia,geekboxzone/lollipop_external_skia,jtg-gg/skia,InfinitiveOS/external_skia,SlimSaber/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,invisiblek/android_external_skia,todotodoo/skia,qrealka/skia-hc,sudosurootdev/external_skia,android-ia/platform_external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,codeaurora-unoffical/platform-external-skia,RadonX-ROM/external_skia,temasek/android_external_skia,geekboxzone/mmallow_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,qrealka/skia-hc,vanish87/skia,InfinitiveOS/external_skia,MinimalOS-AOSP/platform_external_skia,shahrzadmn/skia,mmatyas/skia,UBERMALLOW/external_skia,Fusion-Rom/android_external_skia,BrokenROM/external_skia,AsteroidOS/android_external_skia,MinimalOS/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,google/skia,sigysmund/platform_external_skia,HealthyHoney/temasek_SKIA,CyanogenMod/android_external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,MyAOSP/external_chromium_org_third_party_skia,akiss77/skia,nfxosp/platform_external_skia,TeamExodus/external_skia,TeamEOS/external_skia,DARKPOP/external_chromium_org_third_party_skia,akiss77/skia,Khaon/android_external_skia,scroggo/skia,temasek/android_external_skia,fire855/android_external_skia,HealthyHoney/temasek_SKIA,mydongistiny/external_chromium_org_third_party_skia,AndroidOpenDevelopment/android_external_skia,shahrzadmn/skia,invisiblek/android_external_skia,OneRom/external_skia,F-AOSP/platform_external_skia,mozilla-b2g/external_skia,geekboxzone/mmallow_external_skia,FusionSP/external_chromium_org_third_party_skia,BrokenROM/external_skia,spezi77/android_external_skia,Igalia/skia,qrealka/skia-hc,Fusion-Rom/android_external_skia,houst0nn/external_skia,Pure-Aosp/android_external_skia,MonkeyZZZZ/platform_external_skia,MinimalOS/android_external_skia,scroggo/skia,HealthyHoney/temasek_SKIA,UBERMALLOW/external_skia,Purity-Lollipop/platform_external_skia,AndroidOpenDevelopment/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,HealthyHoney/temasek_SKIA,AOSP-YU/platform_external_skia,rubenvb/skia,android-ia/platform_external_chromium_org_third_party_skia,nox/skia,Android-AOSP/external_skia,shahrzadmn/skia,Fusion-Rom/external_chromium_org_third_party_skia,mydongistiny/android_external_skia,Omegaphora/external_skia,YUPlayGodDev/platform_external_skia,nvoron23/skia,geekboxzone/mmallow_external_skia,DesolationStaging/android_external_skia,rubenvb/skia,MinimalOS/external_chromium_org_third_party_skia,mozilla-b2g/external_skia,shahrzadmn/skia,MinimalOS/android_external_chromium_org_third_party_skia,MinimalOS/external_skia,pacerom/external_skia,AOSPU/external_chromium_org_third_party_skia,YUPlayGodDev/platform_external_skia,invisiblek/android_external_skia,spezi77/android_external_skia,DesolationStaging/android_external_skia,TeslaProject/external_skia,Asteroid-Project/android_external_skia,akiss77/skia,noselhq/skia | b3400badf022b4ff6f3545d1baa706affc22d93d |
#define FLATCC_VERSION_TEXT "0.5.0-pre"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 5
#define FLATCC_VERSION_PATCH 0
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 0
| #define FLATCC_VERSION_TEXT "0.4.3"
#define FLATCC_VERSION_MAJOR 0
#define FLATCC_VERSION_MINOR 4
#define FLATCC_VERSION_PATCH 3
/* 1 or 0 */
#define FLATCC_VERSION_RELEASED 1
| ---
+++
@@ -1,6 +1,6 @@
-#define FLATCC_VERSION_TEXT "0.4.3"
+#define FLATCC_VERSION_TEXT "0.5.0-pre"
#define FLATCC_VERSION_MAJOR 0
-#define FLATCC_VERSION_MINOR 4
-#define FLATCC_VERSION_PATCH 3
+#define FLATCC_VERSION_MINOR 5
+#define FLATCC_VERSION_PATCH 0
/* 1 or 0 */
-#define FLATCC_VERSION_RELEASED 1
+#define FLATCC_VERSION_RELEASED 0 | Prepare for next version version
| apache-2.0 | dvidelabs/flatcc,dvidelabs/flatcc,dvidelabs/flatcc | 19cc9b027e894e1dff68f18d7d660ac55b20b784 |
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _STR_H
#define _STR_H
void Sinit (void);
void Sterm (void);
char *Spath (char *, Tobj);
char *Sseen (Tobj, char *);
char *Sabstract (Tobj, Tobj);
char *Stfull (Tobj);
char *Ssfull (Tobj, Tobj);
char *Scfull (Tobj, int, int);
#endif /* _STR_H */
#ifdef __cplusplus
}
#endif
| /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/* Lefteris Koutsofios - AT&T Bell Laboratories */
#ifndef _STR_H
#define _STR_H
void Sinit(void);
void Sterm(void);
char *Spath(char *, Tobj);
char *Sseen(Tobj, char *);
char *Sabstract(Tobj, Tobj);
char *Stfull(Tobj);
char *Ssfull(Tobj, Tobj);
char *Scfull(Tobj, int, int);
#endif /* _STR_H */
#ifdef __cplusplus
}
#endif
| ---
+++
@@ -18,20 +18,19 @@
extern "C" {
#endif
-
-/* Lefteris Koutsofios - AT&T Bell Laboratories */
+/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _STR_H
#define _STR_H
- void Sinit(void);
- void Sterm(void);
- char *Spath(char *, Tobj);
- char *Sseen(Tobj, char *);
- char *Sabstract(Tobj, Tobj);
- char *Stfull(Tobj);
- char *Ssfull(Tobj, Tobj);
- char *Scfull(Tobj, int, int);
-#endif /* _STR_H */
+void Sinit (void);
+void Sterm (void);
+char *Spath (char *, Tobj);
+char *Sseen (Tobj, char *);
+char *Sabstract (Tobj, Tobj);
+char *Stfull (Tobj);
+char *Ssfull (Tobj, Tobj);
+char *Scfull (Tobj, int, int);
+#endif /* _STR_H */
#ifdef __cplusplus
} | Update with new lefty, fixing many bugs and supporting new features
| epl-1.0 | MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,ellson/graphviz,MjAbuz/graphviz,jho1965us/graphviz,tkelman/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,jho1965us/graphviz,jho1965us/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,BMJHayward/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,kbrock/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,pixelglow/graphviz,pixelglow/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,BMJHayward/graphviz | a4a5d761f9cee11c229b9a10189505ead3324bc5 |
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern int foo_alias (void) __asm ("foo");
inline int foo (void) {
return foo_alias ();
}
int f(void) {
return foo();
}
// CHECK-NOT: define
// CHECK: define i32 @f()
// CHECK: call i32 @foo()
// CHECK-NEXT: ret i32
// CHECK-NOT: define
| // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern int foo_alias (void) __asm ("foo");
inline int foo (void) {
return foo_alias ();
}
int f(void) {
return foo();
}
// CHECK-NOT: define
// CHECK: define i32 @f()
// CHECK: %call = call i32 @foo()
// CHECK: ret i32 %call
// CHECK-NOT: define
| ---
+++
@@ -10,6 +10,6 @@
// CHECK-NOT: define
// CHECK: define i32 @f()
-// CHECK: %call = call i32 @foo()
-// CHECK: ret i32 %call
+// CHECK: call i32 @foo()
+// CHECK-NEXT: ret i32
// CHECK-NOT: define | Fix this tests on the bots.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@143052 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang | e8f4eed954eaa0c5020d61250b8222c41511f413 |
#ifndef _PPC_BOOT_REG_H
#define _PPC_BOOT_REG_H
/*
* Copyright 2007 Davud Gibson, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
static inline u32 mfpvr(void)
{
u32 pvr;
asm volatile ("mfpvr %0" : "=r"(pvr));
return pvr;
}
#define __stringify_1(x) #x
#define __stringify(x) __stringify_1(x)
#define mfspr(rn) ({unsigned long rval; \
asm volatile("mfspr %0," __stringify(rn) \
: "=r" (rval)); rval; })
#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
register void *__stack_pointer asm("r1");
#define get_sp() (__stack_pointer)
#endif /* _PPC_BOOT_REG_H */
| #ifndef _PPC_BOOT_REG_H
#define _PPC_BOOT_REG_H
/*
* Copyright 2007 Davud Gibson, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
static inline u32 mfpvr(void)
{
u32 pvr;
asm volatile ("mfpvr %0" : "=r"(pvr));
return pvr;
}
register void *__stack_pointer asm("r1");
#define get_sp() (__stack_pointer)
#endif /* _PPC_BOOT_REG_H */
| ---
+++
@@ -16,6 +16,14 @@
return pvr;
}
+#define __stringify_1(x) #x
+#define __stringify(x) __stringify_1(x)
+
+#define mfspr(rn) ({unsigned long rval; \
+ asm volatile("mfspr %0," __stringify(rn) \
+ : "=r" (rval)); rval; })
+#define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
+
register void *__stack_pointer asm("r1");
#define get_sp() (__stack_pointer)
| [POWERPC] 4xx: Add mfspr/mtspr inline macros to 4xx bootwrapper
The 4xx bootwrapper occasionally needs to access SPR registers,
this adds mfspr/mtspr wrappers to it.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Josh Boyer <[email protected]>
| mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas | ee41eea947ebe2f1f627fafe0e429b5dcaaab944 |
/* This is the prototype for the strdup() function which is distributed
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
The Postgres strdup() is in src/port/strdup.c.
*/
extern char *strdup(char const *);
| /* This is the prototype for the strdup() function which is distributed
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
The Postgres strdup() is in src/utils/strdup.c.
*/
extern char *strdup(char const *);
| ---
+++
@@ -2,7 +2,7 @@
with Postgres. That strdup() is only needed on those systems that
don't already have strdup() in their system libraries.
- The Postgres strdup() is in src/utils/strdup.c.
+ The Postgres strdup() is in src/port/strdup.c.
*/
extern char *strdup(char const *); | Fix an obsolete file path mentioned in a comment.
| mpl-2.0 | techdragon/Postgres-XL,ovr/postgres-xl,kmjungersen/PostgresXL,techdragon/Postgres-XL,adam8157/gpdb,zeroae/postgres-xl,oberstet/postgres-xl,rubikloud/gpdb,yazun/postgres-xl,janebeckman/gpdb,lintzc/gpdb,edespino/gpdb,cjcjameson/gpdb,chrishajas/gpdb,edespino/gpdb,royc1/gpdb,rvs/gpdb,snaga/postgres-xl,lisakowen/gpdb,CraigHarris/gpdb,Quikling/gpdb,adam8157/gpdb,rubikloud/gpdb,jmcatamney/gpdb,foyzur/gpdb,lpetrov-pivotal/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,edespino/gpdb,tpostgres-projects/tPostgres,Quikling/gpdb,rvs/gpdb,royc1/gpdb,cjcjameson/gpdb,rubikloud/gpdb,Postgres-XL/Postgres-XL,Chibin/gpdb,snaga/postgres-xl,tangp3/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,janebeckman/gpdb,edespino/gpdb,Chibin/gpdb,tpostgres-projects/tPostgres,atris/gpdb,randomtask1155/gpdb,zeroae/postgres-xl,zaksoup/gpdb,kmjungersen/PostgresXL,ahachete/gpdb,rvs/gpdb,edespino/gpdb,lisakowen/gpdb,Quikling/gpdb,randomtask1155/gpdb,atris/gpdb,edespino/gpdb,jmcatamney/gpdb,rubikloud/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,foyzur/gpdb,atris/gpdb,adam8157/gpdb,postmind-net/postgres-xl,zaksoup/gpdb,ashwinstar/gpdb,xuegang/gpdb,rubikloud/gpdb,oberstet/postgres-xl,rvs/gpdb,royc1/gpdb,pavanvd/postgres-xl,postmind-net/postgres-xl,techdragon/Postgres-XL,techdragon/Postgres-XL,randomtask1155/gpdb,greenplum-db/gpdb,royc1/gpdb,chrishajas/gpdb,randomtask1155/gpdb,lpetrov-pivotal/gpdb,xuegang/gpdb,jmcatamney/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,CraigHarris/gpdb,postmind-net/postgres-xl,0x0FFF/gpdb,snaga/postgres-xl,rubikloud/gpdb,50wu/gpdb,ahachete/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,xinzweb/gpdb,CraigHarris/gpdb,cjcjameson/gpdb,50wu/gpdb,chrishajas/gpdb,rvs/gpdb,xuegang/gpdb,xuegang/gpdb,edespino/gpdb,yuanzhao/gpdb,oberstet/postgres-xl,50wu/gpdb,arcivanov/postgres-xl,royc1/gpdb,ashwinstar/gpdb,janebeckman/gpdb,ahachete/gpdb,zaksoup/gpdb,arcivanov/postgres-xl,adam8157/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,yazun/postgres-xl,Postgres-XL/Postgres-XL,tangp3/gpdb,kaknikhil/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,cjcjameson/gpdb,Chibin/gpdb,royc1/gpdb,rvs/gpdb,techdragon/Postgres-XL,rvs/gpdb,ahachete/gpdb,Chibin/gpdb,atris/gpdb,ahachete/gpdb,kmjungersen/PostgresXL,greenplum-db/gpdb,Chibin/gpdb,yazun/postgres-xl,kaknikhil/gpdb,pavanvd/postgres-xl,janebeckman/gpdb,Chibin/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,foyzur/gpdb,0x0FFF/gpdb,xinzweb/gpdb,tangp3/gpdb,rvs/gpdb,yuanzhao/gpdb,lisakowen/gpdb,xinzweb/gpdb,lintzc/gpdb,yuanzhao/gpdb,foyzur/gpdb,50wu/gpdb,lisakowen/gpdb,ahachete/gpdb,xinzweb/gpdb,tangp3/gpdb,CraigHarris/gpdb,ovr/postgres-xl,zaksoup/gpdb,Quikling/gpdb,tpostgres-projects/tPostgres,rubikloud/gpdb,chrishajas/gpdb,janebeckman/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,Chibin/gpdb,janebeckman/gpdb,Chibin/gpdb,zaksoup/gpdb,ahachete/gpdb,yuanzhao/gpdb,lintzc/gpdb,randomtask1155/gpdb,zeroae/postgres-xl,foyzur/gpdb,postmind-net/postgres-xl,lintzc/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,50wu/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,atris/gpdb,lpetrov-pivotal/gpdb,jmcatamney/gpdb,kaknikhil/gpdb,lintzc/gpdb,lisakowen/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,edespino/gpdb,janebeckman/gpdb,tangp3/gpdb,50wu/gpdb,cjcjameson/gpdb,atris/gpdb,Quikling/gpdb,ovr/postgres-xl,pavanvd/postgres-xl,lisakowen/gpdb,jmcatamney/gpdb,rvs/gpdb,adam8157/gpdb,xuegang/gpdb,edespino/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,janebeckman/gpdb,zaksoup/gpdb,ashwinstar/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,chrishajas/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,Quikling/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,rvs/gpdb,arcivanov/postgres-xl,lintzc/gpdb,janebeckman/gpdb,randomtask1155/gpdb,greenplum-db/gpdb,chrishajas/gpdb,50wu/gpdb,chrishajas/gpdb,ovr/postgres-xl,ashwinstar/gpdb,kaknikhil/gpdb,cjcjameson/gpdb,pavanvd/postgres-xl,arcivanov/postgres-xl,0x0FFF/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,lisakowen/gpdb,snaga/postgres-xl,Quikling/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,tangp3/gpdb,foyzur/gpdb,snaga/postgres-xl,atris/gpdb,Quikling/gpdb,xuegang/gpdb,yazun/postgres-xl,50wu/gpdb,lintzc/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,Quikling/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb,CraigHarris/gpdb,Chibin/gpdb,kaknikhil/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,adam8157/gpdb,CraigHarris/gpdb,ovr/postgres-xl,Postgres-XL/Postgres-XL,zaksoup/gpdb,Chibin/gpdb,CraigHarris/gpdb,lisakowen/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,oberstet/postgres-xl,foyzur/gpdb,arcivanov/postgres-xl,tangp3/gpdb,yuanzhao/gpdb,xinzweb/gpdb,adam8157/gpdb,cjcjameson/gpdb,adam8157/gpdb,ashwinstar/gpdb,xuegang/gpdb,chrishajas/gpdb,edespino/gpdb,xinzweb/gpdb,foyzur/gpdb,0x0FFF/gpdb,greenplum-db/gpdb,xuegang/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,Quikling/gpdb,CraigHarris/gpdb,postmind-net/postgres-xl,rubikloud/gpdb,ashwinstar/gpdb,ahachete/gpdb,janebeckman/gpdb,pavanvd/postgres-xl,kaknikhil/gpdb,atris/gpdb,yazun/postgres-xl | 11c7bdb4e410102af298943526a48fffa9a9eb19 |
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(ECHO | ICANON);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
| #include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enableRawMode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disableRawMode);
struct termios raw = orig_termios;
raw.c_lflag &= ~(ECHO);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enableRawMode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
| ---
+++
@@ -13,7 +13,7 @@
atexit(disableRawMode);
struct termios raw = orig_termios;
- raw.c_lflag &= ~(ECHO);
+ raw.c_lflag &= ~(ECHO | ICANON);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
} | Disable canonical mode in terminal
| bsd-2-clause | kyletolle/texor | f56aea747c00f3f9275189a33a8f81e9135b1469 |
#ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
namespace sandbox2 {
namespace syscalls {
constexpr int kMaxArgs = 6;
} // namespace syscalls
class SyscallTable {
public:
struct Entry;
// Returns the syscall table for the architecture.
static SyscallTable get(sapi::cpu::Architecture arch);
int size() { return data_.size(); }
absl::string_view GetName(int syscall) const;
std::vector<std::string> GetArgumentsDescription(int syscall,
const uint64_t values[],
pid_t pid) const;
private:
constexpr SyscallTable() = default;
explicit constexpr SyscallTable(absl::Span<const Entry> data) : data_(data) {}
const absl::Span<const Entry> data_;
};
} // namespace sandbox2
#endif // SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
| #ifndef SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#define SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
#include <sys/types.h>
#include <cstdint>
#include <string>
#include <vector>
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "sandboxed_api/config.h"
#include "sandboxed_api/sandbox2/syscall.h"
namespace sandbox2 {
namespace syscalls {
constexpr int kMaxArgs = 6;
} // namespace syscalls
class SyscallTable {
public:
struct Entry;
// Returns the syscall table for the architecture.
static SyscallTable get(sapi::cpu::Architecture arch);
int size() { return data_.size(); }
absl::string_view GetName(int syscall) const;
std::vector<std::string> GetArgumentsDescription(
int syscall, const uint64_t values[syscalls::kMaxArgs], pid_t pid) const;
private:
constexpr SyscallTable() = default;
explicit constexpr SyscallTable(absl::Span<const Entry> data) : data_(data) {}
const absl::Span<const Entry> data_;
};
} // namespace sandbox2
#endif // SANDBOXED_API_SANDBOX2_SYSCALL_DEFS_H_
| ---
+++
@@ -30,8 +30,9 @@
absl::string_view GetName(int syscall) const;
- std::vector<std::string> GetArgumentsDescription(
- int syscall, const uint64_t values[syscalls::kMaxArgs], pid_t pid) const;
+ std::vector<std::string> GetArgumentsDescription(int syscall,
+ const uint64_t values[],
+ pid_t pid) const;
private:
constexpr SyscallTable() = default; | Make code not have a -Warray-parameter warning.
PiperOrigin-RevId: 467842322
Change-Id: Ic262a3f98fa823ef524ac02d08b2f5b8f4adf71d
| apache-2.0 | google/sandboxed-api,google/sandboxed-api,google/sandboxed-api,google/sandboxed-api | 28504f18175b27a474e076bc7f07ae70cd9798e7 |
/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// Simple benchmarking facility.
#ifndef TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#define TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE)
#include "tensorflow/core/platform/google/test_benchmark.h" // IWYU pragma: export
#else
#include "tensorflow/core/platform/default/test_benchmark.h" // IWYU pragma: export
#endif // PLATFORM_GOOGLE
#endif // TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
| /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// Simple benchmarking facility.
#ifndef TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#define TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE)
#include "tensorflow/core/platform/google/test_benchmark.h"
#else
#include "tensorflow/core/platform/default/test_benchmark.h"
#endif // PLATFORM_GOOGLE
#endif // TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
| ---
+++
@@ -20,9 +20,9 @@
#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/test_benchmark.h"
+#include "tensorflow/core/platform/google/test_benchmark.h" // IWYU pragma: export
#else
-#include "tensorflow/core/platform/default/test_benchmark.h"
+#include "tensorflow/core/platform/default/test_benchmark.h" // IWYU pragma: export
#endif // PLATFORM_GOOGLE
| Add IWYU tags to headers TF is re-exporting.
PiperOrigin-RevId: 291557790
Change-Id: Ic0268063ea1048bf6f22ba6aee1b9854d6420f30
| apache-2.0 | gunan/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,xzturn/tensorflow,yongtang/tensorflow,xzturn/tensorflow,aldian/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,xzturn/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,tensorflow/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,karllessard/tensorflow,jhseu/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,paolodedios/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,renyi533/tensorflow,petewarden/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,petewarden/tensorflow,gunan/tensorflow,yongtang/tensorflow,aam-at/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,annarev/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,freedomtan/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,cxxgtxy/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,petewarden/tensorflow,yongtang/tensorflow,gunan/tensorflow,aam-at/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,xzturn/tensorflow,annarev/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,karllessard/tensorflow,yongtang/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,petewarden/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,karllessard/tensorflow,karllessard/tensorflow,jhseu/tensorflow,aldian/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aldian/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,annarev/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,paolodedios/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,aldian/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,gunan/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,aam-at/tensorflow,aldian/tensorflow,gunan/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,gunan/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,gunan/tensorflow,gautam1858/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,annarev/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,xzturn/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,renyi533/tensorflow,karllessard/tensorflow,xzturn/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,xzturn/tensorflow,jhseu/tensorflow | 520cee1eeb88bae50e20c4b53c0eedf843269ba9 |
#include "config_parse.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != 2)
{
printf("usage: config_parse file ('-' for stdin)\n");
return EXIT_FAILURE;
}
if(0 == strcmp("-", argv[1]))
{
conf_fd = stdin;
}
else
{
conf_fd = fopen(argv[1], "r");
}
if(NULL != conf_fd)
{
res = config_parse(conf_fd, 1);
if(CONFIG_PARSE_OK == res)
{
char **env;
for (env = environ; *env; ++env)
printf("%s\n", *env);
}
else
{
printf("Error no. %d while processing file \n", res);
}
fclose(conf_fd);
}
else
{
printf("Could not open the specified file.\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}
| #include "config_parse.h"
#include <stdio.h>
#include <stdlib.h>
extern char **environ;
/******************************************************************************/
int main(
int argc,
char *argv[]
)
{
FILE * conf_fd;
config_parse_res_t res;
if(argc != 2)
{
printf("usage: config_parse file\n");
return EXIT_FAILURE;
}
conf_fd = fopen(argv[1], "r");
if(NULL != conf_fd)
{
res = config_parse(conf_fd, 1);
if(CONFIG_PARSE_OK == res)
{
char **env;
for (env = environ; *env; ++env)
printf("%s\n", *env);
}
else
{
printf("Error no. %d while processing file \n", res);
}
fclose(conf_fd);
}
else
{
printf("Could not open the specified file.\n");
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
} | ---
+++
@@ -1,5 +1,6 @@
#include "config_parse.h"
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
extern char **environ;
@@ -15,11 +16,18 @@
if(argc != 2)
{
- printf("usage: config_parse file\n");
+ printf("usage: config_parse file ('-' for stdin)\n");
return EXIT_FAILURE;
}
- conf_fd = fopen(argv[1], "r");
+ if(0 == strcmp("-", argv[1]))
+ {
+ conf_fd = stdin;
+ }
+ else
+ {
+ conf_fd = fopen(argv[1], "r");
+ }
if(NULL != conf_fd)
{ | Add option to read from stdin
| mit | stefan-misik/config-parse | 6a4e3316af783cd36cb96a7dd81597cc272801e8 |
/*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#include "native_client/src/untrusted/nacl/tls.h"
/*
* This initialization happens early in startup with or without libpthread.
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
size_t combined_size = __nacl_tls_combined_size(tdb_size);
/*
* Use sbrk not malloc here since the library is not initialized yet.
*/
void *combined_area = sbrk(combined_size);
/*
* Fill in that memory with its initializer data.
*/
void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size);
/*
* Set %gs, r9, or equivalent platform-specific mechanism. Requires
* a syscall since certain bitfields of these registers are trusted.
*/
nacl_tls_init(tp);
/*
* Initialize newlib's thread-specific pointer.
*/
__newlib_thread_init();
}
| /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#include "native_client/src/untrusted/nacl/tls.h"
/*
* This initialization happens early in startup with or without libpthread.
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
/* Adapt size for sbrk. */
/* TODO(robertm): this is somewhat arbitrary - re-examine). */
size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15;
/*
* Use sbrk not malloc here since the library is not initialized yet.
*/
void *combined_area = sbrk(combined_size);
/*
* Fill in that memory with its initializer data.
*/
void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size);
/*
* Set %gs, r9, or equivalent platform-specific mechanism. Requires
* a syscall since certain bitfields of these registers are trusted.
*/
nacl_tls_init(tp);
/*
* Initialize newlib's thread-specific pointer.
*/
__newlib_thread_init();
}
| ---
+++
@@ -15,9 +15,7 @@
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
- /* Adapt size for sbrk. */
- /* TODO(robertm): this is somewhat arbitrary - re-examine). */
- size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15;
+ size_t combined_size = __nacl_tls_combined_size(tdb_size);
/*
* Use sbrk not malloc here since the library is not initialized yet. | Cleanup: Remove unnecessary rounding when allocating initial thread block
The other calls to __nacl_tls_combined_size() don't do this.
__nacl_tls_combined_size() should be doing any necessary rounding itself.
BUG=none
TEST=trybots
Review URL: https://codereview.chromium.org/18555008
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@11698 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
| bsd-3-clause | Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client | 13f6248da3578c67dc472fb38e1abc621fc6f2ae |
#ifndef INCLUDE_GRAPHICS_H
#define INCLUDE_GRAPHICS_H
namespace WalrusRPG
{
namespace Graphics
{
typedef struct Rect Rect_t;
struct Rect
{
int x, y;
int w, h;
};
/*
* Buffer management
*/
void buffer_allocate();
void buffer_free();
void buffer_swap();
void buffer_fill(unsigned color);
/*
* Misc LCD functions
*/
void lcd_vsync();
/*
* Drawing
*/
void draw_pixel(unsigned x, unsigned y, unsigned short color);
void draw_sprite_sheet(const unsigned short *sheet, int x, int y, const Rect_t *window);
/*
* Sprite manipulation
*/
unsigned short sprite_pixel_get(const unsigned short *sprite, unsigned x, unsigned y);
}
}
#endif
| #ifndef INCLUDE_GRAPHICS_H
#define INCLUDE_GRAPHICS_H
namespace WalrusRPG
{
namespace Graphics
{
typedef struct Rect Rect_t;
struct Rect
{
int x, y;
unsigned w, h;
};
/*
* Buffer management
*/
void buffer_allocate();
void buffer_free();
void buffer_swap();
void buffer_fill(unsigned color);
/*
* Misc LCD functions
*/
void lcd_vsync();
/*
* Drawing
*/
void draw_pixel(unsigned x, unsigned y, unsigned short color);
void draw_sprite_sheet(const unsigned short *sheet, int x, int y, const Rect_t *window);
/*
* Sprite manipulation
*/
unsigned short sprite_pixel_get(const unsigned short *sprite, unsigned x, unsigned y);
}
}
#endif
| ---
+++
@@ -9,7 +9,7 @@
struct Rect
{
int x, y;
- unsigned w, h;
+ int w, h;
};
/* | Fix sprite clipping by using signed rect width
| mit | WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG,WalrusRPG/WalrusRPG | 67ecca456198488c4fd19d237d7387a80b494421 |
#ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
#endif /* !PyMPI_COMPAT_DEINOMPI_H */
| #ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
/* ---------------------------------------------------------------- */
static int PyMPI_DEINOMPI_argc = 0;
static char **PyMPI_DEINOMPI_argv = 0;
static char *PyMPI_DEINOMPI_args[2] = {0, 0};
static void PyMPI_DEINOMPI_FixArgs(int **argc, char ****argv)
{
if ((argc[0]==(int *)0) || (argv[0]==(char ***)0)) {
#ifdef Py_PYTHON_H
#if PY_MAJOR_VERSION >= 3
PyMPI_DEINOMPI_args[0] = (char *) "python";
#else
PyMPI_DEINOMPI_args[0] = Py_GetProgramName();
#endif
PyMPI_DEINOMPI_argc = 1;
#endif
PyMPI_DEINOMPI_argv = PyMPI_DEINOMPI_args;
argc[0] = &PyMPI_DEINOMPI_argc;
argv[0] = &PyMPI_DEINOMPI_argv;
}
}
static int PyMPI_DEINOMPI_MPI_Init(int *argc, char ***argv)
{
PyMPI_DEINOMPI_FixArgs(&argc, &argv);
return MPI_Init(argc, argv);
}
#undef MPI_Init
#define MPI_Init PyMPI_DEINOMPI_MPI_Init
static int PyMPI_DEINOMPI_MPI_Init_thread(int *argc, char ***argv,
int required, int *provided)
{
PyMPI_DEINOMPI_FixArgs(&argc, &argv);
return MPI_Init_thread(argc, argv, required, provided);
}
#undef MPI_Init_thread
#define MPI_Init_thread PyMPI_DEINOMPI_MPI_Init_thread
/* ---------------------------------------------------------------- */
#endif /* !PyMPI_COMPAT_DEINOMPI_H */
| ---
+++
@@ -1,46 +1,5 @@
#ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
-/* ---------------------------------------------------------------- */
-
-static int PyMPI_DEINOMPI_argc = 0;
-static char **PyMPI_DEINOMPI_argv = 0;
-static char *PyMPI_DEINOMPI_args[2] = {0, 0};
-
-static void PyMPI_DEINOMPI_FixArgs(int **argc, char ****argv)
-{
- if ((argc[0]==(int *)0) || (argv[0]==(char ***)0)) {
-#ifdef Py_PYTHON_H
-#if PY_MAJOR_VERSION >= 3
- PyMPI_DEINOMPI_args[0] = (char *) "python";
-#else
- PyMPI_DEINOMPI_args[0] = Py_GetProgramName();
-#endif
- PyMPI_DEINOMPI_argc = 1;
-#endif
- PyMPI_DEINOMPI_argv = PyMPI_DEINOMPI_args;
- argc[0] = &PyMPI_DEINOMPI_argc;
- argv[0] = &PyMPI_DEINOMPI_argv;
- }
-}
-
-static int PyMPI_DEINOMPI_MPI_Init(int *argc, char ***argv)
-{
- PyMPI_DEINOMPI_FixArgs(&argc, &argv);
- return MPI_Init(argc, argv);
-}
-#undef MPI_Init
-#define MPI_Init PyMPI_DEINOMPI_MPI_Init
-
-static int PyMPI_DEINOMPI_MPI_Init_thread(int *argc, char ***argv,
- int required, int *provided)
-{
- PyMPI_DEINOMPI_FixArgs(&argc, &argv);
- return MPI_Init_thread(argc, argv, required, provided);
-}
-#undef MPI_Init_thread
-#define MPI_Init_thread PyMPI_DEINOMPI_MPI_Init_thread
-
-/* ---------------------------------------------------------------- */
#endif /* !PyMPI_COMPAT_DEINOMPI_H */ | Remove hackery for DeinoMPI, release 1.1.0 seems to work just fine | bsd-2-clause | pressel/mpi4py,mpi4py/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py | 553faa1fcfc6a119959a66371ea355899dd8efd8 |
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpResponseInfo;
struct HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock.
// |info| output parameter for the HttpResponseInfo.
// Returns true if successfully converted. False if there was a failure
// or if the SpdyHeaderBlock was invalid.
bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers,
HttpResponseInfo* response);
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
spdy::SpdyHeaderBlock* headers,
bool direct);
} // namespace net
#endif // NET_SPDY_SPDY_HTTP_UTILS_H_
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpResponseInfo;
class HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock.
// |info| output parameter for the HttpResponseInfo.
// Returns true if successfully converted. False if there was a failure
// or if the SpdyHeaderBlock was invalid.
bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers,
HttpResponseInfo* response);
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
spdy::SpdyHeaderBlock* headers,
bool direct);
} // namespace net
#endif // NET_SPDY_SPDY_HTTP_UTILS_H_
| ---
+++
@@ -11,7 +11,7 @@
namespace net {
class HttpResponseInfo;
-class HttpRequestInfo;
+struct HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock. | Change forward declaration of HttpRequestInfo from class to struct to
fix build breakage.
BUG=none
TEST=none
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@59584 0039d316-1c4b-4281-b951-d872f2087c98
| bsd-3-clause | zcbenz/cefode-chromium,zcbenz/cefode-chromium,anirudhSK/chromium,M4sse/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,keishi/chromium,anirudhSK/chromium,ltilve/chromium,markYoungH/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,keishi/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,zcbenz/cefode-chromium,robclark/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,robclark/chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,zcbenz/cefode-chromium,Chilledheart/chromium,keishi/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,keishi/chromium,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,ondra-novak/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,markYoungH/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,patrickm/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,dednal/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,keishi/chromium,keishi/chromium,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,Just-D/chromium-1,jaruba/chromium.src,littlstar/chromium.src,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,patrickm/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,littlstar/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,rogerwang/chromium,hujiajie/pa-chromium,Just-D/chromium-1,robclark/chromium,Just-D/chromium-1,robclark/chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,dednal/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,anirudhSK/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,robclark/chromium,junmin-zhu/chromium-rivertrail,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,mohamed--abdel-maksoud/chromium.src,robclark/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,anirudhSK/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,hujiajie/pa-chromium,Chilledheart/chromium,Jonekee/chromium.src,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,anirudhSK/chromium,axinging/chromium-crosswalk,zcbenz/cefode-chromium,ChromiumWebApps/chromium,ltilve/chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,robclark/chromium,bright-sparks/chromium-spacewalk,ltilve/chromium,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,markYoungH/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,rogerwang/chromium,robclark/chromium,dednal/chromium.src,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,littlstar/chromium.src,hujiajie/pa-chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,jaruba/chromium.src,robclark/chromium,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,dednal/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,hujiajie/pa-chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,ltilve/chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,patrickm/chromium.src,ondra-novak/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,zcbenz/cefode-chromium,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,rogerwang/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,M4sse/chromium.src,rogerwang/chromium,ltilve/chromium,jaruba/chromium.src,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,jaruba/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,rogerwang/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,M4sse/chromium.src,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,Chilledheart/chromium,fujunwei/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,rogerwang/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,Jonekee/chromium.src | 86f56f6d510c533fe570fb6153b6c1f7b4b365a3 |
#pragma once
#include <winsock2.h>
#include "common/types.h"
namespace sbat {
namespace snp {
// min-MTU - (max-IP-header-size + udp-header-size)
const size_t SNP_PACKET_SIZE = 576 - (60 + 8);
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets sent by storm/us with something that can be used to route it
struct PacketHeader {
PacketType type;
uint16 size; // size does not include the size of this header
};
#pragma pack(pop)
// Storm packets that will be queued until read
struct StormPacket {
byte data[SNP_PACKET_SIZE];
sockaddr_in from_address;
uint32 size;
StormPacket* next;
};
} // namespace snp
} // namespace sbat
| #pragma once
#include <winsock2.h>
#include "common/types.h"
#define SNP_PACKET_SIZE 512
namespace sbat {
namespace snp {
enum class PacketType : byte {
Storm = 0
};
#pragma pack(push)
#pragma pack(1)
// this packet info wraps the packets sent by storm/us with something that can be used to route it
struct PacketHeader {
PacketType type;
uint16 size; // size does not include the size of this header
};
#pragma pack(pop)
// Storm packets that will be queued until read
struct StormPacket {
byte data[SNP_PACKET_SIZE];
sockaddr_in from_address;
uint32 size;
StormPacket* next;
};
} // namespace snp
} // namespace sbat
| ---
+++
@@ -4,10 +4,13 @@
#include "common/types.h"
-#define SNP_PACKET_SIZE 512
+
namespace sbat {
namespace snp {
+// min-MTU - (max-IP-header-size + udp-header-size)
+const size_t SNP_PACKET_SIZE = 576 - (60 + 8);
+
enum class PacketType : byte {
Storm = 0
}; | Adjust snp packet size to better accomodate small MTUs.
| mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | af8f7968770fa4714fb0c4d55277fb117fc39be9 |
// Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) BOOL canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@property (nonatomic, strong, nullable) NSString * userId; //Example: <null>
@property (nonatomic, assign) BOOL userIsPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerId; //Example: <null>
@end
| // Copyright (c) 2015 TeamSnap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSDKCollectionObject.h"
#import "TSDKObjectsRequest.h"
@interface TSDKPartnerPreferences : TSDKCollectionObject
@property (nonatomic, assign) NSInteger canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@property (nonatomic, strong, nullable) NSString * userId; //Example: <null>
@property (nonatomic, assign) NSInteger userIsPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerId; //Example: <null>
@end
| ---
+++
@@ -7,10 +7,10 @@
@interface TSDKPartnerPreferences : TSDKCollectionObject
-@property (nonatomic, assign) NSInteger canDisplayPartner; //Example: 0
+@property (nonatomic, assign) BOOL canDisplayPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerName; //Example: **NULL**
@property (nonatomic, strong, nullable) NSString * userId; //Example: <null>
-@property (nonatomic, assign) NSInteger userIsPartner; //Example: 0
+@property (nonatomic, assign) BOOL userIsPartner; //Example: 0
@property (nonatomic, strong, nullable) NSString * partnerId; //Example: <null>
@end | Change partner preference Int to Bool values
| mit | teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS,teamsnap/teamsnap-SDK-iOS | e6c4b6d82a21c29737e637dc33b89528bf77d5da |
/* stddef.h */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __INC_stddef_h__
#define __INC_stddef_h__
#include <bits/null.h>
#include <bits/size_t.h>
#if !defined(__ptrdiff_t_defined)
#define __ptrdiff_t_defined
typedef int ptrdiff_t;
#endif
#if defined(__GNUC__)
#define offsetof(type, member) __builtin_offsetof(type, member)
#else
#define offsetof(type, member) ((size_t) (&((type *) NULL)->member))
#endif
#endif /* __INC_stddef_h__ */
| /* stddef.h */
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __INC_stddef_h__
#define __INC_stddef_h__
#include <bits/null.h>
#include <bits/size_t.h>
#if !defined(__ptrdiff_t_defined)
#define __ptrdiff_t_defined
typedef int ptrdiff_t;
#endif
#define offsetof(type, member) ((size_t) (&((type *) NULL)->member))
#endif /* __INC_stddef_h__ */
| ---
+++
@@ -27,6 +27,10 @@
typedef int ptrdiff_t;
#endif
+#if defined(__GNUC__)
+#define offsetof(type, member) __builtin_offsetof(type, member)
+#else
#define offsetof(type, member) ((size_t) (&((type *) NULL)->member))
+#endif
#endif /* __INC_stddef_h__ */ | lib: Use offsetof() builtin with GCC
The default offsetof() implementation generates a warning
(variably modified <variable> at file scope) when used in
to define the size of an array. By using this builtin with
GCC we avoid the warning and make sure no variable-size
arrays are used.
Change-Id: Iae215f777241f7daaa061067230086dffaa8311d
Signed-off-by: Carles Cufi <[email protected]>
| apache-2.0 | erwango/zephyr,zephyriot/zephyr,rsalveti/zephyr,runchip/zephyr-cc3220,holtmann/zephyr,aceofall/zephyr-iotos,holtmann/zephyr,punitvara/zephyr,finikorg/zephyr,pklazy/zephyr,zephyriot/zephyr,kraj/zephyr,erwango/zephyr,galak/zephyr,bboozzoo/zephyr,finikorg/zephyr,mbolivar/zephyr,runchip/zephyr-cc3220,ldts/zephyr,galak/zephyr,Vudentz/zephyr,ldts/zephyr,fractalclone/zephyr-riscv,galak/zephyr,kraj/zephyr,mbolivar/zephyr,kraj/zephyr,nashif/zephyr,fractalclone/zephyr-riscv,tidyjiang8/zephyr-doc,bboozzoo/zephyr,erwango/zephyr,punitvara/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,fbsder/zephyr,mbolivar/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3200,nashif/zephyr,kraj/zephyr,sharronliu/zephyr,bigdinotech/zephyr,sharronliu/zephyr,fractalclone/zephyr-riscv,runchip/zephyr-cc3220,nashif/zephyr,tidyjiang8/zephyr-doc,holtmann/zephyr,holtmann/zephyr,explora26/zephyr,Vudentz/zephyr,punitvara/zephyr,runchip/zephyr-cc3200,rsalveti/zephyr,fbsder/zephyr,aceofall/zephyr-iotos,GiulianoFranchetto/zephyr,sharronliu/zephyr,bigdinotech/zephyr,finikorg/zephyr,aceofall/zephyr-iotos,pklazy/zephyr,nashif/zephyr,finikorg/zephyr,runchip/zephyr-cc3220,sharronliu/zephyr,runchip/zephyr-cc3200,tidyjiang8/zephyr-doc,bboozzoo/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,pklazy/zephyr,fractalclone/zephyr-riscv,Vudentz/zephyr,pklazy/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3200,aceofall/zephyr-iotos,erwango/zephyr,zephyriot/zephyr,rsalveti/zephyr,tidyjiang8/zephyr-doc,bboozzoo/zephyr,finikorg/zephyr,galak/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,bigdinotech/zephyr,runchip/zephyr-cc3200,erwango/zephyr,pklazy/zephyr,ldts/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,rsalveti/zephyr,rsalveti/zephyr,zephyriot/zephyr,holtmann/zephyr,sharronliu/zephyr,Vudentz/zephyr,kraj/zephyr,fbsder/zephyr,explora26/zephyr,aceofall/zephyr-iotos,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,explora26/zephyr,punitvara/zephyr,fractalclone/zephyr-riscv,zephyriot/zephyr,tidyjiang8/zephyr-doc,mbolivar/zephyr,fbsder/zephyr,Vudentz/zephyr,punitvara/zephyr,mbolivar/zephyr,galak/zephyr,explora26/zephyr,runchip/zephyr-cc3220,fbsder/zephyr,bboozzoo/zephyr,GiulianoFranchetto/zephyr,ldts/zephyr | 1980b7bb0ffee0750ed832fc1b474c6ae6e85b00 |
#define GET_CLASS_INFO_EXTENDS(extends, ...) \
extends
#define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \
implements
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
#define CLASS_INFO_String(what) \
GET_CLASS_INFO_ ## what(Object, 2, toString, Serializable)
#define CLASS_INFO(name, what) \
CLASS_INFO_ ## name(what)
CLASS_INFO(String, EXTENDS)
CLASS_INFO(String, NB_IMPLEMENTS)
CLASS_INFO(String, IMPLEMENTS)
| #define GET_CLASS_INFO_EXTENDS(extends, ...) \
extends
#define GET_CLASS_INFO_IMPLEMENTS(x, y, implements...) \
implements
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
#define GET_CLASS_INFO(what, extends, nbInter, interfaces...) \
GET_CLASS_INFO_ ## what(extends, nbInter, ##interfaces)
#define CLASS_INFO_String(what) \
GET_CLASS_INFO(what, Object, 1, toString)
#define CLASS_INFO(name, what) \
CLASS_INFO_ ## name(what)
CLASS_INFO(String, EXTENDS)
CLASS_INFO(String, IMPLEMENTS)
CLASS_INFO(String, NB_IMPLEMENTS)
| ---
+++
@@ -7,15 +7,12 @@
#define GET_CLASS_INFO_NB_IMPLEMENTS(x, nb, ...) \
nb
-#define GET_CLASS_INFO(what, extends, nbInter, interfaces...) \
- GET_CLASS_INFO_ ## what(extends, nbInter, ##interfaces)
-
#define CLASS_INFO_String(what) \
- GET_CLASS_INFO(what, Object, 1, toString)
+ GET_CLASS_INFO_ ## what(Object, 2, toString, Serializable)
#define CLASS_INFO(name, what) \
CLASS_INFO_ ## name(what)
CLASS_INFO(String, EXTENDS)
+CLASS_INFO(String, NB_IMPLEMENTS)
CLASS_INFO(String, IMPLEMENTS)
-CLASS_INFO(String, NB_IMPLEMENTS) | Improve new file in future
| mit | DaemonSnake/ObjectC,swac31/ObjectC,DaemonSnake/ObjectC,DaemonSnake/ObjectC,swac31/ObjectC,swac31/ObjectC | fb96a6bf54b67cf147fc1e8b95721be69b031a3c |
//
// SGCachePromise.h
// Pods
//
// Created by James Van-As on 13/05/15.
//
//
#import <PromiseKit/Promise.h>
#import <MGEvents/MGEvents.h>
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal);
typedef void(^SGCacheFetchOnRetry)();
@interface SGCachePromise : PMKPromise
@property (nonatomic, copy) SGCacheFetchOnRetry onRetry;
@property (nonatomic, copy) SGCacheFetchFail onFail;
@end
| //
// SGCachePromise.h
// Pods
//
// Created by James Van-As on 13/05/15.
//
//
#import "Promise.h"
#import "MGEvents.h"
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal);
typedef void(^SGCacheFetchOnRetry)();
@interface SGCachePromise : PMKPromise
@property (nonatomic, copy) SGCacheFetchOnRetry onRetry;
@property (nonatomic, copy) SGCacheFetchFail onFail;
@end
| ---
+++
@@ -6,8 +6,8 @@
//
//
-#import "Promise.h"
-#import "MGEvents.h"
+#import <PromiseKit/Promise.h>
+#import <MGEvents/MGEvents.h>
typedef void(^SGCacheFetchCompletion)(id obj);
typedef void(^SGCacheFetchFail)(NSError *error, BOOL wasFatal); | Use Framework style import statements for pod Framework compatibility
| bsd-2-clause | seatgeek/SGImageCache | 8c8d940e07c6ce48a8b342baaafb290e3f9abfac |
#ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING,
PART_PYINT,
PART_ERROR,
} part_type;
typedef enum {
TYPE_SINGLE_VALUE,
TYPE_LIST_OF_SINGLE_VALUES,
TYPE_LIST_OF_TUPLES
} result_type;
typedef struct {
long parts_count, current_part, next_part_size;
part_type expected_type;
PyObject *result_root, *list;
int result_type;
Py_ssize_t list_length, list_filled;
} parser_state;
PyObject *parser_get_results(void);
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer);
#endif // _PARSER_H_
| #ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING,
PART_PYINT,
PART_ERROR,
} part_type;
typedef enum {
TYPE_SINGLE_VALUE,
TYPE_LIST_OF_SINGLE_VALUES,
TYPE_LIST_OF_TUPLES
} result_type;
typedef struct {
long parts_count, current_part, next_part_size;
part_type expected_type;
PyObject *result_root, *list;
int result_type;
Py_ssize_t list_length, list_filled;
} parser_state;
PyObject *parser_get_results();
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer);
#endif // _PARSER_H_
| ---
+++
@@ -36,7 +36,7 @@
Py_ssize_t list_length, list_filled;
} parser_state;
-PyObject *parser_get_results();
+PyObject *parser_get_results(void);
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer); | Replace empty arguments definition with void for compatibility
| mit | gviot/nadis,gviot/nadis,gviot/nadis | 3fe765a96b95467327e9cc1cfcdabcdfea1d3818 |
/* Author: Mo McRoberts <[email protected]>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h>
# include <string.h>
# include <syslog.h>
# include <unistd.h>
# include <pthread.h>
# include <ctype.h>
# include "iniparser.h"
# include "libsupport.h"
#endif /*!P_LIBSUPPORT_H_*/
| /* Author: Mo McRoberts <[email protected]>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
# define _BSD_SOURCE 1
# define _DARWIN_C_SOURCE 1
# define _FILE_OFFSET_BITS 64
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h>
# include <string.h>
# include <syslog.h>
# include <unistd.h>
# include <pthread.h>
# include <ctype.h>
# include "iniparser.h"
# include "libsupport.h"
#endif /*!P_LIBSUPPORT_H_*/
| ---
+++
@@ -22,10 +22,6 @@
#ifndef P_LIBSUPPORT_H_
# define P_LIBSUPPORT_H_ 1
-# define _BSD_SOURCE 1
-# define _DARWIN_C_SOURCE 1
-# define _FILE_OFFSET_BITS 64
-
# include <stdio.h>
# include <stdlib.h>
# include <stdarg.h> | Allow config.h or AM_CPPFLAGS to provide libc feature macros
| apache-2.0 | bbcarchdev/libsupport,bbcarchdev/libsupport,bbcarchdev/libsupport | dab86d05b6a7980c5899cb11ce14abee55ba717c |
/* Copyright (c) 2008-2019 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "as is"
* basis, without warranty of any kind, either expressed, implied, or
* statutory, including, without limitation, warranties that the
* Covered Software is free of defects, merchantable, fit for a
* particular purpose or non-infringing.
* See the Mozilla Public License v. 2.0 for more details.
*
* For more details, see http://www.mrtrix.org/.
*/
#include <string>
#include "types.h"
namespace MR
{
namespace Formats
{
/*! basic convenience function to determine whether an image path
* corresponds to a NIfTI-format image. */
inline bool is_nifti (const std::string& path)
{
static const vector<std::string> exts { ".nii", ".nii.gz", ".img" };
for (const auto& ext : exts) {
if (path.size() >= ext.size() &&
path.substr (path.size() - ext.size()) == ext)
return true;
}
return false;
}
}
}
| /* Copyright (c) 2008-2019 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Covered Software is provided under this License on an "as is"
* basis, without warranty of any kind, either expressed, implied, or
* statutory, including, without limitation, warranties that the
* Covered Software is free of defects, merchantable, fit for a
* particular purpose or non-infringing.
* See the Mozilla Public License v. 2.0 for more details.
*
* For more details, see http://www.mrtrix.org/.
*/
#include <string>
#include "types.h"
namespace MR
{
namespace Formats
{
/*! basic convenience function to determine whether an image path
* corresponds to a NIfTI-format image. */
inline bool is_nifti (const std::string& path)
{
static const vector<std::string> exts { ".nii", ".nii.gz", ".img" };
for (const auto& ext : exts) {
if (path.substr (path.size() - ext.size()) == ext)
return true;
}
return false;
}
}
}
| ---
+++
@@ -33,7 +33,8 @@
{
static const vector<std::string> exts { ".nii", ".nii.gz", ".img" };
for (const auto& ext : exts) {
- if (path.substr (path.size() - ext.size()) == ext)
+ if (path.size() >= ext.size() &&
+ path.substr (path.size() - ext.size()) == ext)
return true;
}
return false;
@@ -43,4 +44,3 @@
}
}
- | Formats::is_nifti(): Fix for short file names
| mpl-2.0 | MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3 | 822adf4743536e3c0fac1861fa23e57801ebf3aa |
// This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1
#include <cstddef>
#include <cstdint>
#include <string>
#include <visionaray/aligned_vector.h>
#include <visionaray/pixel_format.h>
namespace visionaray
{
class image_base
{
public:
friend class image;
public:
virtual bool load(std::string const& filename);
virtual bool save(std::string const& filename);
size_t width() const;
size_t height() const;
pixel_format format() const;
uint8_t const* data() const;
protected:
size_t width_;
size_t height_;
pixel_format format_ = PF_RGB8;
aligned_vector<uint8_t> data_;
};
} // visionaray
#endif // VSNRAY_COMMOM_IMAGE_BASE_H
| // This file is distributed under the MIT license.
// See the LICENSE file for details.
#pragma once
#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>
#include <visionaray/pixel_format.h>
namespace visionaray
{
class image_base
{
public:
friend class image;
public:
virtual bool load(std::string const& filename);
virtual bool save(std::string const& filename);
size_t width() const;
size_t height() const;
pixel_format format() const;
uint8_t const* data() const;
protected:
size_t width_;
size_t height_;
pixel_format format_ = PF_RGB8;
std::vector<uint8_t> data_;
};
} // visionaray
#endif // VSNRAY_COMMOM_IMAGE_BASE_H
| ---
+++
@@ -9,8 +9,8 @@
#include <cstddef>
#include <cstdint>
#include <string>
-#include <vector>
+#include <visionaray/aligned_vector.h>
#include <visionaray/pixel_format.h>
namespace visionaray
@@ -41,7 +41,7 @@
pixel_format format_ = PF_RGB8;
- std::vector<uint8_t> data_;
+ aligned_vector<uint8_t> data_;
};
| Store image data in aligned_vector
| mit | tu500/visionaray,szellmann/visionaray,ukoeln-vis/ctpperf,ukoeln-vis/ctpperf,tu500/visionaray,szellmann/visionaray | 068f57c5ca513befac3b3b56de36eed2ee78400d |
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/
void resizeEvent(QResizeEvent *event) override;
private slots:
void fix_color_correct();
void gray_world();
void gamma_correct();
void contrast_correct();
void hist_normalization();
void hist_equalization();
private:
/** Result image and it's container */
QImage result_image;
QLabel *result_image_label;
};
#endif // MAIN_WINDOW_H
| #ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <QGroupBox>
#include <QVBoxLayout>
#include <base_window.h>
class MainWindow : public gui::BaseWindow {
public:
MainWindow();
virtual ~MainWindow();
protected:
/**
* Callback for resize window.
*
* @param event[in] Event params.
*/
void resizeEvent(QResizeEvent *event) override;
private:
/** Result image and it's container */
QImage result_image;
QLabel *result_image_label;
};
#endif // MAIN_WINDOW_H
| ---
+++
@@ -19,6 +19,14 @@
*/
void resizeEvent(QResizeEvent *event) override;
+private slots:
+ void fix_color_correct();
+ void gray_world();
+ void gamma_correct();
+ void contrast_correct();
+ void hist_normalization();
+ void hist_equalization();
+
private:
/** Result image and it's container */
QImage result_image; | Add slots for second lab
| mit | Dmitry94/Image_Processing,Dmitry94/Image_Processing,Dmitry94/Image_Processing | 4cfaf8cd78fdf46a6a6831e2c5ff4eae34809a34 |
#ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_task(Func f) {
typedef typename boost::result_of<Func()>::type ResultType;
typedef boost::packaged_task<ResultType> PackagedTaskType;
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
boost::thread task_thread(boost::move(task));
return res;
}
}
#endif // FUTURE_H_INCLUDED
| #ifndef FUTURE_H_INCLUDED
#define FUTURE_H_INCLUDED
#include <boost/thread/thread.hpp>
#include <boost/thread/future.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/utility/result_of.hpp>
namespace thread {
template<typename Func>
boost::shared_future<typename boost::result_of<Func()>::type> submit_task(Func f) {
typedef typename boost::result_of<Func()>::type ResultType;
typedef boost::packaged_task<ResultType> PackagedTaskType;
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
boost::thread task_thread(std::move(task));
return res;
}
}
#endif // FUTURE_H_INCLUDED
| ---
+++
@@ -15,7 +15,7 @@
PackagedTaskType task(f);
boost::shared_future<ResultType> res(task.get_future());
- boost::thread task_thread(std::move(task));
+ boost::thread task_thread(boost::move(task));
return res;
}
| Use boost::move rather than std::move which seems to hate some versions ofr G++
| bsd-2-clause | Kazade/kazbase,Kazade/kazbase | 9d4a59f2cab4179f3ff5b73477044f2f9289d5b8 |
/* command_line.c */
/* to return command line arguments */
#include <stdlib.h>
#include <math.h>
#include <ugens.h>
#include "../Minc/ext.h"
double f_arg(float *p, short n_args)
{
return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0;
}
double i_arg(float *p, short n_args)
{
return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0;
}
double s_arg(float *p,short n_args,double *pp)
{
char *name;
int i1 = 0;
if(((int)pp[0]) < aargc - 1) {
name = aargv[(int)pp[0]];
i1 = (int) strsave(name);
}
return(i1);
}
double n_arg(float *p, short n_args)
{
return(aargc);
}
| /* command_line.c */
/* to return command line arguments */
#include "../H/ugens.h"
#include "../Minc/defs.h"
#include "../Minc/ext.h"
extern int aargc;
extern char *aargv[]; /* to pass commandline args to subroutines */
double f_arg(float *p, short n_args)
{
double atof();
return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0;
}
double i_arg(float *p, short n_args)
{
int atoi();
return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0;
}
double s_arg(float *p,short n_args,double *pp)
{
char *name;
int i1 = 0;
if(((int)pp[0]) < aargc - 1) {
name = aargv[(int)pp[0]];
i1 = (int) strsave(name);
}
return(i1);
}
double n_arg(float *p, short n_args)
{
return(aargc);
}
| ---
+++
@@ -1,20 +1,17 @@
/* command_line.c */
/* to return command line arguments */
-#include "../H/ugens.h"
-#include "../Minc/defs.h"
+#include <stdlib.h>
+#include <math.h>
+#include <ugens.h>
#include "../Minc/ext.h"
-extern int aargc;
-extern char *aargv[]; /* to pass commandline args to subroutines */
double f_arg(float *p, short n_args)
{
- double atof();
return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0;
}
double i_arg(float *p, short n_args)
{
- int atoi();
return (((int)p[0]) < aargc - 1) ? (atoi(aargv[(int)p[0]])) : 0;
}
| Delete some extern vars that were in ugens.h. Other minor cleanups.
| apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix | 91ee9e96426e8d3eb74869cfc965306f6f5603c9 |
#define BLACK 0x000000
#define GREEN 0x003000
#define BLUE 0x000030
#define CYAN 0x003030
#define RED 0x300000
#define ORANGE 0x302000
#define YELLOW 0x303000
#define PURPLE 0x300030
#define WHITE 0x303030
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_DONE GREEN
#define REPL_RUNNING WHITE
#define ACTIVE_WRITE 0x200000
#define ALL_GOOD_CYCLE_MS 2000u
#define LINE_NUMBER_TOGGLE_LENGTH 300u
#define EXCEPTION_TYPE_LENGTH_MS 1000u
#define THOUSANDS WHITE
#define HUNDREDS BLUE
#define TENS YELLOW
#define ONES CYAN
#define INDENTATION_ERROR GREEN
#define SYNTAX_ERROR CYAN
#define NAME_ERROR WHITE
#define OS_ERROR ORANGE
#define VALUE_ERROR PURPLE
#define OTHER_ERROR YELLOW
| #define BLACK 0x000000
#define GREEN 0x001000
#define BLUE 0x000010
#define CYAN 0x001010
#define RED 0x100000
#define ORANGE 0x100800
#define YELLOW 0x101000
#define PURPLE 0x100010
#define WHITE 0x101010
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN
#define SAFE_MODE YELLOW
#define ALL_DONE GREEN
#define REPL_RUNNING WHITE
#define ACTIVE_WRITE 0x200000
#define ALL_GOOD_CYCLE_MS 2000u
#define LINE_NUMBER_TOGGLE_LENGTH 300u
#define EXCEPTION_TYPE_LENGTH_MS 1000u
#define THOUSANDS WHITE
#define HUNDREDS BLUE
#define TENS YELLOW
#define ONES CYAN
#define INDENTATION_ERROR GREEN
#define SYNTAX_ERROR CYAN
#define NAME_ERROR WHITE
#define OS_ERROR ORANGE
#define VALUE_ERROR PURPLE
#define OTHER_ERROR YELLOW
| ---
+++
@@ -1,12 +1,12 @@
#define BLACK 0x000000
-#define GREEN 0x001000
-#define BLUE 0x000010
-#define CYAN 0x001010
-#define RED 0x100000
-#define ORANGE 0x100800
-#define YELLOW 0x101000
-#define PURPLE 0x100010
-#define WHITE 0x101010
+#define GREEN 0x003000
+#define BLUE 0x000030
+#define CYAN 0x003030
+#define RED 0x300000
+#define ORANGE 0x302000
+#define YELLOW 0x303000
+#define PURPLE 0x300030
+#define WHITE 0x303030
#define BOOT_RUNNING BLUE
#define MAIN_RUNNING GREEN | Increase the status LED brightness a bit so that newer DotStars
aren't super dim. This will make status NeoPixels a bit bright
but one can use samd.set_rgb_status_brightness() to dim them.
| mit | adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython | 4cc2cf0e8fc8584a8bd564c21f5448433a7f6a31 |
/* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
/* Interrupt priority `levels'; not mutually exclusive. */
#define IPL_NONE -1
#define IPL_BIO 3 /* block I/O */
#define IPL_NET 3 /* network */
#define IPL_TTY 4 /* terminal */
#define IPL_CLOCK 4 /* clock */
#define IPL_IMP 4 /* memory allocation */
/* Interrupt sharing types. */
#define IST_NONE 0 /* none */
#define IST_PULSE 1 /* pulsed */
#define IST_EDGE 2 /* edge-triggered */
#define IST_LEVEL 3 /* level-triggered */
#include <m68k/psl.h>
#endif
| /* $NetBSD: psl.h,v 1.7 1994/10/26 02:06:31 cgd Exp $ */
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
#include <m68k/psl.h>
#endif
| ---
+++
@@ -3,6 +3,20 @@
#ifndef _MACHINE_PSL_H_
#define _MACHINE_PSL_H_
+/* Interrupt priority `levels'; not mutually exclusive. */
+#define IPL_NONE -1
+#define IPL_BIO 3 /* block I/O */
+#define IPL_NET 3 /* network */
+#define IPL_TTY 4 /* terminal */
+#define IPL_CLOCK 4 /* clock */
+#define IPL_IMP 4 /* memory allocation */
+
+/* Interrupt sharing types. */
+#define IST_NONE 0 /* none */
+#define IST_PULSE 1 /* pulsed */
+#define IST_EDGE 2 /* edge-triggered */
+#define IST_LEVEL 3 /* level-triggered */
+
#include <m68k/psl.h>
#endif | Add IPL_ and IST_ constants in preparation for the Amiga ISA-kit
| isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars | d1aff3f0750596fbb1ffeffa858c9db2f09a215d |
/*-
* Copyright (c) 1998 David E. O'Brien
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *);
| int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *);
| ---
+++
@@ -1,2 +1,30 @@
+/*-
+ * Copyright (c) 1998 David E. O'Brien
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $Id$
+ */
+
int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *); | Add copyright and RCS/CVS Id.
Noticed by: ken
| bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase | 3f431df8ec46b86090ad59ee153872c45d4d429d |
/*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <iostream>
#include <sstream>
namespace libcellml {
struct Debug
{
Debug() = default;
~Debug()
{
std::cout << mSS.str() << std::endl;
}
Debug &operator<<(const void *p)
{
const void *address = static_cast<const void *>(p);
std::ostringstream ss;
ss << address;
mSS << ss.str();
return *this;
}
// accepts just about anything
template<class T>
Debug &operator<<(const T &x)
{
mSS << x;
return *this;
}
private:
std::ostringstream mSS;
};
} // namespace libcellml
| /*
Copyright libCellML Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <iostream>
#include <sstream>
namespace libcellml {
struct dbg
{
dbg() = default;
~dbg()
{
std::cout << mSS.str() << std::endl;
}
public:
dbg &operator<<(const void *p)
{
const void *address = static_cast<const void *>(p);
std::ostringstream ss;
ss << address;
mSS << ss.str();
return *this;
}
// accepts just about anything
template<class T>
dbg &operator<<(const T &x)
{
mSS << x;
return *this;
}
private:
std::ostringstream mSS;
};
} // namespace libcellml
| ---
+++
@@ -21,17 +21,16 @@
namespace libcellml {
-struct dbg
+struct Debug
{
- dbg() = default;
+ Debug() = default;
- ~dbg()
+ ~Debug()
{
std::cout << mSS.str() << std::endl;
}
-public:
- dbg &operator<<(const void *p)
+ Debug &operator<<(const void *p)
{
const void *address = static_cast<const void *>(p);
std::ostringstream ss;
@@ -42,7 +41,7 @@
// accepts just about anything
template<class T>
- dbg &operator<<(const T &x)
+ Debug &operator<<(const T &x)
{
mSS << x;
return *this; | Rename dbg struct to Debug.
| apache-2.0 | MichaelClerx/libcellml,cellml/libcellml,cellml/libcellml,hsorby/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,nickerso/libcellml,hsorby/libcellml,nickerso/libcellml,cellml/libcellml,nickerso/libcellml,MichaelClerx/libcellml,hsorby/libcellml,hsorby/libcellml | aab5eceb9b33a5109792ba52bc9f1ddf39059364 |
// Taken from https://gist.github.com/arvidsson/7231973
#ifndef BITCOIN_REVERSE_ITERATOR_H
#define BITCOIN_REVERSE_ITERATOR_H
/**
* Template used for reverse iteration in C++11 range-based for loops.
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";
*/
template <typename T>
class reverse_range
{
T &m_x;
public:
reverse_range(T &x) : m_x(x) {}
auto begin() const -> decltype(this->m_x.rbegin())
{
return m_x.rbegin();
}
auto end() const -> decltype(this->m_x.rend())
{
return m_x.rend();
}
};
template <typename T>
reverse_range<T> reverse_iterate(T &x)
{
return reverse_range<T>(x);
}
#endif // BITCOIN_REVERSE_ITERATOR_H
| // Taken from https://gist.github.com/arvidsson/7231973
#ifndef BITCOIN_REVERSE_ITERATOR_HPP
#define BITCOIN_REVERSE_ITERATOR_HPP
/**
* Template used for reverse iteration in C++11 range-based for loops.
*
* std::vector<int> v = {1, 2, 3, 4, 5};
* for (auto x : reverse_iterate(v))
* std::cout << x << " ";
*/
template <typename T>
class reverse_range
{
T &x;
public:
reverse_range(T &x) : x(x) {}
auto begin() const -> decltype(this->x.rbegin())
{
return x.rbegin();
}
auto end() const -> decltype(this->x.rend())
{
return x.rend();
}
};
template <typename T>
reverse_range<T> reverse_iterate(T &x)
{
return reverse_range<T>(x);
}
#endif // BITCOIN_REVERSE_ITERATOR_HPP
| ---
+++
@@ -1,7 +1,7 @@
// Taken from https://gist.github.com/arvidsson/7231973
-#ifndef BITCOIN_REVERSE_ITERATOR_HPP
-#define BITCOIN_REVERSE_ITERATOR_HPP
+#ifndef BITCOIN_REVERSE_ITERATOR_H
+#define BITCOIN_REVERSE_ITERATOR_H
/**
* Template used for reverse iteration in C++11 range-based for loops.
@@ -14,19 +14,19 @@
template <typename T>
class reverse_range
{
- T &x;
+ T &m_x;
public:
- reverse_range(T &x) : x(x) {}
+ reverse_range(T &x) : m_x(x) {}
- auto begin() const -> decltype(this->x.rbegin())
+ auto begin() const -> decltype(this->m_x.rbegin())
{
- return x.rbegin();
+ return m_x.rbegin();
}
- auto end() const -> decltype(this->x.rend())
+ auto end() const -> decltype(this->m_x.rend())
{
- return x.rend();
+ return m_x.rend();
}
};
@@ -36,4 +36,4 @@
return reverse_range<T>(x);
}
-#endif // BITCOIN_REVERSE_ITERATOR_HPP
+#endif // BITCOIN_REVERSE_ITERATOR_H | Rename member field according to the style guide.
| mit | guncoin/guncoin,ahmedbodi/vertcoin,anditto/bitcoin,deeponion/deeponion,shelvenzhou/BTCGPU,OmniLayer/omnicore,prusnak/bitcoin,jambolo/bitcoin,practicalswift/bitcoin,Kogser/bitcoin,jtimon/bitcoin,trippysalmon/bitcoin,myriadteam/myriadcoin,stamhe/bitcoin,namecoin/namecoin-core,Exgibichi/statusquo,AkioNak/bitcoin,BitzenyCoreDevelopers/bitzeny,ElementsProject/elements,starwels/starwels,lateminer/bitcoin,fanquake/bitcoin,maaku/bitcoin,TheBlueMatt/bitcoin,MeshCollider/bitcoin,domob1812/huntercore,rnicoll/bitcoin,ajtowns/bitcoin,r8921039/bitcoin,randy-waterhouse/bitcoin,jmcorgan/bitcoin,Kogser/bitcoin,domob1812/huntercore,CryptArc/bitcoin,particl/particl-core,mitchellcash/bitcoin,nikkitan/bitcoin,digibyte/digibyte,thrasher-/litecoin,laudaa/bitcoin,jamesob/bitcoin,StarbuckBG/BTCGPU,sebrandon1/bitcoin,Gazer022/bitcoin,lbryio/lbrycrd,donaloconnor/bitcoin,lateminer/bitcoin,GroestlCoin/bitcoin,h4x3rotab/BTCGPU,paveljanik/bitcoin,shelvenzhou/BTCGPU,myriadteam/myriadcoin,untrustbank/litecoin,rawodb/bitcoin,ericshawlinux/bitcoin,qtumproject/qtum,pstratem/bitcoin,laudaa/bitcoin,ericshawlinux/bitcoin,untrustbank/litecoin,StarbuckBG/BTCGPU,romanornr/viacoin,GroestlCoin/bitcoin,kallewoof/bitcoin,deeponion/deeponion,stamhe/bitcoin,myriadcoin/myriadcoin,instagibbs/bitcoin,Exgibichi/statusquo,destenson/bitcoin--bitcoin,brandonrobertz/namecoin-core,mb300sd/bitcoin,romanornr/viacoin,Jcing95/iop-hd,stamhe/bitcoin,vertcoin/vertcoin,practicalswift/bitcoin,tjps/bitcoin,randy-waterhouse/bitcoin,gmaxwell/bitcoin,particl/particl-core,vmp32k/litecoin,sipsorcery/bitcoin,kazcw/bitcoin,bitcoin/bitcoin,practicalswift/bitcoin,stamhe/bitcoin,jlopp/statoshi,1185/starwels,myriadteam/myriadcoin,h4x3rotab/BTCGPU,cryptoprojects/ultimateonlinecash,vertcoin/vertcoin,r8921039/bitcoin,domob1812/namecore,achow101/bitcoin,alecalve/bitcoin,fujicoin/fujicoin,Xekyo/bitcoin,jlopp/statoshi,namecoin/namecore,cdecker/bitcoin,x-kalux/bitcoin_WiG-B,MazaCoin/maza,jnewbery/bitcoin,brandonrobertz/namecoin-core,monacoinproject/monacoin,instagibbs/bitcoin,bitcoinknots/bitcoin,Chancoin-core/CHANCOIN,GroestlCoin/GroestlCoin,brandonrobertz/namecoin-core,wellenreiter01/Feathercoin,kallewoof/bitcoin,randy-waterhouse/bitcoin,n1bor/bitcoin,romanornr/viacoin,aspanta/bitcoin,lateminer/bitcoin,AkioNak/bitcoin,ElementsProject/elements,myriadteam/myriadcoin,JeremyRubin/bitcoin,ahmedbodi/vertcoin,pataquets/namecoin-core,myriadcoin/myriadcoin,TheBlueMatt/bitcoin,MarcoFalke/bitcoin,sebrandon1/bitcoin,Christewart/bitcoin,OmniLayer/omnicore,jonasschnelli/bitcoin,sipsorcery/bitcoin,wellenreiter01/Feathercoin,JeremyRubin/bitcoin,RHavar/bitcoin,MazaCoin/maza,Gazer022/bitcoin,namecoin/namecoin-core,instagibbs/bitcoin,jnewbery/bitcoin,Anfauglith/iop-hd,jtimon/bitcoin,Jcing95/iop-hd,Rav3nPL/bitcoin,Bushstar/UFO-Project,MazaCoin/maza,vertcoin/vertcoin,digibyte/digibyte,simonmulser/bitcoin,nbenoit/bitcoin,sarielsaz/sarielsaz,rnicoll/bitcoin,wangxinxi/litecoin,destenson/bitcoin--bitcoin,digibyte/digibyte,kallewoof/bitcoin,kallewoof/bitcoin,Anfauglith/iop-hd,Anfauglith/iop-hd,JeremyRubin/bitcoin,ryanofsky/bitcoin,jambolo/bitcoin,untrustbank/litecoin,pstratem/bitcoin,simonmulser/bitcoin,andreaskern/bitcoin,Chancoin-core/CHANCOIN,dscotese/bitcoin,h4x3rotab/BTCGPU,bitcoinknots/bitcoin,UFOCoins/ufo,afk11/bitcoin,jambolo/bitcoin,droark/bitcoin,MeshCollider/bitcoin,Kogser/bitcoin,apoelstra/bitcoin,ericshawlinux/bitcoin,donaloconnor/bitcoin,Theshadow4all/ShadowCoin,RHavar/bitcoin,lbryio/lbrycrd,Exgibichi/statusquo,donaloconnor/bitcoin,mm-s/bitcoin,DigitalPandacoin/pandacoin,TheBlueMatt/bitcoin,romanornr/viacoin,Rav3nPL/bitcoin,prusnak/bitcoin,Chancoin-core/CHANCOIN,stamhe/bitcoin,alecalve/bitcoin,ericshawlinux/bitcoin,gjhiggins/vcoincore,gjhiggins/vcoincore,EthanHeilman/bitcoin,AkioNak/bitcoin,Friedbaumer/litecoin,h4x3rotab/BTCGPU,mitchellcash/bitcoin,nbenoit/bitcoin,Kogser/bitcoin,cdecker/bitcoin,sarielsaz/sarielsaz,deeponion/deeponion,OmniLayer/omnicore,domob1812/bitcoin,wellenreiter01/Feathercoin,gjhiggins/vcoincore,dscotese/bitcoin,RHavar/bitcoin,1185/starwels,fujicoin/fujicoin,Theshadow4all/ShadowCoin,tecnovert/particl-core,EthanHeilman/bitcoin,myriadteam/myriadcoin,h4x3rotab/BTCGPU,litecoin-project/litecoin,Sjors/bitcoin,midnightmagic/bitcoin,RHavar/bitcoin,domob1812/huntercore,sarielsaz/sarielsaz,Jcing95/iop-hd,domob1812/huntercore,domob1812/bitcoin,tecnovert/particl-core,wangxinxi/litecoin,Friedbaumer/litecoin,deeponion/deeponion,21E14/bitcoin,lateminer/bitcoin,jtimon/bitcoin,romanornr/viacoin,domob1812/namecore,kevcooper/bitcoin,sebrandon1/bitcoin,qtumproject/qtum,n1bor/bitcoin,jtimon/bitcoin,mruddy/bitcoin,Theshadow4all/ShadowCoin,prusnak/bitcoin,Rav3nPL/bitcoin,spiritlinxl/BTCGPU,Sjors/bitcoin,bitcoin/bitcoin,lbryio/lbrycrd,tjps/bitcoin,rawodb/bitcoin,21E14/bitcoin,r8921039/bitcoin,Xekyo/bitcoin,qtumproject/qtum,jnewbery/bitcoin,vmp32k/litecoin,starwels/starwels,jmcorgan/bitcoin,afk11/bitcoin,fanquake/bitcoin,n1bor/bitcoin,monacoinproject/monacoin,brandonrobertz/namecoin-core,Chancoin-core/CHANCOIN,rnicoll/bitcoin,thrasher-/litecoin,Xekyo/bitcoin,maaku/bitcoin,prusnak/bitcoin,bespike/litecoin,1185/starwels,maaku/bitcoin,cryptoprojects/ultimateonlinecash,GlobalBoost/GlobalBoost,nikkitan/bitcoin,Bushstar/UFO-Project,fujicoin/fujicoin,mm-s/bitcoin,prusnak/bitcoin,BTCGPU/BTCGPU,OmniLayer/omnicore,lateminer/bitcoin,mm-s/bitcoin,ElementsProject/elements,destenson/bitcoin--bitcoin,bitcoinknots/bitcoin,sipsorcery/bitcoin,fujicoin/fujicoin,ppcoin/ppcoin,untrustbank/litecoin,sarielsaz/sarielsaz,jonasschnelli/bitcoin,AkioNak/bitcoin,ElementsProject/elements,FeatherCoin/Feathercoin,jonasschnelli/bitcoin,kazcw/bitcoin,globaltoken/globaltoken,randy-waterhouse/bitcoin,aspanta/bitcoin,gmaxwell/bitcoin,sarielsaz/sarielsaz,litecoin-project/litecoin,viacoin/viacoin,Kogser/bitcoin,practicalswift/bitcoin,joshrabinowitz/bitcoin,aspanta/bitcoin,mm-s/bitcoin,gmaxwell/bitcoin,joshrabinowitz/bitcoin,domob1812/namecore,wellenreiter01/Feathercoin,sstone/bitcoin,guncoin/guncoin,sstone/bitcoin,sebrandon1/bitcoin,guncoin/guncoin,kazcw/bitcoin,domob1812/huntercore,Jcing95/iop-hd,n1bor/bitcoin,FeatherCoin/Feathercoin,x-kalux/bitcoin_WiG-B,r8921039/bitcoin,GroestlCoin/GroestlCoin,alecalve/bitcoin,FeatherCoin/Feathercoin,peercoin/peercoin,AkioNak/bitcoin,Gazer022/bitcoin,bitcoinsSG/bitcoin,myriadcoin/myriadcoin,FeatherCoin/Feathercoin,yenliangl/bitcoin,GroestlCoin/GroestlCoin,midnightmagic/bitcoin,cryptoprojects/ultimateonlinecash,peercoin/peercoin,ppcoin/ppcoin,brandonrobertz/namecoin-core,qtumproject/qtum,Friedbaumer/litecoin,maaku/bitcoin,lbryio/lbrycrd,nikkitan/bitcoin,jlopp/statoshi,destenson/bitcoin--bitcoin,Rav3nPL/bitcoin,digibyte/digibyte,nikkitan/bitcoin,EthanHeilman/bitcoin,FeatherCoin/Feathercoin,deeponion/deeponion,Exgibichi/statusquo,GlobalBoost/GlobalBoost,jtimon/bitcoin,21E14/bitcoin,wellenreiter01/Feathercoin,viacoin/viacoin,gmaxwell/bitcoin,StarbuckBG/BTCGPU,EthanHeilman/bitcoin,vmp32k/litecoin,tjps/bitcoin,jamesob/bitcoin,kallewoof/bitcoin,donaloconnor/bitcoin,pataquets/namecoin-core,BTCGPU/BTCGPU,GlobalBoost/GlobalBoost,laudaa/bitcoin,apoelstra/bitcoin,GroestlCoin/GroestlCoin,jambolo/bitcoin,destenson/bitcoin--bitcoin,vmp32k/litecoin,namecoin/namecore,Gazer022/bitcoin,Flowdalic/bitcoin,bitcoinsSG/bitcoin,Anfauglith/iop-hd,domob1812/namecore,myriadcoin/myriadcoin,achow101/bitcoin,cdecker/bitcoin,gmaxwell/bitcoin,namecoin/namecoin-core,joshrabinowitz/bitcoin,mruddy/bitcoin,peercoin/peercoin,globaltoken/globaltoken,GroestlCoin/bitcoin,bitcoinsSG/bitcoin,rnicoll/dogecoin,ElementsProject/elements,spiritlinxl/BTCGPU,tjps/bitcoin,21E14/bitcoin,particl/particl-core,tecnovert/particl-core,jmcorgan/bitcoin,bitcoin/bitcoin,Rav3nPL/bitcoin,namecoin/namecore,rnicoll/bitcoin,ppcoin/ppcoin,rnicoll/bitcoin,deeponion/deeponion,myriadteam/myriadcoin,monacoinproject/monacoin,GroestlCoin/bitcoin,kevcooper/bitcoin,wangxinxi/litecoin,Chancoin-core/CHANCOIN,Kogser/bitcoin,mb300sd/bitcoin,Theshadow4all/ShadowCoin,apoelstra/bitcoin,qtumproject/qtum,mruddy/bitcoin,Xekyo/bitcoin,practicalswift/bitcoin,digibyte/digibyte,MeshCollider/bitcoin,MazaCoin/maza,laudaa/bitcoin,litecoin-project/litecoin,bespike/litecoin,andreaskern/bitcoin,gjhiggins/vcoincore,prusnak/bitcoin,MazaCoin/maza,bitcoinknots/bitcoin,myriadcoin/myriadcoin,Sjors/bitcoin,UFOCoins/ufo,apoelstra/bitcoin,simonmulser/bitcoin,romanornr/viacoin,CryptArc/bitcoin,bitbrazilcoin-project/bitbrazilcoin,1185/starwels,Friedbaumer/litecoin,droark/bitcoin,jonasschnelli/bitcoin,globaltoken/globaltoken,bitbrazilcoin-project/bitbrazilcoin,r8921039/bitcoin,andreaskern/bitcoin,MarcoFalke/bitcoin,thrasher-/litecoin,domob1812/huntercore,Christewart/bitcoin,Sjors/bitcoin,1185/starwels,kallewoof/bitcoin,achow101/bitcoin,nbenoit/bitcoin,TheBlueMatt/bitcoin,donaloconnor/bitcoin,achow101/bitcoin,sipsorcery/bitcoin,ericshawlinux/bitcoin,tecnovert/particl-core,x-kalux/bitcoin_WiG-B,fanquake/bitcoin,OmniLayer/omnicore,fanquake/bitcoin,rawodb/bitcoin,guncoin/guncoin,sebrandon1/bitcoin,starwels/starwels,bespike/litecoin,domob1812/namecore,Christewart/bitcoin,mruddy/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,anditto/bitcoin,myriadcoin/myriadcoin,dscotese/bitcoin,maaku/bitcoin,nbenoit/bitcoin,GlobalBoost/GlobalBoost,simonmulser/bitcoin,vertcoin/vertcoin,GroestlCoin/GroestlCoin,Theshadow4all/ShadowCoin,Anfauglith/iop-hd,namecoin/namecoin-core,sipsorcery/bitcoin,rnicoll/dogecoin,vertcoin/vertcoin,Chancoin-core/CHANCOIN,digibyte/digibyte,MazaCoin/maza,joshrabinowitz/bitcoin,UFOCoins/ufo,CryptArc/bitcoin,cryptoprojects/ultimateonlinecash,sstone/bitcoin,cdecker/bitcoin,Flowdalic/bitcoin,tecnovert/particl-core,sarielsaz/sarielsaz,Flowdalic/bitcoin,Friedbaumer/litecoin,Flowdalic/bitcoin,rnicoll/dogecoin,gjhiggins/vcoincore,wangxinxi/litecoin,jamesob/bitcoin,anditto/bitcoin,droark/bitcoin,viacoin/viacoin,AkioNak/bitcoin,midnightmagic/bitcoin,Flowdalic/bitcoin,shelvenzhou/BTCGPU,spiritlinxl/BTCGPU,RHavar/bitcoin,21E14/bitcoin,ajtowns/bitcoin,mruddy/bitcoin,domob1812/bitcoin,GlobalBoost/GlobalBoost,GroestlCoin/bitcoin,jmcorgan/bitcoin,yenliangl/bitcoin,andreaskern/bitcoin,afk11/bitcoin,kevcooper/bitcoin,nbenoit/bitcoin,randy-waterhouse/bitcoin,Sjors/bitcoin,MarcoFalke/bitcoin,paveljanik/bitcoin,spiritlinxl/BTCGPU,sstone/bitcoin,mb300sd/bitcoin,trippysalmon/bitcoin,lateminer/bitcoin,Flowdalic/bitcoin,tjps/bitcoin,n1bor/bitcoin,ahmedbodi/vertcoin,peercoin/peercoin,qtumproject/qtum,untrustbank/litecoin,DigitalPandacoin/pandacoin,apoelstra/bitcoin,rnicoll/dogecoin,gmaxwell/bitcoin,lbryio/lbrycrd,qtumproject/qtum,spiritlinxl/BTCGPU,FeatherCoin/Feathercoin,Friedbaumer/litecoin,mb300sd/bitcoin,guncoin/guncoin,particl/particl-core,dscotese/bitcoin,Xekyo/bitcoin,x-kalux/bitcoin_WiG-B,dscotese/bitcoin,litecoin-project/litecoin,mitchellcash/bitcoin,mb300sd/bitcoin,maaku/bitcoin,anditto/bitcoin,namecoin/namecore,MarcoFalke/bitcoin,yenliangl/bitcoin,afk11/bitcoin,Bushstar/UFO-Project,rnicoll/bitcoin,droark/bitcoin,TheBlueMatt/bitcoin,domob1812/bitcoin,litecoin-project/litecoin,aspanta/bitcoin,anditto/bitcoin,Exgibichi/statusquo,dscotese/bitcoin,StarbuckBG/BTCGPU,JeremyRubin/bitcoin,jlopp/statoshi,peercoin/peercoin,rawodb/bitcoin,BTCGPU/BTCGPU,jlopp/statoshi,CryptArc/bitcoin,DigitalPandacoin/pandacoin,pstratem/bitcoin,GroestlCoin/GroestlCoin,fujicoin/fujicoin,yenliangl/bitcoin,DigitalPandacoin/pandacoin,guncoin/guncoin,rawodb/bitcoin,instagibbs/bitcoin,nbenoit/bitcoin,wangxinxi/litecoin,simonmulser/bitcoin,lbryio/lbrycrd,trippysalmon/bitcoin,UFOCoins/ufo,CryptArc/bitcoin,gjhiggins/vcoincore,midnightmagic/bitcoin,BitzenyCoreDevelopers/bitzeny,domob1812/bitcoin,mitchellcash/bitcoin,MeshCollider/bitcoin,wellenreiter01/Feathercoin,cdecker/bitcoin,jambolo/bitcoin,midnightmagic/bitcoin,JeremyRubin/bitcoin,andreaskern/bitcoin,tecnovert/particl-core,21E14/bitcoin,donaloconnor/bitcoin,mm-s/bitcoin,nikkitan/bitcoin,BitzenyCoreDevelopers/bitzeny,namecoin/namecore,jmcorgan/bitcoin,ryanofsky/bitcoin,Jcing95/iop-hd,paveljanik/bitcoin,bitcoinsSG/bitcoin,droark/bitcoin,apoelstra/bitcoin,destenson/bitcoin--bitcoin,MeshCollider/bitcoin,globaltoken/globaltoken,paveljanik/bitcoin,bitbrazilcoin-project/bitbrazilcoin,jtimon/bitcoin,paveljanik/bitcoin,jnewbery/bitcoin,kazcw/bitcoin,Kogser/bitcoin,EthanHeilman/bitcoin,monacoinproject/monacoin,afk11/bitcoin,ahmedbodi/vertcoin,DigitalPandacoin/pandacoin,sipsorcery/bitcoin,alecalve/bitcoin,BTCGPU/BTCGPU,vertcoin/vertcoin,monacoinproject/monacoin,bitbrazilcoin-project/bitbrazilcoin,particl/particl-core,Jcing95/iop-hd,DigitalPandacoin/pandacoin,shelvenzhou/BTCGPU,Christewart/bitcoin,yenliangl/bitcoin,joshrabinowitz/bitcoin,cryptoprojects/ultimateonlinecash,CryptArc/bitcoin,fanquake/bitcoin,GlobalBoost/GlobalBoost,achow101/bitcoin,jamesob/bitcoin,droark/bitcoin,Bushstar/UFO-Project,jnewbery/bitcoin,viacoin/viacoin,pstratem/bitcoin,starwels/starwels,Kogser/bitcoin,bitcoinsSG/bitcoin,Christewart/bitcoin,Exgibichi/statusquo,BitzenyCoreDevelopers/bitzeny,h4x3rotab/BTCGPU,mb300sd/bitcoin,alecalve/bitcoin,1185/starwels,Kogser/bitcoin,simonmulser/bitcoin,sstone/bitcoin,thrasher-/litecoin,Bushstar/UFO-Project,Gazer022/bitcoin,ppcoin/ppcoin,namecoin/namecore,jmcorgan/bitcoin,bespike/litecoin,BitzenyCoreDevelopers/bitzeny,lbryio/lbrycrd,ryanofsky/bitcoin,x-kalux/bitcoin_WiG-B,sstone/bitcoin,aspanta/bitcoin,afk11/bitcoin,bitbrazilcoin-project/bitbrazilcoin,x-kalux/bitcoin_WiG-B,MeshCollider/bitcoin,thrasher-/litecoin,Christewart/bitcoin,Kogser/bitcoin,bitcoin/bitcoin,trippysalmon/bitcoin,domob1812/bitcoin,ahmedbodi/vertcoin,StarbuckBG/BTCGPU,Anfauglith/iop-hd,thrasher-/litecoin,brandonrobertz/namecoin-core,ajtowns/bitcoin,BTCGPU/BTCGPU,laudaa/bitcoin,particl/particl-core,starwels/starwels,shelvenzhou/BTCGPU,ajtowns/bitcoin,andreaskern/bitcoin,joshrabinowitz/bitcoin,viacoin/viacoin,globaltoken/globaltoken,namecoin/namecoin-core,RHavar/bitcoin,jlopp/statoshi,rawodb/bitcoin,Bushstar/UFO-Project,Theshadow4all/ShadowCoin,litecoin-project/litecoin,laudaa/bitcoin,kevcooper/bitcoin,nikkitan/bitcoin,ericshawlinux/bitcoin,starwels/starwels,yenliangl/bitcoin,pataquets/namecoin-core,stamhe/bitcoin,mitchellcash/bitcoin,kevcooper/bitcoin,trippysalmon/bitcoin,pataquets/namecoin-core,instagibbs/bitcoin,n1bor/bitcoin,ryanofsky/bitcoin,EthanHeilman/bitcoin,achow101/bitcoin,JeremyRubin/bitcoin,tjps/bitcoin,ElementsProject/elements,ajtowns/bitcoin,GroestlCoin/bitcoin,Kogser/bitcoin,trippysalmon/bitcoin,ahmedbodi/vertcoin,OmniLayer/omnicore,shelvenzhou/BTCGPU,bitbrazilcoin-project/bitbrazilcoin,rnicoll/dogecoin,Kogser/bitcoin,cryptoprojects/ultimateonlinecash,BTCGPU/BTCGPU,monacoinproject/monacoin,jambolo/bitcoin,kazcw/bitcoin,practicalswift/bitcoin,anditto/bitcoin,mm-s/bitcoin,MarcoFalke/bitcoin,Rav3nPL/bitcoin,Gazer022/bitcoin,bitcoin/bitcoin,UFOCoins/ufo,pstratem/bitcoin,mitchellcash/bitcoin,GlobalBoost/GlobalBoost,pataquets/namecoin-core,TheBlueMatt/bitcoin,ryanofsky/bitcoin,namecoin/namecoin-core,MarcoFalke/bitcoin,alecalve/bitcoin,aspanta/bitcoin,Xekyo/bitcoin,ryanofsky/bitcoin,kevcooper/bitcoin,bespike/litecoin,pstratem/bitcoin,wangxinxi/litecoin,fanquake/bitcoin,r8921039/bitcoin,domob1812/namecore,kazcw/bitcoin,midnightmagic/bitcoin,StarbuckBG/BTCGPU,spiritlinxl/BTCGPU,randy-waterhouse/bitcoin,UFOCoins/ufo,fujicoin/fujicoin,paveljanik/bitcoin,cdecker/bitcoin,jamesob/bitcoin,bitcoin/bitcoin,jonasschnelli/bitcoin,bespike/litecoin,untrustbank/litecoin,sebrandon1/bitcoin,jamesob/bitcoin,vmp32k/litecoin,bitcoinsSG/bitcoin,mruddy/bitcoin,globaltoken/globaltoken,viacoin/viacoin,pataquets/namecoin-core,instagibbs/bitcoin,BitzenyCoreDevelopers/bitzeny,peercoin/peercoin,vmp32k/litecoin | 4d4fb33fce0803f9c923307bdf82b8fdd2ed140b |
/**
* @file libARSAL/ARSAL.h
* @brief Library global header for libARSAL
* @date 04/12/2013
* @author [email protected]
*/
#ifndef _ARSAL_H_
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
//#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#include <libARSAL/ARSAL_Sem.h>
#include <libARSAL/ARSAL_Socket.h>
#include <libARSAL/ARSAL_Thread.h>
#include <libARSAL/ARSAL_Time.h>
#endif /* _ARSAL_H_ */
| /**
* @file libARSAL/ARSAL.h
* @brief Library global header for libARSAL
* @date 04/12/2013
* @author [email protected]
*/
#ifndef _ARSAL_H_
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#include <libARSAL/ARSAL_Sem.h>
#include <libARSAL/ARSAL_Socket.h>
#include <libARSAL/ARSAL_Thread.h>
#include <libARSAL/ARSAL_Time.h>
#endif /* _ARSAL_H_ */
| ---
+++
@@ -8,7 +8,7 @@
#define _ARSAL_H_
#include <libARSAL/ARSAL_Endianness.h>
-#include <libARSAL/ARSAL_Ftw.h>
+//#include <libARSAL/ARSAL_Ftw.h>
#include <libARSAL/ARSAL_Mutex.h>
#include <libARSAL/ARSAL_Print.h>
#include <libARSAL/ARSAL_Sem.h> | Comment file for the moment.
| bsd-3-clause | kradhub/libARSAL,kradhub/libARSAL,niavok/libARSAL,kradhub/libARSAL,Parrot-Developers/libARSAL,Parrot-Developers/libARSAL,niavok/libARSAL,kradhub/libARSAL,niavok/libARSAL,Parrot-Developers/libARSAL,niavok/libARSAL | 12d24d16af71b1d0ff397f70648ed72d63d2c5d1 |
#include <stdio.h>
#include <string.h>
#include "os.h"
#include "vm.h"
#include "wren.h"
int main(int argc, const char* argv[])
{
if (argc == 2 && strcmp(argv[1], "--help") == 0)
{
printf("Usage: wren [file] [arguments...]\n");
printf(" --help Show command line usage\n");
return 0;
}
if (argc == 2 && strcmp(argv[1], "--version") == 0)
{
printf("wren %s\n", WREN_VERSION_STRING);
return 0;
}
osSetArguments(argc, argv);
if (argc == 1)
{
runRepl();
}
else
{
runFile(argv[1]);
}
return 0;
}
| #include <stdio.h>
#include <string.h>
#include "os.h"
#include "vm.h"
#include "wren.h"
int main(int argc, const char* argv[])
{
if (argc == 2 && strcmp(argv[1], "--help") == 0)
{
printf("Usage: wren [file] [arguments...]\n");
printf(" --help Show command line usage\n");
return 0;
}
osSetArguments(argc, argv);
if (argc == 1)
{
runRepl();
}
else
{
runFile(argv[1]);
}
return 0;
}
| ---
+++
@@ -14,6 +14,12 @@
return 0;
}
+ if (argc == 2 && strcmp(argv[1], "--version") == 0)
+ {
+ printf("wren %s\n", WREN_VERSION_STRING);
+ return 0;
+ }
+
osSetArguments(argc, argv);
if (argc == 1) | Support "--version" in the CLI to print the version.
| mit | Nelarius/wren,minirop/wren,minirop/wren,munificent/wren,foresterre/wren,minirop/wren,foresterre/wren,munificent/wren,minirop/wren,foresterre/wren,munificent/wren,Nelarius/wren,munificent/wren,minirop/wren,munificent/wren,foresterre/wren,Nelarius/wren,munificent/wren,Nelarius/wren,Nelarius/wren,foresterre/wren | b59eeaf2d1365e2c42ea1bdb9521a5e0302469b8 |
#pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) != std::end(c);
}
template<typename... Args>
std::string format(const std::string& format, Args... args)
{
int neededSize = snprintf(nullptr, 0, format.c_str(), args...);
// If there was an error return the original string.
if(neededSize <= 0)
return format;
// Accommodate \0
neededSize += 1;
std::string buf;
buf.resize(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...);
return buf;
}
cv::Size getScaledDownResolution(const int width,
const int height,
const int preferredWidth);
void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation);
json11::Json loadJson(const std::string& filePath);
}
| #pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) != std::end(c);
}
template<typename... Args>
std::string format(const std::string& format, Args... args)
{
int neededSize = snprintf(nullptr, 0, format.c_str(), args...);
// If there was an error return the original string.
if(neededSize <= 0)
return format;
neededSize += 1;
std::vector<char> buf(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...);
return std::string(&buf.front());
}
cv::Size getScaledDownResolution(const int width,
const int height,
const int preferredWidth);
void rotate(const cv::Mat& src, cv::Mat& dst, const yarrar::Rotation90& rotation);
json11::Json loadJson(const std::string& filePath);
}
| ---
+++
@@ -25,10 +25,13 @@
if(neededSize <= 0)
return format;
+ // Accommodate \0
neededSize += 1;
- std::vector<char> buf(static_cast<size_t> (neededSize));
+
+ std::string buf;
+ buf.resize(static_cast<size_t> (neededSize));
snprintf(&buf.front(), static_cast<size_t> (neededSize), format.c_str(), args...);
- return std::string(&buf.front());
+ return buf;
}
cv::Size getScaledDownResolution(const int width, | Use std::string straight instead of vector<char> in format().
| mit | ndob/yarrar,ndob/yarrar,ndob/yarrar,ndob/yarrar | def6ae3782834ccbd07047ca10d7f6bf7ebde449 |
/** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __PI_PEI_H__
#define __PI_PEI_H__
#include <Uefi/UefiBaseType.h>
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
#endif
| /** @file
Root include file for Mde Package SEC, PEIM, PEI_CORE type modules.
This is the include file for any module of type PEIM. PEIM
modules only use types defined via this include file and can
be ported easily to any environment.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __PI_PEI_H__
#define __PI_PEI_H__
#include <Uefi/UefiBaseType.h>
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
//
// BUGBUG: The EFI_PEI_STARTUP_DESCRIPTOR definition does not follows PI specification.
// After enabling PI for Nt32Pkg and tools generate correct autogen for PEI_CORE,
// the following structure should be removed at once.
//
typedef struct {
UINTN BootFirmwareVolume;
UINTN SizeOfCacheAsRam;
EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
} EFI_PEI_STARTUP_DESCRIPTOR;
#endif
| ---
+++
@@ -24,16 +24,6 @@
#include <Pi/PiPeiCis.h>
#include <Uefi/UefiMultiPhase.h>
-//
-// BUGBUG: The EFI_PEI_STARTUP_DESCRIPTOR definition does not follows PI specification.
-// After enabling PI for Nt32Pkg and tools generate correct autogen for PEI_CORE,
-// the following structure should be removed at once.
-//
-typedef struct {
- UINTN BootFirmwareVolume;
- UINTN SizeOfCacheAsRam;
- EFI_PEI_PPI_DESCRIPTOR *DispatchTable;
-} EFI_PEI_STARTUP_DESCRIPTOR;
#endif
| Move the EFI_PEI_STARTUP_DESCRIPTOR into IntelFrameworkPkg.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@4120 6f19259b-4bc3-4df7-8a09-765794883524
| bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 | 94db2b46f8108d0f5e6edc0d65ae20eee40414aa |
//
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import <Foundation/Foundation.h>
#define KW_VERSION 0.5
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#if defined(__BLOCKS__)
#ifndef KW_BLOCKS_ENABLED
#define KW_BLOCKS_ENABLED 1
#endif // #ifndef KW_BLOCKS_ENABLED
#endif // #if defined(__BLOCKS__)
// As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or
// forwardInvocation: boundary in the simulator will terminate the app instead
// of being caught in @catch blocks from the caller side of the -invoke. Kiwi
// tries to handle this by storing the first exception that it would have
// otherwise thrown in a nasty global that callers can look for and handle.
// (Buggy termination is less desirable than global variables).
//
// Obviously, this can only handles cases where Kiwi itself would have raised
// an exception.
#if TARGET_IPHONE_SIMULATOR
#define KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG 1
#endif // #if TARGET_IPHONE_SIMULATOR
| //
// Licensed under the terms in License.txt
//
// Copyright 2010 Allen Ding. All rights reserved.
//
#import <Foundation/Foundation.h>
#define KW_VERSION 0.5
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#if defined(__BLOCKS__)
#define KW_BLOCKS_ENABLED 1
#endif // #if defined(__BLOCKS__)
// As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or
// forwardInvocation: boundary in the simulator will terminate the app instead
// of being caught in @catch blocks from the caller side of the -invoke. Kiwi
// tries to handle this by storing the first exception that it would have
// otherwise thrown in a nasty global that callers can look for and handle.
// (Buggy termination is less desirable than global variables).
//
// Obviously, this can only handles cases where Kiwi itself would have raised
// an exception.
#if TARGET_IPHONE_SIMULATOR
#define KW_TARGET_HAS_INVOCATION_EXCEPTION_BUG 1
#endif // #if TARGET_IPHONE_SIMULATOR
| ---
+++
@@ -11,7 +11,9 @@
// Blocks being unavailable cripples the usability of Kiwi, but is supported
// because they are not available on anything less than a device running 3.2.
#if defined(__BLOCKS__)
- #define KW_BLOCKS_ENABLED 1
+ #ifndef KW_BLOCKS_ENABLED
+ #define KW_BLOCKS_ENABLED 1
+ #endif // #ifndef KW_BLOCKS_ENABLED
#endif // #if defined(__BLOCKS__)
// As of iPhone SDK 4 GM, exceptions thrown across an NSInvocation -invoke or | Add support for disabling blocks externally via preprocessor macro definitions at the project or target level
| bsd-3-clause | ecaselles/Kiwi,allending/Kiwi,LiuShulong/Kiwi,TaemoonCho/Kiwi,emodeqidao/Kiwi,weslindsay/Kiwi,depop/Kiwi,emodeqidao/Kiwi,unisontech/Kiwi,samkrishna/Kiwi,tangwei6423471/Kiwi,samkrishna/Kiwi,tangwei6423471/Kiwi,indiegogo/Kiwi,JoistApp/Kiwi,LiuShulong/Kiwi,ashfurrow/Kiwi,howandhao/Kiwi,iosRookie/Kiwi,hyperoslo/Tusen,emodeqidao/Kiwi,indiegogo/Kiwi,alloy/Kiwi,unisontech/Kiwi,weslindsay/Kiwi,alloy/Kiwi,tcirwin/Kiwi,tangwei6423471/Kiwi,ecaselles/Kiwi,iosRookie/Kiwi,tonyarnold/Kiwi,samkrishna/Kiwi,carezone/Kiwi,tonyarnold/Kiwi,ashfurrow/Kiwi,emodeqidao/Kiwi,depop/Kiwi,ecaselles/Kiwi,JoistApp/Kiwi,tonyarnold/Kiwi,ecaselles/Kiwi,hyperoslo/Tusen,cookov/Kiwi,hyperoslo/Tusen,tangwei6423471/Kiwi,howandhao/Kiwi,LiuShulong/Kiwi,tcirwin/Kiwi,samkrishna/Kiwi,tcirwin/Kiwi,JoistApp/Kiwi,tcirwin/Kiwi,hyperoslo/Tusen,howandhao/Kiwi,cookov/Kiwi,indiegogo/Kiwi,PaulTaykalo/Kiwi,allending/Kiwi,carezone/Kiwi,TaemoonCho/Kiwi,depop/Kiwi,depop/Kiwi,unisontech/Kiwi,allending/Kiwi,iosRookie/Kiwi,TaemoonCho/Kiwi,ashfurrow/Kiwi,howandhao/Kiwi,cookov/Kiwi,TaemoonCho/Kiwi,LiuShulong/Kiwi,alloy/Kiwi,unisontech/Kiwi,cookov/Kiwi,weslindsay/Kiwi,iosRookie/Kiwi,tonyarnold/Kiwi,JoistApp/Kiwi,indiegogo/Kiwi,PaulTaykalo/Kiwi,weslindsay/Kiwi,PaulTaykalo/Kiwi,PaulTaykalo/Kiwi,carezone/Kiwi,allending/Kiwi,carezone/Kiwi | 6779aa4e1884e4bb6e87820f7d29f08a84fde425 |
#include <stdlib.h>
#include <time.h>
#include "graphics.h"
#include "surface.h"
#include "time-module.h"
typedef struct TimeModule {
Module base;
} TimeModule;
Module* newTimeModule()
{
TimeModule* module = malloc(sizeof(TimeModule));
module->base.width = 150;
module->base.height = 100;
module->base.updateFunc = updateTimeModule;
module->base.freeFunc = freeTimeModule;
return (Module*)module;
}
void freeTimeModule(Module* module)
{
free(module);
}
void updateTimeModule(Module* module, Surface* surface)
{
// Get the current time
time_t t;
struct tm* tm;
t = time(NULL);
tm = localtime(&t);
char strTime[6];
strftime(strTime, sizeof strTime, "%H:%M", tm);
// Draw the rect
setDrawColor(surface, 1.0, 1.0, 1.0, 0.8);
drawRect(surface, 0, 0, module->width, module->height);
// Draw the time
setDrawColor(surface, 0, 0, 0, 0.8);
drawText(surface, 10, 10, 32, "monaco", strTime);
}
| #include <stdlib.h>
#include "graphics.h"
#include "surface.h"
#include "time-module.h"
typedef struct TimeModule {
Module base;
} TimeModule;
Module* newTimeModule()
{
TimeModule* module = malloc(sizeof(TimeModule));
module->base.width = 150;
module->base.height = 100;
module->base.updateFunc = updateTimeModule;
module->base.freeFunc = freeTimeModule;
return (Module*)module;
}
void freeTimeModule(Module* module)
{
free(module);
}
void updateTimeModule(Module* module, Surface* surface)
{
setDrawColor(surface, 1.0, 1.0, 1.0, 0.8);
drawRect(surface, 0, 0, module->width, module->height);
setDrawColor(surface, 0, 0, 0, 0.8);
drawText(surface, 10, 10, 32, "monaco", "Good");
}
| ---
+++
@@ -1,4 +1,5 @@
#include <stdlib.h>
+#include <time.h>
#include "graphics.h"
#include "surface.h"
@@ -25,9 +26,20 @@
void updateTimeModule(Module* module, Surface* surface)
{
+ // Get the current time
+ time_t t;
+ struct tm* tm;
+ t = time(NULL);
+ tm = localtime(&t);
+
+ char strTime[6];
+ strftime(strTime, sizeof strTime, "%H:%M", tm);
+
+ // Draw the rect
setDrawColor(surface, 1.0, 1.0, 1.0, 0.8);
drawRect(surface, 0, 0, module->width, module->height);
+ // Draw the time
setDrawColor(surface, 0, 0, 0, 0.8);
- drawText(surface, 10, 10, 32, "monaco", "Good");
+ drawText(surface, 10, 10, 32, "monaco", strTime);
} | Replace placeholder string in time module with time.
| mit | jamiesyme/minfo,jamiesyme/minfo | ded8ea7469b305ee6ceb65103af010329b97ce9a |
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(struct client *client)
{
struct mail_storage *storage;
const char *mailbox, *full_mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
full_mailbox = mailbox;
storage = client_find_storage(client, &mailbox);
if (storage == NULL)
return TRUE;
len = strlen(mailbox);
if (mailbox[len-1] != mail_storage_get_hierarchy_sep(storage))
directory = FALSE;
else {
/* name ends with hierarchy separator - client is just
informing us that it wants to create children under this
mailbox. */
directory = TRUE;
mailbox = t_strndup(mailbox, len-1);
}
if (!client_verify_mailbox_name(client, full_mailbox, FALSE, TRUE))
return TRUE;
if (mail_storage_mailbox_create(storage, mailbox, directory) < 0)
client_send_storage_error(client, storage);
else
client_send_tagline(client, "OK Create completed.");
return TRUE;
}
| /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(struct client *client)
{
struct mail_storage *storage;
const char *mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
storage = client_find_storage(client, &mailbox);
if (storage == NULL)
return TRUE;
len = strlen(mailbox);
if (mailbox[len-1] != mail_storage_get_hierarchy_sep(storage))
directory = FALSE;
else {
/* name ends with hierarchy separator - client is just
informing us that it wants to create children under this
mailbox. */
directory = TRUE;
mailbox = t_strndup(mailbox, len-1);
}
if (!client_verify_mailbox_name(client, mailbox, FALSE, TRUE))
return TRUE;
if (mail_storage_mailbox_create(storage, mailbox, directory) < 0)
client_send_storage_error(client, storage);
else
client_send_tagline(client, "OK Create completed.");
return TRUE;
}
| ---
+++
@@ -6,13 +6,14 @@
int cmd_create(struct client *client)
{
struct mail_storage *storage;
- const char *mailbox;
+ const char *mailbox, *full_mailbox;
int directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
+ full_mailbox = mailbox;
storage = client_find_storage(client, &mailbox);
if (storage == NULL)
@@ -29,7 +30,7 @@
mailbox = t_strndup(mailbox, len-1);
}
- if (!client_verify_mailbox_name(client, mailbox, FALSE, TRUE))
+ if (!client_verify_mailbox_name(client, full_mailbox, FALSE, TRUE))
return TRUE;
if (mail_storage_mailbox_create(storage, mailbox, directory) < 0) | CREATE was broken if namespace prefixes were set. Patch by Andreas Fuchs.
| mit | LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot,LTD-Beget/dovecot | cdb2eaafed65da729c51179cab0d0b31692cfea7 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* libmspub
* Version: MPL 1.1 / GPLv2+ / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2012 Brennan Vincent <[email protected]>
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPLv2+"), or
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
* instead of those above.
*/
#ifndef __MSPUBCONSTANTS_H__
#define __MSPUBCONSTANTS_H__
namespace libmspub
{
const unsigned EMUS_IN_INCH = 914400;
}
#endif /* __MSPUBCONSTANTS_H__ */
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
| namespace libmspub
{
const unsigned EMUS_IN_INCH = 914400;
}
| ---
+++
@@ -1,4 +1,38 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* libmspub
+ * Version: MPL 1.1 / GPLv2+ / LGPLv2+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Brennan Vincent <[email protected]>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPLv2+"), or
+ * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
+ * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __MSPUBCONSTANTS_H__
+#define __MSPUBCONSTANTS_H__
+
namespace libmspub
{
const unsigned EMUS_IN_INCH = 914400;
}
+
+#endif /* __MSPUBCONSTANTS_H__ */
+/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ | Add license header to the file
| mpl-2.0 | LibreOffice/libmspub,LibreOffice/libmspub,LibreOffice/libmspub | f4a3cffb0a988313acdb83a6d658001c8c06e07b |
//
// lelib.h
// lelib
//
// Created by Petr on 27.10.13.
// Copyright (c) 2013,2014 Logentries. All rights reserved.
//
#ifndef LE_DEBUG_LOGS
// #ifdef DEBUG
// #define LE_DEBUG_LOGS 1
// #else
#define LE_DEBUG_LOGS 0
// #endif
#endif
#if LE_DEBUG_LOGS
#define LE_DEBUG(...) NSLog(__VA_ARGS__)
#else
#define LE_DEBUG(...)
#endif
#import "LELog.h"
#import "lecore.h"
| //
// lelib.h
// lelib
//
// Created by Petr on 27.10.13.
// Copyright (c) 2013,2014 Logentries. All rights reserved.
//
#ifndef LE_DEBUG_LOGS
#ifdef DEBUG
#define LE_DEBUG_LOGS 1
#else
#define LE_DEBUG_LOGS 0
#endif
#endif
#if LE_DEBUG_LOGS
#define LE_DEBUG(...) NSLog(__VA_ARGS__)
#else
#define LE_DEBUG(...)
#endif
#import "LELog.h"
#import "lecore.h"
| ---
+++
@@ -7,11 +7,11 @@
//
#ifndef LE_DEBUG_LOGS
- #ifdef DEBUG
- #define LE_DEBUG_LOGS 1
- #else
+// #ifdef DEBUG
+// #define LE_DEBUG_LOGS 1
+// #else
#define LE_DEBUG_LOGS 0
- #endif
+// #endif
#endif
#if LE_DEBUG_LOGS | Disable LE's own debug log spam | mit | JohnLemberger/le_ios | 16e0b0cb9c40169a646660f492617c037e8acafe |
#pragma once
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
| #ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
| ---
+++
@@ -1,5 +1,4 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
+#pragma once
#include <QMainWindow>
@@ -19,4 +18,3 @@
Ui::MainWindow *ui;
};
-#endif // MAINWINDOW_H | Use pragma once instead of ifdef
| bsd-2-clause | csete/softrig,csete/softrig,csete/softrig | a21685eab417189d887db6d5a83bfff83661c1eb |
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
/**
* @internal
*
* @brief Requests a list of addresses corresponding to a given name.
*
* @since 1.8
*
* @remarks This is used if you want to search the address from a name.
*
* @param obj The map object
* @param address The address
* @param name_cb The callback function
* @param data The user callback data
*
* @ingroup Map
*/
EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
#include "elm_map.eo.legacy.h"
| /**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
#include "elm_map.eo.legacy.h" | ---
+++
@@ -10,4 +10,22 @@
*/
EAPI Evas_Object *elm_map_add(Evas_Object *parent);
+/**
+ * @internal
+ *
+ * @brief Requests a list of addresses corresponding to a given name.
+ *
+ * @since 1.8
+ *
+ * @remarks This is used if you want to search the address from a name.
+ *
+ * @param obj The map object
+ * @param address The address
+ * @param name_cb The callback function
+ * @param data The user callback data
+ *
+ * @ingroup Map
+ */
+EAPI void elm_map_name_search(const Evas_Object *obj, const char *address, Elm_Map_Name_List_Cb name_cb, void *data);
+
#include "elm_map.eo.legacy.h" | map: Add missing legacy API into legacy header
Summary: @fix
Reviewers: raster
Reviewed By: raster
Differential Revision: https://phab.enlightenment.org/D1164
| lgpl-2.1 | FlorentRevest/Elementary,tasn/elementary,tasn/elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,rvandegrift/elementary | cfdaffb8cf65ab0a934de2efb513e66989b4bad6 |
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
const uint8_t *digest() const {
return m_digest.data();
}
size_t size() const {
return m_digest.size();
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
| // LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
| ---
+++
@@ -33,6 +33,14 @@
return m_digest[index];
}
+ const uint8_t *digest() const {
+ return m_digest.data();
+ }
+
+ size_t size() const {
+ return m_digest.size();
+ }
+
private:
std::vector<uint8_t> m_digest;
}; | Add Sha1 class methods digest() and size()
| mit | aseprite/laf,aseprite/laf | 71e936386443d7e71382dc6d0b9cfeccf47a89ea |
#include <pthread.h>
#include <assert.h>
int g = 0;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&C);
pthread_mutex_lock(&B);
g = 5;
pthread_mutex_unlock(&B);
pthread_mutex_lock(&B);
g = 0;
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
// This must be before the other to get Mine to fail for the other even with thread ID partitioning.
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
assert(g == 0);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&B);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
assert(g == 0);
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
pthread_join(id, NULL);
return 0;
}
| #include <pthread.h>
#include <assert.h>
int g = 0;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&C);
pthread_mutex_lock(&B);
g = 5;
pthread_mutex_unlock(&B);
pthread_mutex_lock(&B);
g = 0;
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
assert(g == 0);
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
assert(g == 0);
pthread_mutex_unlock(&C);
pthread_mutex_unlock(&B);
pthread_join(id, NULL);
return 0;
}
| ---
+++
@@ -24,18 +24,19 @@
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
+ // This must be before the other to get Mine to fail for the other even with thread ID partitioning.
+ pthread_mutex_lock(&B);
+ pthread_mutex_lock(&C);
+ assert(g == 0);
+ pthread_mutex_unlock(&C);
+ pthread_mutex_unlock(&B);
+
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
assert(g == 0);
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&A);
- pthread_mutex_lock(&B);
- pthread_mutex_lock(&C);
- assert(g == 0);
- pthread_mutex_unlock(&C);
- pthread_mutex_unlock(&B);
-
pthread_join(id, NULL);
return 0;
} | Fix 13/32 to fail Mine even with thread ID partitioning
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | 16c5392030f8f27d6b41395ccb45194cfbca79ed |
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
#include "encoderfoaw.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
if (angle < -boost::math::constants::pi<T>()) {
angle += boost::math::constants::two_pi<T>();
}
return angle;
}
/*
* Get angle from encoder count (enccnt_t is uint32_t)
* Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative
* values for any count over half a revolution.
*/
template <typename T>
T encoder_count(const Encoder& encoder) {
auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count());
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
if (position > rev / 2) {
position -= rev;
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
template <typename T, size_t N>
T encoder_rate(const EncoderFoaw<T, N>& encoder) {
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
return static_cast<T>(encoder.velocity()) / rev * boost::math::constants::two_pi<T>();
}
} // namespace angle
| #pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
if (angle < -boost::math::constants::pi<T>()) {
angle += boost::math::constants::two_pi<T>();
}
return angle;
}
/*
* Get angle from encoder count (enccnt_t is uint32_t)
* Convert angle from enccnt_t (unsigned) to corresponding signed type and use negative
* values for any count over half a revolution.
*/
template <typename T>
T encoder_count(const Encoder& encoder) {
auto position = static_cast<std::make_signed<enccnt_t>::type>(encoder.count());
auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
if (position > rev / 2) {
position -= rev;
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
} // namespace angle
| ---
+++
@@ -1,6 +1,7 @@
#pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
+#include "encoderfoaw.h"
namespace angle {
template <typename T>
@@ -29,4 +30,10 @@
}
return static_cast<T>(position) / rev * boost::math::constants::two_pi<T>();
}
+
+template <typename T, size_t N>
+T encoder_rate(const EncoderFoaw<T, N>& encoder) {
+ auto rev = static_cast<std::make_signed<enccnt_t>::type>(encoder.config().counts_per_rev);
+ return static_cast<T>(encoder.velocity()) / rev * boost::math::constants::two_pi<T>();
+}
} // namespace angle | Add function to obtain encoder angular rate
Add function to angle namespace to obtain encoder angular rate in rad/s.
This requires that the encoder object has a velocity() member function
which means only EncoderFoaw for now.
| bsd-2-clause | oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos | 5a7a1d9b287813559f13298575dba1de09040900 |
#pragma once
#include <string>
#include <cstdlib>
// Integer types
#ifdef int8_t
typedef char int8_t;
#endif // !int8_t
#ifdef uint8_t
typedef unsigned char uint8_t;
#endif // !uint8_t
#ifdef int16_t
typedef short int16_t;
#endif // !int16_t
#ifdef uint16_t
typedef unsigned short uint16_t;
#endif // !uint16_t
#ifdef int32_t
typedef long int32_t;
#endif // !int32_t
#ifdef uint32_t
typedef unsigned long uint32_t;
#endif // !uint32_t
#ifdef int64_t
typedef long long int64_t;
#endif // !int64_t
#ifdef uint64_t
typedef unsigned long long uint64_t;
#endif // !uint64_t
#ifndef _swap_int
template <typename T>
void _swap_int(T& a, T& b) { T t(a); a = b; b = t; }
#endif // !_swap_int | #pragma once
#include <string>
#include <cstdlib>
// Integer types
typedef char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef long int32_t;
typedef unsigned long uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
#ifndef _swap_int
template <typename T>
void _swap_int(T& a, T& b) { T t(a); a = b; b = t; }
#endif // !_swap_int | ---
+++
@@ -4,14 +4,37 @@
#include <cstdlib>
// Integer types
+#ifdef int8_t
typedef char int8_t;
+#endif // !int8_t
+
+#ifdef uint8_t
typedef unsigned char uint8_t;
+#endif // !uint8_t
+
+#ifdef int16_t
typedef short int16_t;
+#endif // !int16_t
+
+#ifdef uint16_t
typedef unsigned short uint16_t;
+#endif // !uint16_t
+
+#ifdef int32_t
typedef long int32_t;
+#endif // !int32_t
+
+#ifdef uint32_t
typedef unsigned long uint32_t;
+#endif // !uint32_t
+
+#ifdef int64_t
typedef long long int64_t;
+#endif // !int64_t
+
+#ifdef uint64_t
typedef unsigned long long uint64_t;
+#endif // !uint64_t
#ifndef _swap_int
| Fix basic type redefinition errors
| mit | LartSimZ/gameAmbiance | c7d9355a433bbd0f82dfa466bf220101e456789a |
#include "MMDB.h"
#include "tap.h"
#include <sys/stat.h>
#include <string.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
int main(void)
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
if ( version )
ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
done_testing();
}
| #include "MMDB.h"
#include "tap.h"
#include <sys/stat.h>
#include <string.h>
#if HAVE_CONFIG_H
# include <config.h>
#endif
int main(void)
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
done_testing();
}
| ---
+++
@@ -10,6 +10,7 @@
{
const char *version = MMDB_lib_version();
ok(version != NULL, "MMDB_lib_version exists");
- ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
+ if ( version )
+ ok(strcmp(version, PACKAGE_VERSION) == 0, "version is " PACKAGE_VERSION);
done_testing();
} | Check version string only if MMDB_lib_version != NULL
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | dde3ee5113fd0ae40cfb6788e4bd0a2a8c60eb72 |
#ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
// Exclude in case ROOT does not have IMT support
#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;
#endif
#endif
| #ifdef __CLING__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;
#endif
| ---
+++
@@ -5,8 +5,11 @@
#pragma link off all functions;
// Only for the autoload, autoparse. No IO of these classes is foreseen!
+// Exclude in case ROOT does not have IMT support
+#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;
+#endif
#endif | [IMT] Fix warning during dictionary generation in no-imt builds
| lgpl-2.1 | karies/root,olifre/root,olifre/root,karies/root,karies/root,olifre/root,olifre/root,olifre/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,olifre/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,root-mirror/root,olifre/root,karies/root,olifre/root,root-mirror/root,root-mirror/root,root-mirror/root,karies/root | 322b07ff24932fb0e59114e30620e47501a84191 |
#define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
tmpdir = "/tmp";
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
if(fname)
*fname = tmppath;
else
free(tmppath);
return fd;
}
| #define _XOPEN_SOURCE 500 /* mkstemp */
#include <stdlib.h>
#include <unistd.h>
#include "tmpfile.h"
#include "alloc.h"
int tmpfile_prefix_out(const char *prefix, char **const fname)
{
char *tmppath;
int fd;
char *tmpdir = getenv("TMPDIR");
#ifdef P_tmpdir
if(!tmpdir)
tmpdir = P_tmpdir;
#endif
if(!tmpdir)
tmpdir = "/tmp";
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
if(fd < 0){
free(tmppath);
tmppath = NULL;
}
if(fname)
*fname = tmppath;
else
free(tmppath);
return fd;
}
| ---
+++
@@ -21,11 +21,6 @@
tmppath = ustrprintf("%s/%sXXXXXX", tmpdir, prefix);
fd = mkstemp(tmppath);
- if(fd < 0){
- free(tmppath);
- tmppath = NULL;
- }
-
if(fname)
*fname = tmppath;
else | Revert "Free tmppath on mkstemp() failure" (moved to master)
This reverts commit 85598a0ccbea2d82303c5cb2daa9a29ec01eb3d2.
| mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler | 5560daf0cbabab65b07476ca16285012a4f6489e |
// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s
// All of these should uses the memory representation of _Bool
// CHECK-LABEL: %struct.teststruct1 = type { i8, i8 }
// CHECK-LABEL: @test1 = common global %struct.teststruct1
struct teststruct1 {_Bool a, b;} test1;
// CHECK-LABEL: @test2 = common global i8* null
_Bool* test2;
// CHECK-LABEL: @test3 = common global [10 x i8]
_Bool test3[10];
// CHECK-LABEL: @test4 = common global [0 x i8]* null
_Bool (*test4)[];
// CHECK-LABEL: define void @f(i32 %x)
void f(int x) {
// CHECK: alloca i8, align 1
_Bool test5;
// CHECK: alloca i8, i32 %{{.*}}, align 1
_Bool test6[x];
}
| // RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
// All of these should uses the memory representation of _Bool
struct teststruct1 {_Bool a, b;} test1;
_Bool* test2;
_Bool test3[10];
_Bool (*test4)[];
void f(int x) {
_Bool test5;
_Bool test6[x];
}
| ---
+++
@@ -1,10 +1,24 @@
-// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
+// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s
// All of these should uses the memory representation of _Bool
+
+// CHECK-LABEL: %struct.teststruct1 = type { i8, i8 }
+// CHECK-LABEL: @test1 = common global %struct.teststruct1
struct teststruct1 {_Bool a, b;} test1;
+
+// CHECK-LABEL: @test2 = common global i8* null
_Bool* test2;
+
+// CHECK-LABEL: @test3 = common global [10 x i8]
_Bool test3[10];
+
+// CHECK-LABEL: @test4 = common global [0 x i8]* null
_Bool (*test4)[];
+
+// CHECK-LABEL: define void @f(i32 %x)
void f(int x) {
+ // CHECK: alloca i8, align 1
_Bool test5;
+
+ // CHECK: alloca i8, i32 %{{.*}}, align 1
_Bool test6[x];
} | Convert test to FileCheck and make it more strict.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@197248 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang | 7a9c7c2303dcd388acfc7467473f3cdc0facbd91 |
#pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
# define __NR_finit_module -1
#endif
#ifndef HAVE_FINIT_MODULE
#include <errno.h>
static inline int finit_module(int fd, const char *uargs, int flags)
{
if (__NR_finit_module == -1) {
errno = ENOSYS;
return -1;
}
return syscall(__NR_finit_module, fd, uargs, flags);
}
#endif
#if !HAVE_DECL_STRNDUPA
#define strndupa(s, n) \
({ \
const char *__old = (s); \
size_t __len = strnlen(__old, (n)); \
char *__new = alloca(__len + 1); \
__new[__len] = '\0'; \
memcpy(__new, __old, __len); \
})
#endif
| #pragma once
#include <unistd.h>
#include <sys/syscall.h>
#ifdef HAVE_LINUX_MODULE_H
#include <linux/module.h>
#endif
#ifndef MODULE_INIT_IGNORE_MODVERSIONS
# define MODULE_INIT_IGNORE_MODVERSIONS 1
#endif
#ifndef MODULE_INIT_IGNORE_VERMAGIC
# define MODULE_INIT_IGNORE_VERMAGIC 2
#endif
#ifndef __NR_finit_module
# define __NR_finit_module -1
#endif
#ifndef HAVE_FINIT_MODULE
#include <errno.h>
static inline int finit_module(int fd, const char *uargs, int flags)
{
if (__NR_finit_module == -1) {
errno = ENOSYS;
return -1;
}
return syscall(__NR_finit_module, fd, uargs, flags);
}
#endif
#if !HAVE_DECL_STRNDUPA
#define strndupa(s, length) \
({ \
size_t __len = strnlen((s), (length)); \
strncpy(alloca(__len + 1), (s), __len); \
})
#endif
| ---
+++
@@ -34,9 +34,12 @@
#endif
#if !HAVE_DECL_STRNDUPA
-#define strndupa(s, length) \
- ({ \
- size_t __len = strnlen((s), (length)); \
- strncpy(alloca(__len + 1), (s), __len); \
+#define strndupa(s, n) \
+ ({ \
+ const char *__old = (s); \
+ size_t __len = strnlen(__old, (n)); \
+ char *__new = alloca(__len + 1); \
+ __new[__len] = '\0'; \
+ memcpy(__new, __old, __len); \
})
#endif | Make sure there's NUL byte at the end of strndupa
Since strcpy() doesn't ensure we have a NUL byte in the resulting
string, use alloca() + memcpy(). Also make sure we don't evaluate "s"
twice.
| lgpl-2.1 | pmmccorm/kmod,lpereira/kmod,Distrotech/kmod,pmmccorm/kmod,pmmccorm/kmod,lucasdemarchi/kmod,lpereira/kmod,Distrotech/kmod,lucasdemarchi/kmod,Distrotech/kmod,lpereira/kmod,lucasdemarchi/kmod | f5cdd574a531ed156d30efe2e06c4cf463469588 |
#ifndef BOREUTILS_H
#define BOREUTILS_H
#include <string.h>
static const char *BOREUTILS_VERSION = "0.0.0b1";
int has_arg(int argc, char **argv, char *search);
void bu_missing_argument(char *name);
int bu_handle_version(int argc, char **argv);
// FIXME: Having this in a header is definitely a hack.
int has_arg(int argc, char **argv, char *search)
{
for (int idx = 1; idx < argc; idx++) {
if (strcmp(argv[idx], search) == 0) {
return 1;
}
}
return 0;
}
void bu_missing_argument(char *name) {
fprintf(stderr, "%s: Missing argument\nSee '%s --help' for more information.\n", name, name);
}
int bu_handle_version(int argc, char **argv) {
if (has_arg(argc, argv, "--version")) {
printf("%s (Boreutils) %s\n", argv[0], BOREUTILS_VERSION);
return 1;
}
return 0;
}
#endif
| #ifndef BOREUTILS_H
#define BOREUTILS_H
#include <string.h>
static const char *BOREUTILS_VERSION = "0.0.0b1";
int has_arg(int argc, char **argv, char *search);
void bu_missing_argument(char *name);
int bu_handle_version(int argc, char **argv);
// FIXME: Having this in a header is definitely a hack.
int has_arg(int argc, char **argv, char *search)
{
for (int idx = 1; idx < argc; idx++) {
if (strcmp(argv[idx], search) == 0) {
return 1;
}
}
return 0;
}
void bu_missing_argument(char *name) {
fprintf(stderr, "%s: Missing argument\nSee '%s --help' for more information.\n", name, name);
}
int bu_handle_version(int argc, char **argv) {
if (has_arg(argc, argv, "--version")) {
printf("Boreutils %s v%s\n", argv[0], BOREUTILS_VERSION);
return 1;
}
return 0;
}
#endif
| ---
+++
@@ -30,7 +30,7 @@
int bu_handle_version(int argc, char **argv) {
if (has_arg(argc, argv, "--version")) {
- printf("Boreutils %s v%s\n", argv[0], BOREUTILS_VERSION);
+ printf("%s (Boreutils) %s\n", argv[0], BOREUTILS_VERSION);
return 1;
}
| Change --version format to "<name> (Boreutils) <version>"
| isc | duckinator/boreutils,duckinator/boreutils | 548a5f97ccdab26e90a7e0ba87b1510cfd490dbb |
#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(args, format);
printTimeString();
putchar(' ');
vprintf(format, args);
putchar('\n');
if (flushAfterLog)
{
fflush(stdout);
}
va_end(args);
}
| #include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(args, format);
printTimeString();
printf(" ");
vprintf(format, args);
printf("\n");
if (flushAfterLog)
{
fflush(stdout);
}
va_end(args);
}
| ---
+++
@@ -20,9 +20,9 @@
va_start(args, format);
printTimeString();
- printf(" ");
+ putchar(' ');
vprintf(format, args);
- printf("\n");
+ putchar('\n');
if (flushAfterLog)
{ | Use putchar instead of printf.
| mit | aaronriekenberg/openbsd_cproxy,aaronriekenberg/openbsd_cproxy | f3e611c9e373a0147be472cb7913f3604baf2a08 |
/* See LICENSE file for copyright and license details. */
#include "internals.h"
void
libzahl_realloc(z_t a, size_t need)
{
size_t i, x;
zahl_char_t *new;
/* Find n such that n is a minimal power of 2 ≥ need. */
if (likely((need & (~need + 1)) != need)) {
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
for (i = sizeof(need), x = 8; (i >>= 1); x <<= 1)
need |= need >> x;
need += 1;
}
i = libzahl_msb_nz_zu(need);
if (likely(libzahl_pool_n[i])) {
libzahl_pool_n[i]--;
new = libzahl_pool[i][libzahl_pool_n[i]];
zmemcpy(new, a->chars, a->alloced);
zfree(a);
a->chars = new;
} else {
a->chars = realloc(a->chars, need * sizeof(zahl_char_t));
if (!a->chars) {
if (!errno) /* sigh... */
errno = ENOMEM;
libzahl_failure(errno);
}
}
a->alloced = need;
}
| /* See LICENSE file for copyright and license details. */
#include "internals.h"
void
libzahl_realloc(z_t a, size_t need)
{
#if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */
volatile size_t j;
#else
# define j i
#endif
size_t i, x;
zahl_char_t *new;
/* Find n such that n is a minimal power of 2 ≥ need. */
if (likely((need & (~need + 1)) != need)) {
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
for (j = sizeof(need), x = 8; j; j >>= 1, x <<= 1)
need |= need >> x;
need += 1;
}
i = libzahl_msb_nz_zu(need);
if (likely(libzahl_pool_n[i])) {
libzahl_pool_n[i]--;
new = libzahl_pool[i][libzahl_pool_n[i]];
zmemcpy(new, a->chars, a->alloced);
zfree(a);
a->chars = new;
} else {
a->chars = realloc(a->chars, need * sizeof(zahl_char_t));
if (!a->chars) {
if (!errno) /* sigh... */
errno = ENOMEM;
libzahl_failure(errno);
}
}
a->alloced = need;
}
| ---
+++
@@ -5,11 +5,6 @@
void
libzahl_realloc(z_t a, size_t need)
{
-#if defined(__clang__) /* https://llvm.org/bugs/show_bug.cgi?id=26930 */
- volatile size_t j;
-#else
-# define j i
-#endif
size_t i, x;
zahl_char_t *new;
@@ -18,7 +13,7 @@
need |= need >> 1;
need |= need >> 2;
need |= need >> 4;
- for (j = sizeof(need), x = 8; j; j >>= 1, x <<= 1)
+ for (i = sizeof(need), x = 8; (i >>= 1); x <<= 1)
need |= need >> x;
need += 1;
} | Fix so that no workaround is required.
Thanks to Alexis Megas.
Signed-off-by: Mattias Andrée <[email protected]>
| isc | maandree/libzahl,maandree/libzahl,maandree/libzahl | e949bf64e01c9a2de41eb3a4479db0e58cd4caa6 |
#import <UIKit/UIKit.h>
@protocol NBNPhotoChooserViewControllerDelegate;
@interface NBNPhotoChooserViewController : UIViewController
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate;
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate
maxCellWidth:(CGFloat)maxCellWidth
cellSpacing:(CGFloat)cellSpacing;
@property (nonatomic) NSString *navigationBarTitle;
@property (nonatomic) NSString *cancelButtonTitle;
@property (nonatomic) BOOL shouldAnimateImagePickerTransition;
@end
@protocol NBNPhotoChooserViewControllerDelegate <NSObject>
- (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image;
@optional
- (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser;
@end
| #import <UIKit/UIKit.h>
@protocol NBNPhotoChooserViewControllerDelegate;
@interface NBNPhotoChooserViewController : UIViewController
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate;
- (instancetype)initWithDelegate:(id<NBNPhotoChooserViewControllerDelegate>)delegate
maxCellWidth:(CGFloat)maxCellWidth
cellSpacing:(CGFloat)cellSpacing;
@property (nonatomic) NSString *navigationBarTitle;
@property (nonatomic) NSString *cancelButtonTitle;
@property (nonatomic) BOOL shouldAnimateImagePickerTransition;
@end
@protocol NBNPhotoChooserViewControllerDelegate <NSObject>
- (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image;
- (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser;
@end
| ---
+++
@@ -18,6 +18,8 @@
@protocol NBNPhotoChooserViewControllerDelegate <NSObject>
- (void)photoChooserController:(NBNPhotoChooserViewController *)photoChooser didChooseImage:(UIImage *)image;
+
+@optional
- (void)photoChooserDidCancel:(NBNPhotoChooserViewController *)photoChooser;
@end | Make delegate method optional (cancellation is handled automatically when using UINavigationController)
| mit | nerdishbynature/NBNPhotoChooser,kimar/NBNPhotoChooser | 753ceda15f9730e7e0a660b1a0e9d387a3c1bf66 |
/*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
#include <plat/machine/hardware_gen.h>
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase)
#define BASE_OFFSET physMappingOffset
#define PPTR_TOP 0xfff00000
#define PADDR_TOP (PPTR_TOP - BASE_OFFSET)
#endif
| /*
* Copyright 2016, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase)
#define BASE_OFFSET physMappingOffset
#define PPTR_TOP 0xfff00000
#define PADDR_TOP (PPTR_TOP - BASE_OFFSET)
#endif
| ---
+++
@@ -11,6 +11,8 @@
#ifndef __PLAT_MACHINE_HARDWARE_H
#define __PLAT_MACHINE_HARDWARE_H
+#include <plat/machine/hardware_gen.h>
+
#define physBase 0x80000000
#define kernelBase 0xe0000000
#define physMappingOffset (kernelBase - physBase) | arm-hyp: Correct previous merge with master
| bsd-2-clause | cmr/seL4,cmr/seL4,cmr/seL4 | 1d777adbe4b7b314287a60b63e6f56212c8f286b |
#ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#ifdef DEBUG
#define TRACE ERROR
#else
#define TRACE(fmt,arg...) ((void) 0)
#endif
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \
exit(1); \
} while (0)
#endif
| #ifndef _TRACE_H_
#define _TRACE_H_
#include <stdio.h>
#include <errno.h>
#define TRACE ERROR
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg)
#define FATAL(fmt,arg...) do { \
ERROR(fmt, ##arg); \
exit(1); \
} while (0)
#endif
| ---
+++
@@ -3,7 +3,11 @@
#include <stdio.h>
#include <errno.h>
+#ifdef DEBUG
#define TRACE ERROR
+#else
+#define TRACE(fmt,arg...) ((void) 0)
+#endif
#define ERROR(fmt,arg...) \
fprintf(stderr, "%s: "fmt, program_invocation_short_name, ##arg) | Make TRACE depend on DEBUG.
| lgpl-2.1 | dimm0/tacc_stats,sdsc/xsede_stats,rtevans/tacc_stats_old,ubccr/tacc_stats,aaichsmn/tacc_stats,TACC/tacc_stats,dimm0/tacc_stats,rtevans/tacc_stats_old,sdsc/xsede_stats,TACC/tacc_stats,TACCProjects/tacc_stats,dimm0/tacc_stats,TACCProjects/tacc_stats,TACCProjects/tacc_stats,TACC/tacc_stats,aaichsmn/tacc_stats,ubccr/tacc_stats,aaichsmn/tacc_stats,ubccr/tacc_stats,TACC/tacc_stats,sdsc/xsede_stats,sdsc/xsede_stats,rtevans/tacc_stats_old,dimm0/tacc_stats,dimm0/tacc_stats,ubccr/tacc_stats,ubccr/tacc_stats,aaichsmn/tacc_stats,TACC/tacc_stats,TACCProjects/tacc_stats | 15378c98e1987964299a406232dc405a11c7a413 |
/**
* @copyright Copyright 2018 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @file JPetMCDecayTree.h
*/
#ifndef _JPETMCDECAYTREE_H_
#define _JPETMCDECAYTREE_H_
#include "./JPetHit/JPetHit.h"
/**
* @brief Data class representing a hit of a photon in the scintillator strip based on Monte Carlo simulation.
*
*/
class JPetMCDecayTree : public TObject {
public:
JPetMCDecayTree();
private:
UInt_t fMCMCDecayTreeIndex = 0u;
UInt_t fMCVtxIndex = 0u;
UInt_t fnVertices = 0u;
UInt_t fnTracks = 0u;
// add also track and vertices structures
ClassDef(JPetMCDecayTree, 1);
};
#endif
| /**
* @copyright Copyright 2018 The J-PET Framework Authors. All rights reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may find a copy of the License in the LICENCE file.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @file JPetMCDecayTree.h
*/
#ifndef _JPETMCHIT_H_
#define _JPETMCHIT_H_
#include "./JPetHit/JPetHit.h"
/**
* @brief Data class representing a hit of a photon in the scintillator strip based on Monte Carlo simulation.
*
*/
class JPetMCDecayTree : public TObject
{
public:
JPetMCDecayTree();
private:
UInt_t fMCMCDecayTreeIndex = 0u;
UInt_t fMCVtxIndex = 0u;
UInt_t fnVertices = 0u;
UInt_t fnTracks = 0u;
// add also track and vertices structures
ClassDef(JPetMCDecayTree, 1);
};
#endif
| ---
+++
@@ -13,8 +13,8 @@
* @file JPetMCDecayTree.h
*/
-#ifndef _JPETMCHIT_H_
-#define _JPETMCHIT_H_
+#ifndef _JPETMCDECAYTREE_H_
+#define _JPETMCDECAYTREE_H_
#include "./JPetHit/JPetHit.h"
@@ -22,20 +22,18 @@
* @brief Data class representing a hit of a photon in the scintillator strip based on Monte Carlo simulation.
*
*/
-class JPetMCDecayTree : public TObject
-{
+class JPetMCDecayTree : public TObject {
public:
JPetMCDecayTree();
private:
-
UInt_t fMCMCDecayTreeIndex = 0u;
UInt_t fMCVtxIndex = 0u;
UInt_t fnVertices = 0u;
UInt_t fnTracks = 0u;
- // add also track and vertices structures
+ // add also track and vertices structures
ClassDef(JPetMCDecayTree, 1);
}; | Change header guard name to do not colide with JPetMCHit
| apache-2.0 | JPETTomography/j-pet-framework,JPETTomography/j-pet-framework,JPETTomography/j-pet-framework | b60ffe69ae77c59e05f2f3985955b0034ba93b7a |
/* Manages interaction with the buttons */
#ifndef BUTTON_H
#define BUTTON_H
#include <Arduino.h>
const unsigned char BUTTON_NONE = 100;
bool button_isPressed(uint8_t buttonNumber);
void button_wait(uint8_t buttonNumber);
void button_ISR();
#endif
| /* Manages interaction with the buttons */
#ifndef BUTTON_H
#define BUTTON_H
const unsigned char BUTTON_NONE = 100;
bool button_isPressed(int buttonNumber);
void button_wait(int buttonNumber);
void button_ISR();
#endif
| ---
+++
@@ -2,10 +2,12 @@
#ifndef BUTTON_H
#define BUTTON_H
+#include <Arduino.h>
+
const unsigned char BUTTON_NONE = 100;
-bool button_isPressed(int buttonNumber);
-void button_wait(int buttonNumber);
+bool button_isPressed(uint8_t buttonNumber);
+void button_wait(uint8_t buttonNumber);
void button_ISR();
#endif | Fix header to be the same as cpp
| mit | SUPERETDUPER/bolt-arduino | 6a4888c54b31429442078f2bd804f0714b9e629d |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, arity).");
exit(1);
}
int alphabet[128] = {0};
int arity = atoi(argv[2]);
int treeLayers = ceil(7/log2(arity));
printf("Number of layers: %d \n", treeLayers);
//open file and get file length
FILE *file;
file = fopen(argv[1],"r");
if(file == NULL){
printf("File couldn't be opened.");
exit(1);
}
fseek(file, 0, SEEK_END);
int fileLength = ftell(file);
fseek(file, 0, SEEK_SET);
//save data from file to array
char inputStream[fileLength];
printf("length: %d \n", fileLength);
int i = 0;
int character;
int numOfChar = 0;
while((character = fgetc(file)) != EOF){
inputStream[i] = character;
if(alphabet[character]==0){
alphabet[character]=1;
numOfChar++;
}
i++;
}
char charOfAlphabet[numOfChar];
int j;
int k = 0;
for (j = 0; j < 128; j++){
if(alphabet[j]==1){
charOfAlphabet[k] = j;
k++;
}
}
//for(j=0; j < fileLength; j++){
// int a = inputStream[j];
//printf("Znak: %d \n", a);
//}
fclose(file);
}
| #include<stdio.h>
#include<stdlib.h>
int main (int argc, char *argv[]){
if(argc != 3){
printf("Number of parameters should be 2 (filename, cardinality).");
exit(1);
}
//open file and get file length
FILE *file;
file = fopen(argv[1],"r");
if(file == NULL){
printf("File couldn't be opened.");
exit(1);
}
fseek(file, 0, SEEK_END);
int fileLength = ftell(file);
fseek(file, 0, SEEK_SET);
//save data from file to array
char inputStream[fileLength];
//printf("length: %d \n", fileLength);
int i = 0;
int character;
while((character = fgetc(file)) != EOF){
inputStream[i] = character;
i++;
}
/*int j;
for(j=0; j < fileLength; j++){
char a = inputStream[j];
printf("Znak: %c \n", a);
}*/
fclose(file);
}
| ---
+++
@@ -1,11 +1,17 @@
#include<stdio.h>
#include<stdlib.h>
+#include<math.h>
int main (int argc, char *argv[]){
if(argc != 3){
- printf("Number of parameters should be 2 (filename, cardinality).");
+ printf("Number of parameters should be 2 (filename, arity).");
exit(1);
}
+
+ int alphabet[128] = {0};
+ int arity = atoi(argv[2]);
+ int treeLayers = ceil(7/log2(arity));
+ printf("Number of layers: %d \n", treeLayers);
//open file and get file length
FILE *file;
@@ -20,18 +26,32 @@
//save data from file to array
char inputStream[fileLength];
- //printf("length: %d \n", fileLength);
+ printf("length: %d \n", fileLength);
int i = 0;
int character;
+ int numOfChar = 0;
while((character = fgetc(file)) != EOF){
inputStream[i] = character;
+ if(alphabet[character]==0){
+ alphabet[character]=1;
+ numOfChar++;
+ }
i++;
}
- /*int j;
- for(j=0; j < fileLength; j++){
- char a = inputStream[j];
- printf("Znak: %c \n", a);
- }*/
+
+ char charOfAlphabet[numOfChar];
+ int j;
+ int k = 0;
+ for (j = 0; j < 128; j++){
+ if(alphabet[j]==1){
+ charOfAlphabet[k] = j;
+ k++;
+ }
+ }
+ //for(j=0; j < fileLength; j++){
+ // int a = inputStream[j];
+ //printf("Znak: %d \n", a);
+ //}
fclose(file);
} | Define alphabet and number of tree layers
| mit | marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree,marijanaSpajic/multiary_wavelet_tree | be6f28f28b57e912df6c276060bc38e7912a2262 |
#pragma once
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <ostream>
#include <random>
#include <set>
#include <stdexcept>
#include <string>
#include <vector>
| #pragma once
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/locale.hpp>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp>
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <ostream>
#include <random>
#include <set>
#include <stdexcept>
#include <string>
#include <vector>
| ---
+++
@@ -2,8 +2,6 @@
#include "dependencies/tinyformat/tinyformat.h"
#include <algorithm>
-#include <boost/algorithm/string/predicate.hpp>
-#include <boost/locale.hpp>
#include <cstdint>
#include <fstream>
#include <glm/glm.hpp> | Remove some rarely-used headers from library pch
| mit | FranciscoDA/OpenApoc,Istrebitel/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,FranciscoDA/OpenApoc,pmprog/OpenApoc | b36bf96bc95556d07cfa3c289beb51a998723d19 |
/* $OpenBSD: vmparam.h,v 1.4 2014/03/27 21:58:13 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 3 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| /* $OpenBSD: vmparam.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 2 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| ---
+++
@@ -1,9 +1,9 @@
-/* $OpenBSD: vmparam.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: vmparam.h,v 1.4 2014/03/27 21:58:13 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
-#define VM_PHYSSEG_MAX 2 /* Max number of physical memory segments */
+#define VM_PHYSSEG_MAX 3 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h> | Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memory
(such as 2E and 3A systems).
| isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars | 2c23625aeeb91c496f68abd812eab53b6d87bae5 |
/*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <folly/Range.h>
#include <chrono>
namespace facebook {
class SpinLock {
};
class SpinLockHolder {
public:
explicit SpinLockHolder(SpinLock*) {}
};
namespace stats {
enum ExportType {
SUM,
COUNT,
AVG,
RATE,
PERCENT,
NUM_TYPES,
};
struct ExportedStat {
void addValue(std::chrono::seconds, int64_t) {}
};
class ExportedStatMap {
public:
class LockAndStatItem {
public:
std::shared_ptr<SpinLock> first;
std::shared_ptr<ExportedStat> second;
};
LockAndStatItem getLockAndStatItem(folly::StringPiece,
const ExportType* = nullptr) {
static LockAndStatItem it = {
std::make_shared<SpinLock>(), std::make_shared<ExportedStat>()
};
return it;
}
std::shared_ptr<ExportedStat> getStatPtr(folly::StringPiece name) {
return std::make_shared<ExportedStat>();
}
};
}}
| /*
* Copyright (c) 2004-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once
#include <folly/Range.h>
#include <chrono>
namespace facebook {
class SpinLock {
};
class SpinLockHolder {
public:
explicit SpinLockHolder(SpinLock*) {}
};
namespace stats {
enum ExportType {
SUM,
COUNT,
AVG,
RATE,
PERCENT,
NUM_TYPES,
};
struct ExportedStat {
void addValue(std::chrono::seconds, int64_t) {}
};
class ExportedStatMap {
public:
class LockAndStatItem {
public:
std::shared_ptr<SpinLock> first;
std::shared_ptr<ExportedStat> second;
};
LockAndStatItem getLockAndStatItem(folly::StringPiece,
const ExportType* = nullptr) {
static LockAndStatItem it = {
std::make_shared<SpinLock>(), std::make_shared<ExportedStat>()
};
return it;
}
};
}}
| ---
+++
@@ -51,6 +51,10 @@
};
return it;
}
+
+ std::shared_ptr<ExportedStat> getStatPtr(folly::StringPiece name) {
+ return std::make_shared<ExportedStat>();
+ }
};
}} | Fix some build issues in the open source code.
Summary:
Our code grew some implicit transitive dependencies on
the headers that internal headers included, but our stubs
did not. This fixes that, and updates our stubs to match
what our code expects.
Test Plan: Apply to open source repository and test.
Reviewed By: [email protected]
Subscribers: fbcode-common-diffs@, net-systems@, yfeldblum
FB internal diff: D1982664
Signature: t1:1982664:1428695964:3fd76243d013ca4969c0dcd91f97e3292cf13c1f
Signed-off-by: Ori Bernstein <[email protected]>
| bsd-3-clause | sonoble/fboss,sonoble/fboss,neuhausler/fboss,raphaelamorim/fboss,peterlei/fboss,raphaelamorim/fboss,neuhausler/fboss,neuhausler/fboss,peterlei/fboss,peterlei/fboss,biddyweb/fboss,raphaelamorim/fboss,biddyweb/fboss,biddyweb/fboss,neuhausler/fboss,sonoble/fboss,peterlei/fboss | fd7f66f8c2d75858a2fd7ede056418d7be109792 |
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int dbl_cmp(double a, double b);
#endif
|
#ifndef TEST_HELPER_C
#define TEST_HELPER_C (1)
#include "MMDB.h"
#define MMDB_DEFAULT_DATABASE "/usr/local/share/GeoIP/GeoIP2-City.mmdb"
typedef union {
struct in_addr v4;
struct in6_addr v6;
} in_addrX;
char *get_test_db_fname(void);
void ip_to_num(MMDB_s * mmdb, char *ipstr, in_addrX * dest_ipnum);
int dbl_cmp(double a, double b);
#endif
| ---
+++
@@ -3,8 +3,6 @@
#define TEST_HELPER_C (1)
#include "MMDB.h"
-
-#define MMDB_DEFAULT_DATABASE "/usr/local/share/GeoIP/GeoIP2-City.mmdb"
typedef union {
struct in_addr v4; | Remove superfluous default db definition
| apache-2.0 | maxmind/libmaxminddb,maxmind/libmaxminddb,maxmind/libmaxminddb | a2fff26fae03cd46562d8d146dde1d6ebd7d9f8d |
#ifndef _GEN_H
#define _GEN_H
#define MAKEFILE "Makefile"
#define FS_NONE 0
#define FS_RECURSIVE (1 << 0)
#define FS_DEFAULT FS_RECURSIVE
#define FS_FOLLOWLINK (1 << 1)
#define FS_DOTFILES (1 << 2)
#define FS_MATCHDIRS (1 << 3)
#include <regex.h>
#include <unistd.h>
#include <sys/param.h>
#include <fstream>
class Generate
{
public:
char cwd[MAXPATHLEN];
char *currentDir = get_current_dir_name();
const char *defaultMakefile;
FILE *Makefile;
FILE *newConfig;
Generate();
~Generate();
char *DefineBaseDir();
void WriteMake();
void Walk();
void GenBlankConfig();
void CheckFiles();
int CheckConfigExists();
int CheckMake();
int GenMakeFromTemplate();
int WalkDir(const char *DirName, char *Pattern, int Spec);
int WalkRecur(const char *DirName, regex_t *Expr, int Spec);
};
#endif
| #ifndef _GEN_H
#define _GEN_H
#define MAKEFILE "Makefile"
#include <fstream>
#include <sys/param.h>
class Generate
{
public:
char cwd[MAXPATHLEN];
const char *defaultMakefile;
FILE *Makefile;
FILE *newConfig;
Generate();
~Generate();
char *DefineBaseDir();
void WriteMake();
void GenBlankConfig();
void CheckFiles();
void ListDir(const char *Path);
int CheckMake();
};
#endif
| ---
+++
@@ -1,14 +1,24 @@
#ifndef _GEN_H
#define _GEN_H
+
#define MAKEFILE "Makefile"
+#define FS_NONE 0
+#define FS_RECURSIVE (1 << 0)
+#define FS_DEFAULT FS_RECURSIVE
+#define FS_FOLLOWLINK (1 << 1)
+#define FS_DOTFILES (1 << 2)
+#define FS_MATCHDIRS (1 << 3)
+#include <regex.h>
+#include <unistd.h>
+#include <sys/param.h>
#include <fstream>
-#include <sys/param.h>
class Generate
{
public:
char cwd[MAXPATHLEN];
+ char *currentDir = get_current_dir_name();
const char *defaultMakefile;
FILE *Makefile;
FILE *newConfig;
@@ -17,9 +27,13 @@
~Generate();
char *DefineBaseDir();
void WriteMake();
+ void Walk();
void GenBlankConfig();
void CheckFiles();
- void ListDir(const char *Path);
+ int CheckConfigExists();
int CheckMake();
+ int GenMakeFromTemplate();
+ int WalkDir(const char *DirName, char *Pattern, int Spec);
+ int WalkRecur(const char *DirName, regex_t *Expr, int Spec);
};
#endif | Add FS defines, move includes, add member functions
- Defines define flags for WalkDir
- Fix includes order to that of:
C includes
C++ includes
Project includes
External library includes
Signed-off-by: Alberto Corona <[email protected]>
| bsd-3-clause | 0X1A/yabs,0X1A/yabs,0X1A/yabs,0X1A/yabs | f80e44e09a5669c6275880b8250346faca1c895a |
// PARAM: --enable ana.float.interval
#include <assert.h>
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
// similar error also occurred in the additional examples when branching on a float argument
int main()
{
double z;
int x;
z = 1 - 1.0;
assert(z == 0.); // SUCCESS
if (0.) { x = z;}
if (0 == (0. + 1.)) { x = z;}
assert(0); // FAIL
}
| // PARAM: --enable ana.float.interval
#include <assert.h>
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
// similar error also occured in the additional examples when branching on a float argument
int main()
{
double z;
z = 1 - 1.0;
assert(z == 0.); // SUCCESS
if (0.)
;
if (0 == (0. + 1.))
;
assert(0); // FAIL
}
| ---
+++
@@ -3,19 +3,19 @@
// previously failed in line 7 with "exception Invalid_argument("Cilfacade.get_ikind: non-integer type double ")"
//(same error as in sv-comp: float-newlib/float_req_bl_0220a.c)
-// similar error also occured in the additional examples when branching on a float argument
+// similar error also occurred in the additional examples when branching on a float argument
int main()
{
double z;
+ int x;
z = 1 - 1.0;
assert(z == 0.); // SUCCESS
- if (0.)
- ;
+ if (0.) { x = z;}
- if (0 == (0. + 1.))
- ;
+ if (0 == (0. + 1.)) { x = z;}
+
assert(0); // FAIL
} | Modify test 57/12 to actually trigger the issue
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | c6a31b64d9f980ef3e26bd26e4688788c80d310b |
/* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef WUUID_H__
#define WUUID_H__
#include "wombat/port.h"
typedef char* wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid);
COMMONExpDLL
void wUuid_unparse (wUuid myUuid, char* out);
#endif /* WUUID_H__ */
| /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef WUUID_H__
#define WUUID_H__
#include "wombat/port.h"
typedef int wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid);
COMMONExpDLL
void wUuid_unparse (wUuid myUuid, char* out);
#endif /* WUUID_H__ */
| ---
+++
@@ -23,7 +23,7 @@
#include "wombat/port.h"
-typedef int wUuid;
+typedef char* wUuid;
COMMONExpDLL
void wUuid_generate_time (wUuid myUuid); | Change uuid to char* from int for Windows
Signed-off-by: Mike Schonberg <[email protected]>
| lgpl-2.1 | MattMulhern/OpenMamaCassandra,jacobraj/MAMA,MattMulhern/OpenMamaCassandra,dmaguire/OpenMAMA,dpauls/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,jacobraj/MAMA,fquinner/OpenMAMA,jacobraj/MAMA,vulcanft/openmama,dmaguire/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMamaCassandra,dmagOM/OpenMAMA-dynamic,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMamaCassandra,fquinner/OpenMAMA,cloudsmith-io/openmama,dmaguire/OpenMAMA,fquinner/OpenMAMA,cloudsmith-io/openmama,MattMulhern/OpenMAMA,jacobraj/MAMA,fquinner/OpenMAMA,philippreston/OpenMAMA,philippreston/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,cloudsmith-io/openmama,kuangtu/OpenMAMA,kuangtu/OpenMAMA,cloudsmith-io/openmama,philippreston/OpenMAMA,dmagOM/OpenMAMA-dynamic,MattMulhern/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,fquinner/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,MattMulhern/OpenMamaCassandra,MattMulhern/OpenMAMA,philippreston/OpenMAMA,kuangtu/OpenMAMA,vulcanft/openmama,dpauls/OpenMAMA,philippreston/OpenMAMA,fquinner/OpenMAMA,jacobraj/MAMA,cloudsmith-io/openmama,cloudsmith-io/openmama,philippreston/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,MattMulhern/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,MattMulhern/OpenMamaCassandra,kuangtu/OpenMAMA,kuangtu/OpenMAMA,MattMulhern/OpenMAMA,dmaguire/OpenMAMA,kuangtu/OpenMAMA,dmagOM/OpenMAMA-dynamic,fquinner/OpenMAMA,dmagOM/OpenMAMA-dynamic,dpauls/OpenMAMA,dpauls/OpenMAMA,vulcanft/openmama,vulcanft/openmama,dmaguire/OpenMAMA | 72667ea922ed9b703b56a87cd71844b74801cd55 |
#include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx,"testmodule.simple",
HelloworldRand_RedisCommand,
"readonly",0,0,0) == REDISMODULE_ERR)
return REDISMODULE_ERR;
} | #include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx,"testmodule.simple",
HelloworldRand_RedisCommand,
"write deny-oom",1,2,1) == REDISMODULE_ERR)
return REDISMODULE_ERR;
} | ---
+++
@@ -6,12 +6,12 @@
return REDISMODULE_OK;
}
-int RedisModule_OnLoad(RedisModuleCtx *ctx) {
+int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx,"testmodule.simple",
HelloworldRand_RedisCommand,
- "write deny-oom",1,2,1) == REDISMODULE_ERR)
+ "readonly",0,0,0) == REDISMODULE_ERR)
return REDISMODULE_ERR;
} | Fix OnLoad signature and configure command parameters properly
| mit | RedisLabs/jedis,HeartSaVioR/jedis,yapei123/jedis,sazzad16/jedis,mosoft521/jedis,mosoft521/jedis,HeartSaVioR/jedis,smagellan/jedis,sazzad16/jedis,zts1993/jedis,yapei123/jedis,smagellan/jedis,xetorthio/jedis,xetorthio/jedis,zts1993/jedis,RedisLabs/jedis | a911ff6cc87fa430dac4cbe0017633796907b839 |
#ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
//#define NUMSTATES 3
namespace FSMEnvironment
{
#pragma region temp
enum Hint
{
NONE = 0,
EXAMPLE
};
struct State
{
int stateID = -1;
int timeDelay = -1;
Hint hint = Hint::NONE;
int CheckTransitions();
void Enter();
void Exit();
void Update(float deltaTime);
};
#pragma endregion
class LevelDirector
{
private: // Variables
State* m_currentState;
State* m_defaultState;
State* m_goalState; // A state which is the current goal for the FSM
int m_goalID;
std::vector<State> m_states;
public:
LevelDirector();
~LevelDirector();
int Shutdown();
int Initialize();
int Update(float deltaTime);
int React(int entityID, EVENT event);
private: // Helper functions
// TODO:
// Depending on what kind of array/vector we end up with to hold our states
// the argument list should be updated accordingly
void AddState(State* newState);
void SetDefaultState(State* state);
bool ChangeState(int state);
};
}
#endif | #ifndef SSPAPPLICATION_AI_LEVELDIRECTOR_H
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
class LevelDirector
{
private: // Variables
/* TEMP STATE STRUCTURE */
static enum State
{
NONE = 0,
START,
DEFAULT,
GOAL
};
State m_currentState;
State m_defaultState;
//State m_goalState;// A state which is the current goal for the FSM
// Change State to State* after temp structure is removed
std::vector<State> m_states;
public:
LevelDirector();
~LevelDirector();
int Shutdown();
int Initialize();
int Update(float deltaTime);
int React(int entityID, EVENT event);
private: // Helper functions
void AddState(State newState);
void SetDefaultState(State state);
bool ChangeState(State state);
};
#endif | ---
+++
@@ -2,38 +2,56 @@
#define SSPAPPLICATION_AI_LEVELDIRECTOR_H
#include "Observer.h"
#include <vector>
-class LevelDirector
+//#define NUMSTATES 3
+namespace FSMEnvironment
{
-private: // Variables
- /* TEMP STATE STRUCTURE */
- static enum State
+
+#pragma region temp
+ enum Hint
{
NONE = 0,
- START,
- DEFAULT,
- GOAL
+ EXAMPLE
};
- State m_currentState;
- State m_defaultState;
- //State m_goalState;// A state which is the current goal for the FSM
+ struct State
+ {
+ int stateID = -1;
+ int timeDelay = -1;
+ Hint hint = Hint::NONE;
- // Change State to State* after temp structure is removed
- std::vector<State> m_states;
-public:
- LevelDirector();
- ~LevelDirector();
- int Shutdown();
+ int CheckTransitions();
+ void Enter();
+ void Exit();
+ void Update(float deltaTime);
+ };
+#pragma endregion
- int Initialize();
- int Update(float deltaTime);
+ class LevelDirector
+ {
+ private: // Variables
+ State* m_currentState;
+ State* m_defaultState;
+ State* m_goalState; // A state which is the current goal for the FSM
+ int m_goalID;
+ std::vector<State> m_states;
+ public:
+ LevelDirector();
+ ~LevelDirector();
+ int Shutdown();
- int React(int entityID, EVENT event);
+ int Initialize();
+ int Update(float deltaTime);
+
+ int React(int entityID, EVENT event);
-private: // Helper functions
- void AddState(State newState);
- void SetDefaultState(State state);
- bool ChangeState(State state);
+ private: // Helper functions
+ // TODO:
+ // Depending on what kind of array/vector we end up with to hold our states
+ // the argument list should be updated accordingly
+ void AddState(State* newState);
+ void SetDefaultState(State* state);
+ bool ChangeState(int state);
-};
+ };
+}
#endif | FIX cleaned up header file to resemble FSM environment
| apache-2.0 | Chringo/SSP,Chringo/SSP | 11f88734c26a6b477c9715720aac5af8b455a605 |
#ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
// #define HAL_RTC_MODULE_ENABLED
// #define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| #ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
| ---
+++
@@ -2,9 +2,9 @@
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
-#define HAL_SPI_MODULE_ENABLED
+// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
-#define HAL_RTC_MODULE_ENABLED
-#define HAL_TIMER_MODULE_ENABLED
+// #define HAL_RTC_MODULE_ENABLED
+// #define HAL_TIMER_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__ | nrf5/boards: Disable SPI/Timer/RTC hal from microbit board.
| mit | tralamazza/micropython,tralamazza/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython | ec44f6427bce56ef92dff2ef208f41686c69be0e |
//
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)fetch:(CDVInvokedUrlCommand*)command;
@end
| //
// AppPreferences.h
//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
@interface AppSettings : CDVPlugin
- (void)get:(CDVInvokedUrlCommand*)command;
@end
| ---
+++
@@ -1,13 +1,13 @@
//
// AppPreferences.h
-//
+//
//
#import <Cordova/CDV.h>
#import <Cordova/CDVViewController.h>
-@interface AppSettings : CDVPlugin
+@interface AppSettings : CDVPlugin
-- (void)get:(CDVInvokedUrlCommand*)command;
+- (void)fetch:(CDVInvokedUrlCommand*)command;
@end | Update method from get to fetch
| apache-2.0 | greg-laughlin-hs/app-settings-reader,greg-laughlin-hs/app-settings-reader | 24746780a3c46b0607edcf65fcdbb2e61b3058fd |
// Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
namespace rocksdb {
// The helper function to assert the move from dynamic_cast<> to
// static_cast<> is correct. This function is to deal with legacy code.
// It is not recommanded to add new code to issue class casting. The preferred
// solution is to implement the functionality without a need of casting.
template <class DestClass, class SrcClass>
inline DestClass* static_cast_with_check(SrcClass* x) {
DestClass* ret = static_cast<DestClass*>(x);
#ifdef ROCKSDB_USE_RTTI
assert(ret == dynamic_cast<DestClass*>(x));
#endif
return ret;
}
} // namespace rocksdb
| // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
namespace rocksdb {
// The helper function to assert the move from dynamic_cast<> to
// static_cast<> is correct. This function is to deal with legacy code.
// It is not recommanded to add new code to issue class casting. The preferred
// solution is to implement the functionality without a need of casting.
template <class DestClass, class SrcClass>
inline DestClass* static_cast_with_check(SrcClass* x) {
DestClass* ret = static_cast<DestClass*>(x);
#ifdef ROCKSDB_USE_RTTI
assert(ret == dynamic_cast<DestClass*>(x));
#endif
return ret;
}
} // namespace rocksdb
| ---
+++
@@ -2,6 +2,8 @@
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
+
+#pragma once
namespace rocksdb {
// The helper function to assert the move from dynamic_cast<> to | Add a missing "once" in .h
Summary: Closes https://github.com/facebook/rocksdb/pull/2670
Differential Revision: D5529018
Pulled By: siying
fbshipit-source-id: 10a378933d509035d2dbe502247dd85fcea09789
| bsd-3-clause | Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,bbiao/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,SunguckLee/RocksDB,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,Andymic/rocksdb,bbiao/rocksdb,SunguckLee/RocksDB,bbiao/rocksdb,SunguckLee/RocksDB,Andymic/rocksdb,Andymic/rocksdb,Andymic/rocksdb,Andymic/rocksdb,SunguckLee/RocksDB | a84cee8127a0e9724b26e7d1d527f220c358c328 |
static struct hep_ctx ctx = {
.initfails = 0,
.hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
.capt_id = 101,
.hep_version = 3,
.usessl = 0,
.pl_compress = 0,
.sendPacketsCount = 0
};
| static struct hep_ctx ctx = {
.initfails = 0,
.hints = {{ 0 }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
.hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_id = 101,
.hep_version = 3,
.usessl = 0,
.pl_compress = 0,
.sendPacketsCount = 0
};
| ---
+++
@@ -1,9 +1,8 @@
static struct hep_ctx ctx = {
.initfails = 0,
- .hints = {{ 0 }},
+ .hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_host = "10.0.0.1",
.capt_port = "9060",
- .hints = {{ .ai_socktype = SOCK_DGRAM }},
.capt_id = 101,
.hep_version = 3,
.usessl = 0, | Move .hints definition in place.
| bsd-2-clause | dsanders11/rtpproxy,dsanders11/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy | 01913372e8b7a8314cba41c329464bc3d355b477 |
/*
* Copyright 2008 Michael Ellerman, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/kernel.h>
#include <asm/code-patching.h>
void patch_instruction(unsigned int *addr, unsigned int instr)
{
*addr = instr;
asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr));
}
void patch_branch(unsigned int *addr, unsigned long target, int flags)
{
patch_instruction(addr, create_branch(addr, target, flags));
}
unsigned int create_branch(const unsigned int *addr,
unsigned long target, int flags)
{
unsigned int instruction;
long offset;
offset = target;
if (! (flags & BRANCH_ABSOLUTE))
offset = offset - (unsigned long)addr;
/* Check we can represent the target in the instruction format */
if (offset < -0x2000000 || offset > 0x1fffffc || offset & 0x3)
return 0;
/* Mask out the flags and target, so they don't step on each other. */
instruction = 0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC);
return instruction;
}
| /*
* Copyright 2008 Michael Ellerman, IBM Corporation.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/kernel.h>
#include <asm/code-patching.h>
void patch_instruction(unsigned int *addr, unsigned int instr)
{
*addr = instr;
asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr));
}
void patch_branch(unsigned int *addr, unsigned long target, int flags)
{
patch_instruction(addr, create_branch(addr, target, flags));
}
unsigned int create_branch(const unsigned int *addr,
unsigned long target, int flags)
{
unsigned int instruction;
if (! (flags & BRANCH_ABSOLUTE))
target = target - (unsigned long)addr;
/* Mask out the flags and target, so they don't step on each other. */
instruction = 0x48000000 | (flags & 0x3) | (target & 0x03FFFFFC);
return instruction;
}
| ---
+++
@@ -26,12 +26,18 @@
unsigned long target, int flags)
{
unsigned int instruction;
+ long offset;
+ offset = target;
if (! (flags & BRANCH_ABSOLUTE))
- target = target - (unsigned long)addr;
+ offset = offset - (unsigned long)addr;
+
+ /* Check we can represent the target in the instruction format */
+ if (offset < -0x2000000 || offset > 0x1fffffc || offset & 0x3)
+ return 0;
/* Mask out the flags and target, so they don't step on each other. */
- instruction = 0x48000000 | (flags & 0x3) | (target & 0x03FFFFFC);
+ instruction = 0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC);
return instruction;
} | powerpc: Make create_branch() return errors if the branch target is too large
If you pass a target value to create_branch() which is more than 32MB - 4,
or - 32MB away from the branch site, then it's impossible to create an
immediate branch. The current code doesn't check, which will lead to us
creating a branch to somewhere else - which is bad.
For code that cares to check we return 0, which is easy to check for, and
for code that doesn't at least we'll be creating an illegal instruction,
rather than a branch to some random address.
Signed-off-by: Michael Ellerman <[email protected]>
Acked-by: Kumar Gala <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
| mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs | 053a858efa46c9ab86363b271374ec02ad2af753 |
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_SUPPORT_LEGACY_GETBLENDMODE
#define SK_SUPPORT_LEGACY_SETFILTERQUALITY
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| ---
+++
@@ -29,6 +29,8 @@
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
+ #define SK_SUPPORT_LEGACY_GETBLENDMODE
+ #define SK_SUPPORT_LEGACY_SETFILTERQUALITY
#define SK_DISABLE_DAA // skbug.com/6886
| Add flags to stage Skia API changes
Test: make
Bug: 178700363
Change-Id: I5d214f8fd69f7419f8b98f61a6e2f26f08587ff7
| bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia | 098c879ed8c055047261c5cce0567b81fecbf197 |
#pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
struct Noncopyable {
Noncopyable& operator=(const Noncopyable&) = delete;
Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
};
| #pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
struct Noncopyable {
Noncopyable &operator=(const Noncopyable &) = delete;
Noncopyable(const Noncopyable &) = delete;
Noncopyable() = default;
};
| ---
+++
@@ -21,7 +21,7 @@
};
struct Noncopyable {
- Noncopyable &operator=(const Noncopyable &) = delete;
- Noncopyable(const Noncopyable &) = delete;
+ Noncopyable& operator=(const Noncopyable&) = delete;
+ Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
}; | Align & and * to the left always
| bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator | 5d70a9c23b0d34ea511b8e1705e2c9a8d6d0a435 |
#include <stdio.h>
#include <ugens.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
missing gen, either by using die() or supplying a default
and alerting the user with advise().
*/
float *floc(int genno)
{
int index;
if (genno < 0)
return NULL;
index = f_goto[genno];
if (sizeof_farray[index] == 0)
return NULL;
return farrays[index];
}
| #include "../H/ugens.h"
#include <stdio.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
missing gen, either by using die() or supplying a default
and alerting the user with advise().
*/
float *floc(int genno)
{
int index = f_goto[genno];
if (sizeof_farray[index] == 0)
return NULL;
return farrays[index];
}
| ---
+++
@@ -1,5 +1,5 @@
-#include "../H/ugens.h"
#include <stdio.h>
+#include <ugens.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
@@ -15,9 +15,15 @@
*/
float *floc(int genno)
{
- int index = f_goto[genno];
+ int index;
+
+ if (genno < 0)
+ return NULL;
+
+ index = f_goto[genno];
if (sizeof_farray[index] == 0)
return NULL;
+
return farrays[index];
}
| Make sure gen loc is in range.
| apache-2.0 | RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix | 3709f2b154a5db0500892c1d720280d54981135a |
//
// Copyright (c) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <Foundation/Foundation.h>
#import <GData/GData.h>
#import "GPSyncProtocol.h"
// Source for documents, spreadsheets, presentations, and PDFs in Google Docs.
// Note: PDFs currently won't have content data.
@interface GPDocsSync : NSObject <GPSyncSource> {
id<GPSyncManager> manager_; // weak reference
GDataServiceGoogleDocs* docService_;
GDataServiceGoogleSpreadsheet* spreadsheetService_;
NSMutableArray* docsToInflate_;
}
@end
| //
// Copyright (c) 2008 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <Foundation/Foundation.h>
#import <GData/GData.h>
#import "GPSyncProtocol.h"
// Source for documents, spreadsheets, and presentations in Google Docs.
// Note: presentations currently won't have content data.
@interface GPDocsSync : NSObject <GPSyncSource> {
id<GPSyncManager> manager_; // weak reference
GDataServiceGoogleDocs* docService_;
GDataServiceGoogleSpreadsheet* spreadsheetService_;
NSMutableArray* docsToInflate_;
}
@end
| ---
+++
@@ -19,8 +19,8 @@
#import "GPSyncProtocol.h"
-// Source for documents, spreadsheets, and presentations in Google Docs.
-// Note: presentations currently won't have content data.
+// Source for documents, spreadsheets, presentations, and PDFs in Google Docs.
+// Note: PDFs currently won't have content data.
@interface GPDocsSync : NSObject <GPSyncSource> {
id<GPSyncManager> manager_; // weak reference
GDataServiceGoogleDocs* docService_; | Update header comment to reflect the current state of the source.
git-svn-id: c46e06cb57945f24bc44ee3ee8f795d5b6e634f5@64 c4e13eb7-e550-0410-89ee-d7df1d48aa01
| apache-2.0 | nagyistoce/precipitate,ericmckean/precipitate | e09a55881f98ea0796fe591e6e3f9b8ea0c791ac |
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
raw.c_cc[VMIN] = 0;
raw.c_cc[VTIME] = 1;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enable_raw_mode();
while (1) {
char c = '\0';
read(STDIN_FILENO, &c, 1);
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
if (c == 'q') {
break;
}
}
return 0;
}
| #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enable_raw_mode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') {
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
}
return 0;
}
| ---
+++
@@ -19,6 +19,8 @@
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
+ raw.c_cc[VMIN] = 0;
+ raw.c_cc[VTIME] = 1;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
@@ -26,13 +28,17 @@
int main() {
enable_raw_mode();
- char c;
- while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') {
+ while (1) {
+ char c = '\0';
+ read(STDIN_FILENO, &c, 1);
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
+ if (c == 'q') {
+ break;
+ }
}
return 0;
} | Add a timeout for read()
Set VMIN to 0 so read() returns as soon as there is any input to be
read.
Set VTIME to 1 so the wait time of read() is 100 milliseconds.
| bsd-2-clause | oldsharp/kilo,oldsharp/kilo | 44bd63e4db6ac33a03b14da1a2b6e932f2947a35 |
/// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT
public:
/// @brief Constructor.
///
/// @param parent Parent widget.
explicit SpeciesDialog(QWidget *parent = 0);
/// @brief Returns a Species object corresponding to the dialog values.
///
/// @return Species object corresponding to the dialog values.
Species getSpecies();
private slots:
/// @brief Calls inherited accept function.
void on_ok_clicked();
/// @brief Calls inherited reject function.
void on_cancel_clicked();
/// @brief Removes currently selected subspecies.
void on_removeSubspecies_clicked();
/// @brief Adds a new subspecies.
void on_addSubspecies_clicked();
private:
/// @brief Widget loaded from ui file.
std::unique_ptr<Ui::SpeciesDialog> ui_;
};
} // namespace fish_detector
#endif // SPECIES_DIALOG_H
| /// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT
#ifndef NO_TESTING
friend class TestSpeciesDialog;
#endif
public:
/// @brief Constructor.
///
/// @param parent Parent widget.
explicit SpeciesDialog(QWidget *parent = 0);
/// @brief Returns a Species object corresponding to the dialog values.
///
/// @return Species object corresponding to the dialog values.
Species getSpecies();
private slots:
/// @brief Emits the accepted signal.
void on_ok_clicked();
/// @brief Emits the rejected signal.
void on_cancel_clicked();
/// @brief Removes currently selected subspecies.
void on_removeSubspecies_clicked();
/// @brief Adds a new subspecies.
void on_addSubspecies_clicked();
private:
/// @brief Widget loaded from ui file.
std::unique_ptr<Ui::SpeciesDialog> ui_;
};
} // namespace fish_detector
#endif // SPECIES_DIALOG_H
| ---
+++
@@ -19,9 +19,6 @@
class SpeciesDialog : public QDialog {
Q_OBJECT
-#ifndef NO_TESTING
- friend class TestSpeciesDialog;
-#endif
public:
/// @brief Constructor.
///
@@ -34,10 +31,10 @@
Species getSpecies();
private slots:
- /// @brief Emits the accepted signal.
+ /// @brief Calls inherited accept function.
void on_ok_clicked();
- /// @brief Emits the rejected signal.
+ /// @brief Calls inherited reject function.
void on_cancel_clicked();
/// @brief Removes currently selected subspecies. | Remove unused friend class declaration
| mit | BGWoodward/FishDetector | 7b91a38d79ab14ea212a91a69a19b31111d1ba91 |
#ifndef BLUETOOTH_CONF_H__
#define BLUETOOTH_CONF_H__
// SD specific configurations.
#if (BLUETOOTH_SD == 110)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
#elif (BLUETOOTH_SD == 132)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
#define MICROPY_PY_UBLUEPY_CENTRAL (1)
#else
#error "SD not supported"
#endif
// Default defines.
#ifndef MICROPY_PY_BLE
#define MICROPY_PY_BLE (0)
#endif
#ifndef MICROPY_PY_BLE_NUS
#define MICROPY_PY_BLE_NUS (0)
#endif
#endif
| #ifndef BLUETOOTH_CONF_H__
#define BLUETOOTH_CONF_H__
// SD specific configurations.
#if (BLUETOOTH_SD == 110)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
#elif (BLUETOOTH_SD == 132)
#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (0)
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
#define MICROPY_PY_UBLUEPY_CENTRAL (0)
#else
#error "SD not supported"
#endif
// Default defines.
#ifndef MICROPY_PY_BLE
#define MICROPY_PY_BLE (0)
#endif
#ifndef MICROPY_PY_BLE_NUS
#define MICROPY_PY_BLE_NUS (0)
#endif
#endif
| ---
+++
@@ -18,7 +18,7 @@
#define BLUETOOTH_WEBBLUETOOTH_REPL (0)
#define MICROPY_PY_UBLUEPY (1)
#define MICROPY_PY_UBLUEPY_PERIPHERAL (1)
-#define MICROPY_PY_UBLUEPY_CENTRAL (0)
+#define MICROPY_PY_UBLUEPY_CENTRAL (1)
#else
#error "SD not supported" | nrf5/drivers/bluetooth: Enable ubluepy central by default if running nrf52/s132 bluetooth stack. Maturity of the module is pretty OK now.
| mit | adafruit/circuitpython,adafruit/micropython,adafruit/micropython,tralamazza/micropython,adafruit/circuitpython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,tralamazza/micropython,adafruit/circuitpython | cb9ed6bb55a5020770ad31fd30a05b4a91b70a81 |
#ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef bool boolean;
typedef iostream Stream;
#endif
| #ifndef _ARDUINO_COMPAT_H
#define _ARDUINO_COMPAT_H
#include <stdio.h>
#include <stdlib.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#include <string.h>
#include <iostream>
using namespace std;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned long uint32_t;
typedef bool boolean;
typedef iostream Stream;
#endif
| ---
+++
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
//#include <sys/types.h>
//#include <sys/stat.h>
#include <fcntl.h>
@@ -14,9 +15,6 @@
#include <iostream>
using namespace std;
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
typedef bool boolean;
typedef iostream Stream;
| Use stdint.h for unsigned integer typedefs
Fixes problem compiling regression tests on 64 bit OS.
| lgpl-2.1 | stevemarple/MicroNMEA,stevemarple/MicroNMEA | 5e9d8dbf60e137345a988b2e3ed1281dae9d4014 |
//
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CONFIG_RGB_565
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
static inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
static inline uint32_t get_depth_for_config(int32_t config) {
switch (config) {
case IMAGE_CONFIG_RGB_565:
return 2;
case IMAGE_CONFIG_RGBA_8888:
return 4;
default:
return 0;
}
}
#endif //IMAGE_IMAGE_DECODER_H
| //
// Created by Hippo on 9/13/2016.
//
#ifndef IMAGE_IMAGE_DECODER_H
#define IMAGE_IMAGE_DECODER_H
#include "com_hippo_image_BitmapDecoder.h"
#define IMAGE_CONFIG_INVALID -1;
#define IMAGE_CONFIG_AUTO com_hippo_image_BitmapDecoder_CONFIG_AUTO
#define IMAGE_CONFIG_RGB_565 com_hippo_image_BitmapDecoder_CONFIG_RGB_565
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
inline uint32_t get_depth_for_config(int32_t config) {
switch (config) {
case IMAGE_CONFIG_RGB_565:
return 2;
case IMAGE_CONFIG_RGBA_8888:
return 4;
default:
return 0;
}
}
#endif //IMAGE_IMAGE_DECODER_H
| ---
+++
@@ -15,12 +15,12 @@
#define IMAGE_CONFIG_RGBA_8888 com_hippo_image_BitmapDecoder_CONFIG_RGBA_8888
-inline bool is_explicit_config(int32_t config) {
+static inline bool is_explicit_config(int32_t config) {
return config == IMAGE_CONFIG_RGB_565 || config == IMAGE_CONFIG_RGBA_8888;
}
-inline uint32_t get_depth_for_config(int32_t config) {
+static inline uint32_t get_depth_for_config(int32_t config) {
switch (config) {
case IMAGE_CONFIG_RGB_565:
return 2; | Fix undefined references in linker
| apache-2.0 | seven332/Image,seven332/Image,seven332/Image | 8de958ec707f8e8115881ad595ed4d872bc91641 |
//
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
Class *classes = NULL;
classes = (__unsafe_unretained Class *)malloc(sizeof(Class) * numClasses);
numClasses = objc_getClassList(classes, numClasses);
NSMutableArray *result = [NSMutableArray array];
for (NSInteger i = 0; i < numClasses; i++) {
Class superClass = classes[i];
do {
superClass = class_getSuperclass(superClass);
} while (superClass && superClass != parentClass);
if (superClass == nil) {
continue;
}
[result addObject:classes[i]];
}
free(classes);
return result;
}
| //
// class_getSubclasses.h
// iActiveRecord
//
// Created by Alex Denisov on 21.03.12.
// Copyright (c) 2012 okolodev.org. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
Class classes[sizeof(Class) * numClasses];
numClasses = objc_getClassList(classes, numClasses);
NSMutableArray *result = [NSMutableArray array];
for (NSInteger i = 0; i < numClasses; i++) {
Class superClass = classes[i];
do {
superClass = class_getSuperclass(superClass);
} while (superClass && superClass != parentClass);
if (superClass == nil) {
continue;
}
[result addObject:classes[i]];
}
return result;
}
| ---
+++
@@ -11,7 +11,8 @@
static NSArray *class_getSubclasses(Class parentClass) {
int numClasses = objc_getClassList(NULL, 0);
- Class classes[sizeof(Class) * numClasses];
+ Class *classes = NULL;
+ classes = (__unsafe_unretained Class *)malloc(sizeof(Class) * numClasses);
numClasses = objc_getClassList(classes, numClasses);
NSMutableArray *result = [NSMutableArray array];
for (NSInteger i = 0; i < numClasses; i++) {
@@ -25,5 +26,6 @@
}
[result addObject:classes[i]];
}
+ free(classes);
return result;
} | Fix for crashes in iOS 10 | mit | AlexDenisov/iActiveRecord,3dcl/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord,AlexDenisov/iActiveRecord,3dcl/iActiveRecord | 3218e01b76602eaa399a7e43caa219d7330855d7 |
//
// Created by Dawid Drozd aka Gelldur on 03.02.16.
//
#pragma once
#include <android/log.h>
#ifndef NDEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__)
#define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__)
#define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__)
#define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__)
#else
#define DLOG(...)
#define ILOG(...)
#define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__)
#define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__)
#define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__)
#endif
| //
// Created by Dawid Drozd aka Gelldur on 03.02.16.
//
#pragma once
#include <android/log.h>
#ifdef DEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__)
#define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__)
#define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__)
#define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__)
#else
#define DLOG(...)
#define ILOG(...)
#define WLOG(...) __android_log_print(ANDROID_LOG_WARN,"JNI",__VA_ARGS__)
#define ELOG(...) __android_log_print(ANDROID_LOG_ERROR,"JNI",__VA_ARGS__)
#define FLOG(...) __android_log_print(ANDROID_LOG_FATAL,"JNI",__VA_ARGS__)
#endif
| ---
+++
@@ -6,7 +6,7 @@
#include <android/log.h>
-#ifdef DEBUG
+#ifndef NDEBUG
#define DLOG(...) __android_log_print(ANDROID_LOG_DEBUG,"JNI",__VA_ARGS__)
#define ILOG(...) __android_log_print(ANDROID_LOG_INFO,"JNI",__VA_ARGS__) | Fix compile for debug on Android
| apache-2.0 | gelldur/DexodeEngine,gelldur/DexodeEngine,gelldur/DexodeEngine | 4941fe015c2804a36b820818f4e8f68f867ed5b4 |
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
| // Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
#define CEF_LIBCEF_DLL_CEF_MACROS_H_
#pragma once
#ifdef BUILDING_CEF_SHARED
#include "base/macros.h"
#else // !BUILDING_CEF_SHARED
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
| ---
+++
@@ -19,24 +19,3 @@
#endif // !BUILDING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_
-// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
-// reserved. Use of this source code is governed by a BSD-style license that
-// can be found in the LICENSE file.
-
-#ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_
-#define CEF_LIBCEF_DLL_CEF_MACROS_H_
-#pragma once
-
-#ifdef BUILDING_CEF_SHARED
-#include "base/macros.h"
-#else // !BUILDING_CEF_SHARED
-
-// A macro to disallow the copy constructor and operator= functions
-// This should be used in the private: declarations for a class
-#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
- TypeName(const TypeName&); \
- void operator=(const TypeName&)
-
-#endif // !BUILDING_CEF_SHARED
-
-#endif // CEF_LIBCEF_DLL_CEF_MACROS_H_ | Remove duplicate content in file.
git-svn-id: 66addb63d0c46e75f185859367c4faf62af16cdd@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
| bsd-3-clause | kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded,kuscsik/chromiumembedded | f24e70fa3a204565a656594b48ac84c390aa1e8f |
//
// TMCacheBackgroundTaskManager.h
// TMCache
//
// Created by Bryan Irace on 4/24/15.
// Copyright (c) 2015 Tumblr. All rights reserved.
//
@import UIKit;
#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
typedef NSUInteger UIBackgroundTaskIdentifier;
#endif
/**
A protocol that classes who can begin and end background tasks can conform to. This protocol provides an abstraction in
order to avoid referencing `+ [UIApplication sharedApplication]` from within an iOS application extension.
*/
@protocol TMCacheBackgroundTaskManager <NSObject>
/**
Marks the beginning of a new long-running background task.
@return A unique identifier for the new background task. You must pass this value to the `endBackgroundTask:` method to
mark the end of this task. This method returns `UIBackgroundTaskInvalid` if running in the background is not possible.
*/
- (UIBackgroundTaskIdentifier)beginBackgroundTask;
/**
Marks the end of a specific long-running background task.
@param identifier An identifier returned by the `beginBackgroundTaskWithExpirationHandler:` method.
*/
- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
@end
| //
// TMCacheBackgroundTaskManager.h
// TMCache
//
// Created by Bryan Irace on 4/24/15.
// Copyright (c) 2015 Tumblr. All rights reserved.
//
@import UIKit;
/**
A protocol that classes who can begin and end background tasks can conform to. This protocol provides an abstraction in
order to avoid referencing `+ [UIApplication sharedApplication]` from within an iOS application extension.
*/
@protocol TMCacheBackgroundTaskManager <NSObject>
/**
Marks the beginning of a new long-running background task.
@return A unique identifier for the new background task. You must pass this value to the `endBackgroundTask:` method to
mark the end of this task. This method returns `UIBackgroundTaskInvalid` if running in the background is not possible.
*/
- (UIBackgroundTaskIdentifier)beginBackgroundTask;
/**
Marks the end of a specific long-running background task.
@param identifier An identifier returned by the `beginBackgroundTaskWithExpirationHandler:` method.
*/
- (void)endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
@end
| ---
+++
@@ -7,6 +7,10 @@
//
@import UIKit;
+
+#ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
+typedef NSUInteger UIBackgroundTaskIdentifier;
+#endif
/**
A protocol that classes who can begin and end background tasks can conform to. This protocol provides an abstraction in | Define UIBackgroundTaskIdentifier if on OS X
| apache-2.0 | paulkite/TMCache,paulkite/TMCache | 0f427d7730b007e8740fff16d9a7b0dc5ebb692a |