Dataset Viewer
Auto-converted to Parquet Duplicate
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
/**************************************************\ * A port of LuRsT's hr to C * * Sam Stuewe (C) 2014 Licensed under the terms of * * the GNU Public License version 2 * \**************************************************/ // Libraries // #include <stdio.h> #include <string.h>...
/**************************************************\ * A port of LuRsT's hr to C * * Sam Stuewe (C) 2014 Licensed under the terms of * * the GNU Public License version 2 * \**************************************************/ // Libraries // #include <stdio.h> #include <string.h>...
--- +++ @@ -10,16 +10,12 @@ #include <sys/ioctl.h> // Main Function // -int main (int argc, char * * argv) { +int +main (int argc, char * argv []) { + struct winsize w; ioctl(0, TIOCGWINSZ, &w); - int COLS; - - if ( w.ws_col <= 0 ) { - COLS = 80; - } else { - COLS = w.ws_col; - ...
Update for style and simplicity
unlicense
HalosGhost/.dotfiles,HalosGhost/.dotfiles
a804609334035658ed74f5e0664dd4c380e68955
// // PHCredentials.h // PerchRTC // // Created by Sam Symons on 2015-05-08. // Copyright (c) 2015 Perch Communications. All rights reserved. // #ifndef PerchRTC_PHCredentials_h #define PerchRTC_PHCredentials_h #error Please enter your XirSys credentials (http://xirsys.com/pricing/) static NSString *kPHConnectio...
// // PHCredentials.h // PerchRTC // // Created by Sam Symons on 2015-05-08. // Copyright (c) 2015 Perch Communications. All rights reserved. // #ifndef PerchRTC_PHCredentials_h #define PerchRTC_PHCredentials_h #error Please enter your XirSys credentials (http://xirsys.com/pricing/) static NSString *kPHConnectio...
--- +++ @@ -12,14 +12,14 @@ #error Please enter your XirSys credentials (http://xirsys.com/pricing/) static NSString *kPHConnectionManagerDomain = @""; -static NSString *kPHConnectionManagerApplication = @""; +static NSString *kPHConnectionManagerApplication = @"default"; static NSString *kPHConnectionManagerXSU...
Use the XirSys defaults for room and application.
mit
imton/perchrtc,duk42111/perchrtc,duk42111/perchrtc,perchco/perchrtc,imton/perchrtc,perchco/perchrtc,ikonst/perchrtc,ikonst/perchrtc,duk42111/perchrtc,ikonst/perchrtc,ikonst/perchrtc,perchco/perchrtc,duk42111/perchrtc,imton/perchrtc
d51affbc2c78f4370fd73ba3d83b8f129289c9e8
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void *); void ListNode_Destroy(ListNode* n); ListNode* List_Search(List* l, void* k, int (f)...
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); ListNode* ListNode_Create(void *); void ListNode_Destroy(ListNode* n); ListNode* List_Search(List* l, void* k, int f(v...
--- +++ @@ -10,6 +10,7 @@ void List_Destroy(List* l); ListNode* ListNode_Create(void *); void ListNode_Destroy(ListNode* n); -ListNode* List_Search(List* l, void* k, int f(void*, void*)); +ListNode* List_Search(List* l, void* k, int (f)(void*, void*)); + #endif
Fix missing parenthesis around f as parameter
mit
MaxLikelihood/CADT
b1167684c00877fac8bb3ebe120f088ff99daa57
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_VALIDATION_H ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2015 The Bitcoin Core developers // Copyright (c) 2014-2017 The Dash Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_VALIDATION_H ...
--- +++ @@ -10,7 +10,7 @@ #include <stdint.h> #include <string> -static const int64_t DEFAULT_MAX_TIP_AGE = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin +static const int64_t DEFAULT_MAX_TIP_AGE = 1 * 60 * 60; // ~45 blocks behind -> 2 x fork detection time, was 24 * ...
Adjust default max tip age
mit
neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron
b858676194b9e384789bc9d506136c37e5da015a
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath...
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath...
--- +++ @@ -19,6 +19,12 @@ struct Vertex { DirectX::XMFLOAT3 pos; DirectX::XMFLOAT4 color; +}; + +struct MatrixBufferType { + DirectX::XMMATRIX world; + DirectX::XMMATRIX view; + DirectX::XMMATRIX projection; }; class GraphicsManager : public Common::GraphicsManagerBase {
CRATE_DEMO: Create MatrixBufferType struct to hold current world, view, and projection matricies
apache-2.0
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
4e874c8a3ec1d524e5ab0df04994fb25243e9c72
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. // constexpr might help avoid that, but then it breaks my fragile upgrade-needed // detection code, so this should be ...
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. constexpr float kCurrentVersion = 1.55f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // ...
--- +++ @@ -3,7 +3,9 @@ // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. -constexpr float kCurrentVersion = 1.55f; +// constexpr might help avoid that, but then it breaks my fragile ...
Revert constexpr so that upgrade detection works
apache-2.0
google/UIforETW,google/UIforETW,google/UIforETW,google/UIforETW
d1320f5b3bf39c62adf5280161335d58e22e1ea9
// // NSString+urlencode.h // Respoke SDK // // Copyright 2015, Digium, Inc. // All rights reserved. // // This source code is licensed under The MIT License found in the // LICENSE file in the root directory of this source tree. // // For all details and documentation: https://www.respoke.io // #import <Found...
// // NSString+urlencode.h // Respoke SDK // // Copyright 2015, Digium, Inc. // All rights reserved. // // This source code is licensed under The MIT License found in the // LICENSE file in the root directory of this source tree. // // For all details and documentation: https://www.respoke.io // #import <Found...
--- +++ @@ -16,7 +16,8 @@ @interface NSString (NSString_Extended) /** - * Url-encodes a string, suitable for placing into a url as a portion of the query string + * Url-encodes a string, suitable for placing into a url as a portion of the query string. + * Source taken from http://stackoverflow.com/a/8088484/...
Add comment about source of urlencode category
mit
respoke/respoke-sdk-ios,respoke/respoke-sdk-ios,respoke/respoke-sdk-ios
ee62a25839ebf871fe04d3edb190b6ec3d535fe0
#include "../common.c" #define DICTI_OA_PROBING(s) 1 #include "m-dict.h" static inline bool oor_equal_p(unsigned int k, unsigned char n) { return k == (unsigned int)n; } static inline void oor_set(unsigned int *k, unsigned char n) { *k = (unsigned int)n; } DICT_OA_DEF2(dict_oa_uint, unsigned int, M_OPEXTEND...
#include "../common.c" #include "m-dict.h" static inline bool oor_equal_p(unsigned int k, unsigned char n) { return k == (unsigned int)n; } static inline void oor_set(unsigned int *k, unsigned char n) { *k = (unsigned int)n; } DICT_OA_DEF2(dict_oa_uint, unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, OOR_EQUAL(o...
--- +++ @@ -1,4 +1,5 @@ #include "../common.c" +#define DICTI_OA_PROBING(s) 1 #include "m-dict.h" static inline bool oor_equal_p(unsigned int k, unsigned char n) @@ -11,7 +12,7 @@ } DICT_OA_DEF2(dict_oa_uint, - unsigned int, M_OPEXTEND(M_DEFAULT_OPLIST, OOR_EQUAL(oor_equal_p), OOR_SET(oor_set M_IPTR)), ...
Use of linear probing and the same hash function as other libraries
bsd-2-clause
P-p-H-d/mlib,P-p-H-d/mlib
ca7cea3fe392766a1252c86274554950384663e4
/* $FreeBSD$ */ /* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */ /* * Written by J.T. Conklin, Apr 28, 1995 * Public domain. */ #ifndef _ALPHA_IEEEFP_H_ #define _ALPHA_IEEEFP_H_ typedef int fp_except_t; #define FP_X_INV (1LL << 1) /* invalid operation exception */ #define FP_X_DZ (1LL << 2) /* div...
/* $FreeBSD$ */ /* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */ /* * Written by J.T. Conklin, Apr 28, 1995 * Public domain. */ #ifndef _ALPHA_IEEEFP_H_ #define _ALPHA_IEEEFP_H_ typedef int fp_except; #define FP_X_INV (1LL << 1) /* invalid operation exception */ #define FP_X_DZ (1LL << 2) /* divid...
--- +++ @@ -9,7 +9,7 @@ #ifndef _ALPHA_IEEEFP_H_ #define _ALPHA_IEEEFP_H_ -typedef int fp_except; +typedef int fp_except_t; #define FP_X_INV (1LL << 1) /* invalid operation exception */ #define FP_X_DZ (1LL << 2) /* divide-by-zero exception */ #define FP_X_OFL (1LL << 3) /* overflow exception */
Change floating point exception type to match the i386 one. Submitted by: Mark Abene <phiber@radicalmedia.com>
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
db44ba375371f40754feca8fa14a009d49333c03
#ifndef ONEDMASSFLUX_H #define ONEDMASSFLUX_H #include "Kernel.h" class OneDMassFlux; template<> InputParameters validParams<OneDMassFlux>(); /** * Mass flux */ class OneDMassFlux : public Kernel { public: OneDMassFlux(const InputParameters & parameters); virtual ~OneDMassFlux(); protected: virtual Real co...
#ifndef ONEDMASSFLUX_H #define ONEDMASSFLUX_H #include "Kernel.h" class OneDMassFlux; template<> InputParameters validParams<OneDMassFlux>(); /** * Mass flux */ class OneDMassFlux : public Kernel { public: OneDMassFlux(const InputParameters & parameters); virtual ~OneDMassFlux(); protected: virtual Real co...
--- +++ @@ -22,7 +22,7 @@ virtual Real computeQpJacobian(); virtual Real computeQpOffDiagJacobian(unsigned int jvar); - VariableValue & _rhouA; + const VariableValue & _rhouA; unsigned int _rhouA_var_number; };
Prepare RELAP-7 for MooseVariable::sln() const update. This set of changes prepares RELAP-7 to work with an upcoming version of MOOSE in which MooseVariable::sln() returns a const reference. Refs idaholab/moose#6327.
lgpl-2.1
andrsd/moose,bwspenc/moose,andrsd/moose,laagesen/moose,jessecarterMOOSE/moose,laagesen/moose,milljm/moose,lindsayad/moose,idaholab/moose,harterj/moose,idaholab/moose,idaholab/moose,andrsd/moose,jessecarterMOOSE/moose,sapitts/moose,laagesen/moose,sapitts/moose,bwspenc/moose,harterj/moose,milljm/moose,bwspenc/moose,andrs...
3e4d6584a8634c839a083b5cd8c51f54dc33112f
#pragma once #include <functional> #include "halley/maths/vector2.h" #include "halley/core/input/input_device.h" #include "halley/maths/colour.h" #include "halley/data_structures/maybe.h" namespace Halley { class InputJoystick; class InputTouch; class InputControllerData { public: Colour colour; String name;...
#pragma once #include <functional> #include "halley/maths/vector2.h" #include "halley/core/input/input_device.h" namespace Halley { class InputJoystick; class InputTouch; class InputAPI { public: virtual ~InputAPI() {} virtual size_t getNumberOfKeyboards() const = 0; virtual std::shared_ptr<InputDevice...
--- +++ @@ -3,11 +3,19 @@ #include <functional> #include "halley/maths/vector2.h" #include "halley/core/input/input_device.h" +#include "halley/maths/colour.h" +#include "halley/data_structures/maybe.h" namespace Halley { class InputJoystick; class InputTouch; + + class InputControllerData { + public: + C...
Support for additional data to be passed for controller support (implemented on consoles).
apache-2.0
amzeratul/halley,amzeratul/halley,amzeratul/halley
90c74ab32dc8a19f979975b9910c1810032f1ba9
/* enums.h * Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. * Overview: * enums shared by much of the stack-handling code * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_ENUMS_H_GUARD) #define PARROT_ENUMS_H_GUARD typedef enum { NO_STAC...
#if !defined(PARROT_ENUMS_H_GUARD) #define PARROT_ENUMS_H_GUARD typedef enum { NO_STACK_ENTRY_TYPE = 0, STACK_ENTRY_INT = 1, STACK_ENTRY_FLOAT = 2, STACK_ENTRY_STRING = 3, STACK_ENTRY_PMC = 4, STACK_ENTRY_POINTER = 5, STACK_ENTRY_DESTINATION = 6 } Stack_en...
--- +++ @@ -1,3 +1,13 @@ +/* enums.h + * Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. + * Overview: + * enums shared by much of the stack-handling code + * Data Structure and Algorithms: + * History: + * Notes: + * References: + */ + #if !defined(PARROT_ENUMS_H_GUARD) #define PARROT_EN...
Add header and footer comments git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@3957 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
artistic-2.0
gitster/parrot,parrot/parrot,fernandobrito/parrot,fernandobrito/parrot,tewk/parrot-select,gagern/parrot,fernandobrito/parrot,youprofit/parrot,parrot/parrot,gagern/parrot,FROGGS/parrot,tkob/parrot,fernandobrito/parrot,gitster/parrot,FROGGS/parrot,tkob/parrot,FROGGS/parrot,FROGGS/parrot,tkob/parrot,gitster/parrot,tewk/pa...
c1d5b503174f1c6a72b1e72326fea1f930dca112
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include <string.h> #include "../src/rootdb.h" int main(void) { MDB_env *env; MDB_dbi dbi; int status; status = rootdb_open(&env, &dbi, "./testingdb"); assert(status == 0); char key_char[] = "hello"; char value_char[] = "world"; MDB_val key; ...
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include "../src/rootdb.h" int main(void) { MDB_env *env; MDB_dbi dbi; int status; status = rootdb_open(&env, &dbi, "./testingdb"); assert(status == 0); char key_char[] = "hello"; char value_char[] = "world"; MDB_val key; MDB_val value; ...
--- +++ @@ -1,6 +1,7 @@ #include <stdlib.h> #include <stdio.h> #include <assert.h> +#include <string.h> #include "../src/rootdb.h" int main(void) @@ -22,10 +23,6 @@ value.mv_size = sizeof(value_char); value.mv_data = value_char; - printf("key: %p %.*s, data: %p %.*s\n", - key.mv_data, (int) key.mv_s...
Add assertion for value in get/put test
mit
braydonf/rootdb,braydonf/rootdb,braydonf/rootdb
afca1b7a6a332d667bf9f92a0402a51af1a51ff6
#ifndef __TOURH__ #define __TOURH__ #include <stdio.h> #include <stdlib.h> typedef int* tour; typedef int city; //inicializa um tour tour create_tour(int ncities); //popula um tour pre-definido com cidades void populate_tour(tour t, int ncities); //retorna true se a distancia total do //tour t for menor que dist i...
#ifndef __TOURH__ #define __TOURH__ #include <stdio.h> #include <stdlib.h> #define tour int* #define city int //initializes a new tour tour create_tour(int ncities); //returns true if the tour t is shorter than //a distance indicated by dist int is_shtr(tour t, int dist); //defines the starter point of a tour voi...
--- +++ @@ -4,20 +4,23 @@ #include <stdio.h> #include <stdlib.h> -#define tour int* -#define city int +typedef int* tour; +typedef int city; -//initializes a new tour +//inicializa um tour tour create_tour(int ncities); -//returns true if the tour t is shorter than -//a distance indicated by dist -int is_sh...
Change type creation from define to typedef.
apache-2.0
frila/caixeiro
06be45bd2a250ccba120c46c673b7e4a5242947e
#ifndef __PROCEDURALMAZE_H__ #define __PROCEDURALMAZE_H__ #include "maze.h" #include <map> class ProceduralMaze { private: int width; int height; std::map<std::tuple<int, int>, int> grid; void clearGrid(); std::vector<std::tuple<int, int>> getAdjCells(std::tuple<int, int> center, Tile tile_state); publi...
#ifndef __PROCEDURALMAZE_H__ #define __PROCEDURALMAZE_H__ #include "maze.h" #include <map> class ProceduralMaze { private: int width; int height; public: std::map<std::tuple<int, int>, int> grid; ProceduralMaze(int width, int height); void generate(); void clearGrid(); std::vector<std::tuple<int, in...
--- +++ @@ -9,14 +9,17 @@ private: int width; int height; + std::map<std::tuple<int, int>, int> grid; + + void clearGrid(); + std::vector<std::tuple<int, int>> getAdjCells(std::tuple<int, int> center, Tile tile_state); public: - std::map<std::tuple<int, int>, int> grid; ProceduralMaze(int width, in...
Move some ProceduralMaze public methods to private
mit
gfceccon/Maze,gfceccon/Maze
1d62dd3d309d009ffa3f9a71cf141ab7689e1138
/* * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <stdint.h> #include <lib/utils.h> #include <lib/utils_def.h> #include "rpi3_private.h" /* Get 128 bits of entropy and fuse the values together to form the canary. */ #define TRN...
/* * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <stdint.h> #include <lib/utils.h> #include "rpi3_private.h" /* Get 128 bits of entropy and fuse the values together to form the canary. */ #define TRNG_NBYTES 16U u_register_t ...
--- +++ @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,7 @@ #include <stdint.h> #include <lib/utils.h> +#include <lib/u...
rpi3: Fix compilation error when stack protector is enabled Include necessary header file to use ARRAY_SIZE() macro Change-Id: I5b7caccd02c14c598b7944cf4f347606c1e7a8e7 Signed-off-by: Madhukar Pappireddy <c854e377c0ff08e0fa4357b6357bedff114c98a6@arm.com>
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
f6de960fb76ab36550a119b1465e8a24e59af219
/* ===-- limits.h - stub SDK header for compiler-rt -------------------------=== * * The LLVM Compiler Infrastructure * * This file is dual licensed under the MIT and the University of Illinois Open * Source Licenses. See LICENSE.TXT for details. * * ===---------------------------------------...
/* ===-- limits.h - stub SDK header for compiler-rt -------------------------=== * * The LLVM Compiler Infrastructure * * This file is dual licensed under the MIT and the University of Illinois Open * Source Licenses. See LICENSE.TXT for details. * * ===---------------------------------------...
--- +++ @@ -20,7 +20,7 @@ typedef __SIZE_TYPE__ size_t; #define PROT_READ 0x1 -#define PROT_WRITE 0x1 +#define PROT_WRITE 0x2 #define PROT_EXEC 0x4 extern int mprotect (void *__addr, size_t __len, int __prot)
SDK/linux: Fix braindead pasto, caught by Matt Beaumont-Gay. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@146188 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
2a1aad729e09761ce45b9b283e2fb65da191d38c
#ifndef CPR_BODY_H #define CPR_BODY_H #include <cstring> #include <initializer_list> #include <string> #include "defines.h" namespace cpr { class Body : public std::string { public: Body() = default; Body(const Body& rhs) = default; Body(Body&& rhs) = default; Body& operator=(const Body& rhs) = d...
#ifndef CPR_BODY_H #define CPR_BODY_H #include <string> #include "defines.h" namespace cpr { class Body : public std::string { public: Body() = default; Body(const Body& rhs) = default; Body(Body&& rhs) = default; Body& operator=(const Body& rhs) = default; Body& operator=(Body&& rhs) = defaul...
--- +++ @@ -1,6 +1,9 @@ #ifndef CPR_BODY_H #define CPR_BODY_H +#include <cstring> + +#include <initializer_list> #include <string> #include "defines.h"
Add specific headers for used symbols in Body
mit
whoshuu/cpr,SuperV1234/cpr,whoshuu/cpr,msuvajac/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr
ed56e96ebeffec4ee264c707ddacc3ac3b3bb2fd
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/m...
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights // reserved. Use of this source code is governed by a BSD-style license that // can be found in the LICENSE file. #ifndef CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/m...
--- +++ @@ -19,24 +19,3 @@ #endif // !BUILDING_CEF_SHARED #endif // CEF_LIBCEF_DLL_CEF_MACROS_H_ -// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights -// reserved. Use of this source code is governed by a BSD-style license that -// can be found in the LICENSE file. - -#ifndef CEF_LIBCEF_DL...
Remove duplicate content in file. git-svn-id: 07c9500005b9a5ecd02aa6a59d3db90a097b7e72@1734 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
bsd-3-clause
zmike/cef-rebase,zmike/cef-rebase,zmike/cef-rebase,bkeiren/cef,bkeiren/cef,bkeiren/cef,bkeiren/cef,zmike/cef-rebase,bkeiren/cef,zmike/cef-rebase
f6819004e0e04193dfab17b636f266a0f36c2e17
#pragma once // assume that visuals and code are the same here.... // and also assuming our screen is square :) #define VISUALS_WIDTH 504 #define VISUALS_HEIGHT 504 #define CODE_WIDTH VISUALS_WIDTH #define CODE_HEIGHT VISUALS_HEIGHT #define CODE_X_POS 520 // via the tech staff //if this is defined, we will w...
#pragma once // assume that visuals and code are the same here.... // and also assuming our screen is square :) #define VISUALS_WIDTH 504 #define VISUALS_HEIGHT 504 #define CODE_WIDTH VISUALS_WIDTH #define CODE_HEIGHT VISUALS_HEIGHT #define CODE_X_POS 520 // via the tech staff //if this is defined, we will w...
--- +++ @@ -13,7 +13,7 @@ #define CODE_X_POS 520 // via the tech staff //if this is defined, we will wait for type animation -#define TYPE_ANIMATION +//#define TYPE_ANIMATION #define USE_MIDI_PARAM_SYNC
Revert accidental uncommenting of TYPE_ANIMATION
mit
sh0w/recoded,sh0w/recoded,sh0w/recoded,ofZach/dayForNightSFPC,sh0w/recoded,ofZach/dayForNightSFPC,ofZach/dayForNightSFPC,ofZach/dayForNightSFPC
ddfac6ad96a03c3c6a5a638c4bf50ac00af8a58f
static inline uint32_t hash_func_string(const char* key) { uint32_t hash = 0; uint32_t c; while ((c = (uint32_t)*key++) != 0) hash = c + (hash << 6u) + (hash << 16u) - hash; return hash; }
static inline uint32_t hash_func_string(const char* key) { uint32_t hash = 0; int c; while ((c = *key++) != 0) hash = c + (hash << 6) + (hash << 16) - hash; return hash; }
--- +++ @@ -1,9 +1,9 @@ static inline uint32_t hash_func_string(const char* key) { uint32_t hash = 0; - int c; - while ((c = *key++) != 0) - hash = c + (hash << 6) + (hash << 16) - hash; + uint32_t c; + while ((c = (uint32_t)*key++) != 0) + hash = c + (hash << 6u) + (hash << 16u) - hash; return hash; }
Correct signedness to prevent some warnings.
mit
gatzka/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet
e15920730f75a94866f7cdc955e442aec0b722d4
/* * Copyright (c) 2006 KATO Kazuyoshi <kzys@8-p.info> * This source code is released under the MIT license. */ #import <Cocoa/Cocoa.h> @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end
#import <Cocoa/Cocoa.h> @interface WildcardPattern : NSObject { NSString* pattern_; } - (id) initWithString: (NSString*) s; - (BOOL) isMatch: (NSString*) s; @end
--- +++ @@ -1,5 +1,9 @@ +/* + * Copyright (c) 2006 KATO Kazuyoshi <kzys@8-p.info> + * This source code is released under the MIT license. + */ + #import <Cocoa/Cocoa.h> - @interface WildcardPattern : NSObject { NSString* pattern_;
Add copyright and license header.
mit
kzys/greasekit,sohocoke/greasekit,chrismessina/greasekit,tbodt/greasekit
cdd545fda02f9cc72a309c473a32377b70f66946
#ifndef STINGRAYKIT_METAPROGRAMMING_TYPECOMPLETENESS_H #define STINGRAYKIT_METAPROGRAMMING_TYPECOMPLETENESS_H // Copyright (c) 2011 - 2017, GS Group, https://github.com/GSGroup // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, // provided that th...
#ifndef STINGRAYKIT_METAPROGRAMMING_TYPECOMPLETENESS_H #define STINGRAYKIT_METAPROGRAMMING_TYPECOMPLETENESS_H // Copyright (c) 2011 - 2017, GS Group, https://github.com/GSGroup // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, // provided that th...
--- +++ @@ -12,7 +12,9 @@ namespace stingray { - template < typename T > struct StaticAssertCompleteType : CompileTimeAssert<sizeof(T)> { typedef T ValueT; }; + + template < typename T > struct StaticAssertCompleteType : CompileTimeAssert<sizeof(T) == sizeof(T)> { typedef T ValueT; }; + } #endif
Fix compile ui.shell, fckng non-standard behaviour Revert "metaprogramming: Get rid of excess check in IsComplete" This reverts commit dc328c6712e9d23b3a58f7dd14dbdfa8e5a196db.
isc
GSGroup/stingraykit,GSGroup/stingraykit
c30f78e6593470906a3773d21ab2f265f1f95ddc
/* * Written by J.T. Conklin, Apr 6, 1995 * Public domain. * $FreeBSD$ */ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ #include <machine/fsr.h> typedef int fp_except_t; #define FP_X_IMP FSR_NX /* imprecise (loss of precision) */ #define FP_X_DZ FSR_DZ /* divide-by-zero exception */ #define FP_X_UFL FSR...
/* * Written by J.T. Conklin, Apr 6, 1995 * Public domain. * $FreeBSD$ */ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ typedef int fp_except_t; #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ #define FP_X_DZ 0x02 /* divide-by-zero exception */ #define FP_X_UFL 0x04 /* underflow exception */ #d...
--- +++ @@ -7,18 +7,20 @@ #ifndef _MACHINE_IEEEFP_H_ #define _MACHINE_IEEEFP_H_ +#include <machine/fsr.h> + typedef int fp_except_t; -#define FP_X_IMP 0x01 /* imprecise (loss of precision) */ -#define FP_X_DZ 0x02 /* divide-by-zero exception */ -#define FP_X_UFL 0x04 /* underflow exception */ -#define FP_X_OFL ...
Use the definitions in machine/fsr.h instead of duplicating these magic numbers here (the values need to correspond to the %fsr ones for some libc functions to work right).
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
69c3f107e2c8a2eef56249a87c8e192d8f6abe5c
#ifndef GRIDCELL_H #define GRIDCELL_H #include <gsl/gsl_rng.h> /* DATA STRUCTURES */ #define GC_NUM_STATES 4 typedef enum { DECIDUOUS,CONIFEROUS,TRANSITIONAL,MIXED} State; typedef double StateData [GC_NUM_STATES]; typedef enum { MOORE, VONNE} NeighType; typedef struct { double meanTemp; /*Task: list al...
#ifndef GRIDCELL_H #define GRIDCELL_H #include <gsl/gsl_rng.h> /* DATA STRUCTURES */ #define GC_NUM_STATES 4 typedef enum { DECIDUOUS,CONIFEROUS,TRANSITIONAL,MIXED} State; typedef double StateData [GC_NUM_STATES]; typedef enum { MOORE, VONNE} NeighType; extern State GC_POSSIBLE_STATES [GC_NUM_STATES]; // this...
--- +++ @@ -10,10 +10,8 @@ #define GC_NUM_STATES 4 typedef enum { DECIDUOUS,CONIFEROUS,TRANSITIONAL,MIXED} State; typedef double StateData [GC_NUM_STATES]; - typedef enum { MOORE, VONNE} NeighType; -extern State GC_POSSIBLE_STATES [GC_NUM_STATES]; // this is an array giving all possible states typedef struc...
Delete unused extern variable declared
mit
QUICC-FOR/STModel-Simulation,QUICC-FOR/STModel-Simulation
afd6a6dcac92c604ff97892e3c95f845dd479bc5
/** * Servo "mock" class. Ideally our ServoMotor class would be using composition * to become an (Arduino) Servo motor. However, we want to make usage easier and * transparent to the user, so we are extending the Arduino Servo class. * The inheritance instead of composition makes things a little bit trickier * to ...
/** * Servo "mock" class. Ideally our ServoMotor class would be using composition * to become an (Arduino) Servo motor. However, we want to make usage easier and * transparent to the user, so we are extending the Arduino Servo class. * The inheritance instead of composition makes things a little bit trickier * to ...
--- +++ @@ -26,19 +26,11 @@ public: void attach(uint8_t pin, int maxPulseLength, int minPulseLength) { - if (!mMockServo) - { - throw std::logic_error("No mockServo attached! Please set the mMockServo with a MockServo shared pointer."); - } mMockServo->attach(pin, m...
Remove unecessary checks from mock class
mit
platisd/smartcar_shield,platisd/smartcar_shield
63bd713f7609ffb72b8592b772ef525224e6ffdf
#ifndef EIGEN_HELPER_H #define EIGEN_HELPER_H #include "ros/ros.h" #include <Eigen/Dense> template<typename Derived> inline bool isFucked(const Eigen::MatrixBase<Derived>& x) { return !((x.array() == x.array())).all() && !( (x - x).array() == (x - x).array()).all(); } inline Eigen::MatrixXd getMatrixParam(ros::Nod...
#ifndef EIGEN_HELPER_H #define EIGEN_HELPER_H #include <Eigen/Dense> template<typename Derived> inline bool isFucked(const Eigen::MatrixBase<Derived>& x) { return !((x.array() == x.array())).all() && !( (x - x).array() == (x - x).array()).all(); } #endif
--- +++ @@ -1,6 +1,7 @@ #ifndef EIGEN_HELPER_H #define EIGEN_HELPER_H +#include "ros/ros.h" #include <Eigen/Dense> template<typename Derived> @@ -9,4 +10,46 @@ return !((x.array() == x.array())).all() && !( (x - x).array() == (x - x).array()).all(); } +inline Eigen::MatrixXd getMatrixParam(ros::NodeHand...
Move more stuff to eigen helper header
mit
vortexntnu/rov-control,vortexntnu/rov-control,vortexntnu/rov-control
74ce9a97e81b913f26f0353dc0d3e988af99cb5c
#include <stdio.h> #include "forsyth.h" #include "check.h" int main(int argc, char* argv[]) { FILE * stream; int FEN_status; if (argc < 2) FEN_status = load_FEN( "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ); else FEN_status = load_FEN(argv[1]); #if...
#include <stdio.h> #include "forsyth.h" int main(int argc, char* argv[]) { FILE * stream; int FEN_status; if (argc < 2) FEN_status = load_FEN( "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" ); else FEN_status = load_FEN(argv[1]); #if defined(TEST_MATE_I...
--- +++ @@ -1,5 +1,7 @@ #include <stdio.h> #include "forsyth.h" + +#include "check.h" int main(int argc, char* argv[]) { @@ -33,5 +35,10 @@ stream = (argc < 3) ? stdout : fopen(argv[2], "w"); load_Forsyth(stream); fclose(stream); + + if (in_check(WHITE)) + puts("White is in check."); + ...
Debug check analysis for both sides.
cc0-1.0
cxd4/chess,cxd4/chess,cxd4/chess
9ba4f34f11902e16fb17ec08f66a1c9f27817359
#ifndef VAST_QUERY_SEARCH_H #define VAST_QUERY_SEARCH_H #include <unordered_map> #include <cppa/cppa.hpp> #include <ze/event.h> #include <vast/query/query.h> namespace vast { namespace query { class search : public cppa::sb_actor<search> { friend class cppa::sb_actor<search>; public: search(cppa::actor_ptr arch...
#ifndef VAST_QUERY_SEARCH_H #define VAST_QUERY_SEARCH_H #include <unordered_map> #include <cppa/cppa.hpp> #include <ze/event.h> #include <vast/query/query.h> namespace vast { namespace query { class search : public cppa::sb_actor<search> { friend class cppa::sb_actor<search>; public: search(cppa::actor_ptr arch...
--- +++ @@ -18,7 +18,7 @@ private: std::vector<cppa::actor_ptr> queries_; - std::multimap<cppa::actor_ptr, cppa::actor_ptr> clients_; + std::unordered_multimap<cppa::actor_ptr, cppa::actor_ptr> clients_; cppa::actor_ptr archive_; cppa::actor_ptr index_; cppa::behavior init_state;
Use an unordered map to track clients.
bsd-3-clause
pmos69/vast,mavam/vast,vast-io/vast,vast-io/vast,pmos69/vast,pmos69/vast,mavam/vast,vast-io/vast,mavam/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast
db3de3779b73a2919c193fa3bd85d1295a0e54ef
#include "mbb/test.h" #include "mbb/queue.h" #include "mbb/debug.h" char *test_enqueue_dequeue() { int i; MQUE_DEFINE_STRUCT(int, 5) queue; MQUE_INITIALISE(&queue); MUNT_ASSERT(MQUE_IS_EMPTY(&queue)); for (i = 1; i <= 5; i++) { MUNT_ASSERT(!MQUE_IS_FULL(&queue)); MQUE_ENQUEUE(&queue, i); } for (i = 1; ...
#include "mbb/test.h" #include "mbb/queue.h" #include "mbb/debug.h" char *test_enqueue_dequeue() { int i; MQUE_DEFINE_STRUCT(int, 5) queue; MQUE_INITIALISE(&queue); MUNT_ASSERT(MQUE_IS_EMPTY(&queue)); for (i = 1; i <= 5; i++) { MUNT_ASSERT(!MQUE_IS_FULL(&queue)); MQUE_ENQUEUE(&queue, i); } for (i = 1; ...
--- +++ @@ -24,6 +24,8 @@ head = MQUE_HEAD(&queue); MQUE_DEQUEUE(&queue);; + + MUNT_ASSERT(head == i); } MUNT_ASSERT(MQUE_IS_EMPTY(&queue));
Check enqueued values in unit test
mit
jawebada/libmbb,jawebada/libmbb,jawebada/libmbb,jawebada/libmbb
5b6bfd2202b9ad7a3eafd0585ce5c37dd6f5d91f
// // process.h // Project3 // // Created by Stratton Aguilar on 7/3/14. // Copyright (c) 2014 Stratton Aguilar. All rights reserved. // #ifndef Project3_process_h #define Project3_process_h typedef struct { int processNum; int arrivalTime; int lifeTime; int memReq; int time_left; int is_...
// // process.h // Project3 // // Created by Stratton Aguilar on 7/3/14. // Copyright (c) 2014 Stratton Aguilar. All rights reserved. // #ifndef Project3_process_h #define Project3_process_h typedef struct { int processNum; int arrivalTime; int lifeTime; int memReq; } PROCESS; #endif
--- +++ @@ -14,5 +14,8 @@ int arrivalTime; int lifeTime; int memReq; + + int time_left; + int is_active; } PROCESS; #endif
Add time_left and is_active to the proc struct
mit
ciarand/operating-systems-memory-management-assignment
bafe09faaffee154ccc9225bacb526517e555882
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.53f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // incr...
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.52f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // incr...
--- +++ @@ -3,7 +3,7 @@ // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. -const float kCurrentVersion = 1.52f; +const float kCurrentVersion = 1.53f; // Put a "#define VERSION_SUFF...
Increase version number to 1.53
apache-2.0
google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW
e6420a303bfdeeba04ec7b00367ef4474e96e5a3
#ifndef SRC_FORCES_LABEL_STATE_H_ #define SRC_FORCES_LABEL_STATE_H_ #include <Eigen/Core> #include <string> namespace Forces { /** * \brief * * */ class LabelState { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW LabelState(int id, std::string text, Eigen::Vector3f anchorPosition); const int id; const Eigen:...
#ifndef SRC_FORCES_LABEL_STATE_H_ #define SRC_FORCES_LABEL_STATE_H_ #include <Eigen/Core> #include <string> namespace Forces { /** * \brief * * */ class LabelState { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW LabelState(int id, std::string text, Eigen::Vector3f anchorPosition); const int id; const Eigen:...
--- +++ @@ -26,9 +26,8 @@ Eigen::Vector2f anchorPosition2D; Eigen::Vector2f labelPosition2D; float labelPositionDepth; - private: - std::string text; + const std::string text; }; } // namespace Forces
Make text in LabelState public.
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
159caac86902add83f4ff3a2d813559144806f98
/* * A simple Brainfuck interpreter. * * This file was written by Damien Dart, <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <errno.h> #include <stdint.h> #include <stdio.h> #...
/* * A simple Brainfuck interpreter. * * This file was written by Damien Dart, <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <errno.h> #include <stdint.h> #include <stdio.h> #...
--- +++ @@ -14,28 +14,31 @@ #include "brainfuck.h" +void *realloc2(void *, size_t); + int main(void) { char character = 0; char *commands = NULL; uint32_t number_of_commands = 0; while((character = getchar()) != EOF) { - if ((character == '>') || (character == '<') || (character == '+') || - ...
Handle instances when "realloc()" fails.
unlicense
damiendart/brainfuck
53cd39088decb09998153455d9b00938115a322e
#include <stdio.h> int main() { /* hi this is a multi-line comment hi. */ // single-line comment printf ("Hello world!\n"); // this works too // some vars and control flow int numDaysInYear = 365; printf ("days per year: %d\n", numDaysInYear); if (numDaysInYear == 366) { printf ("Seems rea...
#include <stdio.h> int main() { /* hi this is a multi-line comment hi. */ // single-line comment printf ("Hello world!\n"); // this works too // some vars and control flow int numDaysInYear = 365; printf ("days per year: %d\n", numDaysInYear); if (numDaysInYear == 366) { printf ("Seems rea...
--- +++ @@ -27,4 +27,18 @@ printf ("i=%d\n", i); } + // https://www.seas.gwu.edu/~simhaweb/C/lectures/module2/module2 + int x = 5; + + int *intPtr; + + // print mem address of variable i + printf ("Variable x is located at memory address %lu\n", &x); + + // extract address of var i into the pointer + ...
Add c pointer basic example
mit
oldhill/halloween,oldhill/halloween,oldhill/halloween,oldhill/halloween
55ca2704359dbd97169eeed03e258f9005d7336d
// RUN: %clang_cfi -lm -o %t1 %s // RUN: %t1 c 1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %t1 s 2 2>&1 | FileCheck --check-prefix=CFI %s // This test uses jump tables containing PC-relative references to external // symbols, which the Mach-O object writer does not currently support. // The test passes on i386 Da...
// RUN: %clang_cfi -lm -o %t1 %s // RUN: %t1 c 1 2>&1 | FileCheck --check-prefix=CFI %s // RUN: %t1 s 2 2>&1 | FileCheck --check-prefix=CFI %s // This test uses jump tables containing PC-relative references to external // symbols, which the Mach-O object writer does not currently support. // XFAIL: darwin #include <s...
--- +++ @@ -4,7 +4,8 @@ // This test uses jump tables containing PC-relative references to external // symbols, which the Mach-O object writer does not currently support. -// XFAIL: darwin +// The test passes on i386 Darwin and fails on x86_64, hence unsupported instead of xfail. +// UNSUPPORTED: darwin #inclu...
[cfi] Mark a test as unsupported on darwin. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@315007 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
ad59ece0e473ce0278ab3516e9d0a757955a5da1
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 5 #define CLIENT_VERSION_BUILD ...
#ifndef CLIENTVERSION_H #define CLIENTVERSION_H // // client versioning and copyright year // // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 #define CLIENT_VERSION_REVISION 3 #define CLIENT_VERSION_BUILD ...
--- +++ @@ -8,7 +8,7 @@ // These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 9 -#define CLIENT_VERSION_REVISION 3 +#define CLIENT_VERSION_REVISION 5 #define CLIENT_VERSION_BUILD 0 // Set to true f...
Update client version to 0.9.5
mit
coinkeeper/2015-06-22_18-49_unobtanium,unobtanium-official/Unobtanium,unobtanium-official/Unobtanium,coinkeeper/2015-06-22_18-49_unobtanium,coinkeeper/2015-06-22_18-49_unobtanium,coinkeeper/2015-06-22_18-49_unobtanium,unobtanium-official/Unobtanium,coinkeeper/2015-06-22_18-49_unobtanium,unobtanium-official/Unobtanium,c...
40042b55d410a8c0adfb7a5b1ee27c55a72a731d
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Multiply-included file, hence no include guard. // Inclusion of all message files present in the system. Keep this file // up-to-date when adding ...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Multiply-included file, hence no include guard. // Inclusion of all message files present in the system. Keep this file // up-to-date when adding ...
--- +++ @@ -7,8 +7,8 @@ // up-to-date when adding a new value to enum IPCMessageStart in // ipc/ipc_message_utils.h to include the corresponding message file. #include "chrome/browser/importer/profile_import_process_messages.h" -#include "chrome/common/automation_messages.h" #include "chrome/common/common_message...
Fix build break from bad merge git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@106741 0039d316-1c4b-4281-b951-d872f2087c98
bsd-3-clause
hujiajie/pa-chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,dushu1203/chromium.src,robclark/chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,keishi/chromium,...
f94c619e73b934b8f32edf303cc8998670f7cc64
/* * dialer - MeeGo Voice Call Manager * Copyright (c) 2009, 2010, Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ #ifndef GENERICPAGE_H #define GENE...
/* * dialer - MeeGo Voice Call Manager * Copyright (c) 2009, 2010, Intel Corporation. * * This program is licensed under the terms and conditions of the * Apache License, version 2.0. The full text of the Apache License is at * http://www.apache.org/licenses/LICENSE-2.0 * */ #ifndef GENERICPAGE_H #define GENE...
--- +++ @@ -37,12 +37,13 @@ virtual void createContent(); virtual MGridLayoutPolicy * policy(M::Orientation); + virtual void activateWidgets(); + virtual void deactivateAndResetWidgets(); + MainWindow *mainWindow(); protected: virtual void showEvent(QShowEvent *event); - virtual void...
Make the genericPage methods activate and deactivate widgets public instead of protected. Signed-off-by: Michael Demeter <ed571e93df5b6cb8044d8ad4bd1aafe6e72f2a71@intel.com>
apache-2.0
lbt/meego-handset-dialer,lbt/meego-handset-dialer,lbt/meego-handset-dialer,lbt/meego-handset-dialer
abeb3e3e92bd30ccd7f0d6683a97fbb9f828f75b
#include "mininode.h" #include <unistd.h> #include <fcntl.h> duk_ret_t mn_bi_fs_access(duk_context *ctx) { const int nargs = duk_get_top(ctx); const char *path = NULL; uv_fs_t *req = NULL; int mode = 0; if (nargs == 3) { mode = duk_require_int(ctx, -2); path = duk_require_string(ctx, -3); } else if (nargs =...
#include "mininode.h" #include <unistd.h> #include <fcntl.h> duk_ret_t mn_bi_fs_access(duk_context *ctx) { const int nargs = duk_get_top(ctx); const char *path = NULL; uv_fs_t *req = NULL; int mode = 0; if (nargs == 3) { mode = duk_require_int(ctx, -2); path = duk_require_string(ctx, -3); } else { mode = ...
--- +++ @@ -11,11 +11,24 @@ if (nargs == 3) { mode = duk_require_int(ctx, -2); path = duk_require_string(ctx, -3); - } else { + } else if (nargs == 2){ mode = F_OK; path = duk_require_string(ctx, -2); + } else if (nargs < 2) { + duk_pop_n(ctx, nargs); + duk_push_error_object( + ctx, + DUK_ERR_TYPE...
Add fileName and lineNumber properties to Error
mit
hypoalex/mininode,hypoalex/mininode,hypoalex/mininode
01145fa196b4158507dfcd7405026c2d51551c69
#include <truth/panic.h> #include <truth/cpu.h> #include <truth/types.h> #include <truth/log.h> #include <truth/slab.h> #include <truth/heap.h> #include <truth/physical_allocator.h> string Logo = str("\n" " _.-.\n" " .-. `) | .-.\n" " _.'`. ....
#include <truth/panic.h> #include <truth/cpu.h> #include <truth/types.h> #include <truth/log.h> #include <truth/slab.h> #include <truth/heap.h> #include <truth/physical_allocator.h> string Logo = str("\n" " _.-.\n" " .-. `) | .-.\n" " _.'`. ....
--- +++ @@ -21,9 +21,9 @@ enum status status = init_log("log"); assert(status == Ok); log(Logo); - logf("\tVersion %d.%d.%d\n\tCommit %s\n\t%s\n", + logf("\tVersion %d.%d.%d\n\tCommit %s\n\t%s\n\tCPU Time %ld\n", kernel_major, kernel_minor, kernel_patch, vcs_version, - project_w...
Print CPU time in splash screen
mit
iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth
5a3d7873993eb4c6f4e4d650e2b46b0d403fecd3
#ifndef CPR_ERROR_H #define CPR_ERROR_H #include <string> #include "cprtypes.h" #include "defines.h" namespace cpr { enum class ErrorCode { OK = 0, CONNECTION_FAILURE, EMPTY_RESPONSE, HOST_RESOLUTION_FAILURE, INTERNAL_ERROR, INVALID_URL_FORMAT, NETWORK_RECEIVE_ERROR, NETWORK_SEND_FAI...
#ifndef CPR_ERROR_H #define CPR_ERROR_H #include <string> #include "cprtypes.h" #include "defines.h" namespace cpr { enum class ErrorCode { OK = 0, CONNECTION_FAILURE, EMPTY_RESPONSE, HOST_RESOLUTION_FAILURE, INTERNAL_ERROR, INVALID_URL_FORMAT, NETWORK_RECEIVE_ERROR, NETWORK_SEND_FAI...
--- +++ @@ -33,8 +33,8 @@ Error() : code{ErrorCode::OK} {} template <typename TextType> - Error(const ErrorCode& p_error_code, TextType&& p_error_message) - : code{p_error_code}, message{CPR_FWD(p_error_message)} {} + Error(const int& curl_code, TextType&& p_error_message) + : ...
Make constructor for taking in curl code as the first argument
mit
SuperV1234/cpr,whoshuu/cpr,whoshuu/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr,msuvajac/cpr,msuvajac/cpr,SuperV1234/cpr
21bdc56b1b94dcfc9badf80b544ac7b28155aa18
// PARAM: --enable ana.int.congruence void unsignedCase() { unsigned int top; unsigned int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); ...
// PARAM: --enable ana.int.congruence void unsignedCase() { unsigned int top; unsigned int i = 0; if(top % 17 == 3) { assert(top%17 ==3); if(top %17 != 3) { i = 12; } else { } } assert(i ==0); if(top % 17 == 0) { assert(top%17 == 0); ...
--- +++ @@ -21,6 +21,7 @@ assert(i == 0); if(top % 3 == 17) { + // This is unreachable in the concrete! assert(top%17 == 3); //UNKNOWN! } } @@ -47,6 +48,7 @@ assert(i == 0); if(top % 3 == 17) { + // This is unreachable in the concrete! assert(top%17 == 3);...
Add comments to confusing test
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
aba62b0799f87628580c92943152432e6118cedd
// RUN: %llvmgcc -S %s -o /dev/null /* * XFAIL: * */ struct s { unsigned long long u33: 33; unsigned long long u40: 40; }; struct s a = { 1, 2}; int foo() { return a.u40; }
// RUN: %llvmgcc -S %s -o /dev/null /* * XFAIL: linux */ struct s { unsigned long long u33: 33; unsigned long long u40: 40; }; struct s a = { 1, 2}; int foo() { return a.u40; }
--- +++ @@ -1,7 +1,7 @@ // RUN: %llvmgcc -S %s -o /dev/null /* - * XFAIL: linux + * XFAIL: * */ struct s { unsigned long long u33: 33;
Test fails on all platforms, not just linux git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@19405 91177308-0d34-0410-b5e6-96231b3b80d8
bsd-2-clause
dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,l...
b56013dda5371aa32a634bc59878f754b537f874
// PARAM: --set ana.int.interval true --set solver "'td3'" #include<pthread.h> #include<assert.h> int glob1 = 0; pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int t; pthread_mutex_lock(&mutex1); pthread_mutex_lock(&mutex2); glo...
// PARAM: --set ana.int.interval true --set solver "'td3'" #include<pthread.h> #include<assert.h> int glob1 = 0; pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int t; pthread_mutex_lock(&mutex1); pthread_mutex_lock(&mutex2); glo...
--- +++ @@ -28,8 +28,8 @@ assert(glob1 == 0); pthread_create(&id, NULL, t_fun, NULL); pthread_mutex_lock(&mutex2); - assert(glob1 == 0); // UNKNOWN - assert(glob1 == 5); // UNKNOWN + assert(glob1 == 0); // UNKNOWN! + assert(glob1 == 5); // UNKNOWN! pthread_mutex_unlock(&mutex2); pthread_join (id, N...
Test 13/19: Add ! to UNKNOWN
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
884143e3d78327a81ceadff98b4190776396d6c7
#include <stdio.h> typedef struct { int hands[2][2]; int turn; } Sticks; void sticks_create(Sticks *sticks) { sticks->hands[0][0] = 1; sticks->hands[0][1] = 1; sticks->hands[1][0] = 1; sticks->hands[1][1] = 1; sticks->turn = 0; } void sticks_play(Sticks *sticks, int attack, int x, int y) ...
#include <stdio.h> typedef struct { int hands[2][2]; int turn; } Sticks; void sticks_create(Sticks *sticks) { sticks->hands[0][0] = 1; sticks->hands[0][1] = 1; sticks->hands[1][0] = 1; sticks->hands[1][1] = 1; sticks->turn = 0; } void sticks_play(Sticks *sticks, int x, int y) { sticks...
--- +++ @@ -13,10 +13,19 @@ sticks->turn = 0; } -void sticks_play(Sticks *sticks, int x, int y) { - sticks->hands[!sticks->turn][y] += sticks->hands[sticks->turn][x]; - if (sticks->hands[!sticks->turn][y] >= 5) { - sticks->hands[!sticks->turn][y] = 0; +void sticks_play(Sticks *sticks, int attack,...
Allow user to move fingers between own hands
mit
tysonzero/c-ann
3c2e43310c2530efe55a10c6e02b89501c373f08
/* System module interface */ #ifndef Py_SYSMODULE_H #define Py_SYSMODULE_H #ifdef __cplusplus extern "C" { #endif DL_IMPORT(PyObject *) PySys_GetObject(char *); DL_IMPORT(int) PySys_SetObject(char *, PyObject *); DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); DL_IMPORT(void) PySys_SetArgv(int, char **); DL_IMPORT...
/* System module interface */ #ifndef Py_SYSMODULE_H #define Py_SYSMODULE_H #ifdef __cplusplus extern "C" { #endif DL_IMPORT(PyObject *) PySys_GetObject(char *); DL_IMPORT(int) PySys_SetObject(char *, PyObject *); DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); DL_IMPORT(void) PySys_SetArgv(int, char **); DL_IMPORT...
--- +++ @@ -19,6 +19,9 @@ extern DL_IMPORT(PyObject *) _PySys_TraceFunc, *_PySys_ProfileFunc; extern DL_IMPORT(int) _PySys_CheckInterval; +DL_IMPORT(void) PySys_ResetWarnOptions(void); +DL_IMPORT(void) PySys_AddWarnOption(char *); + #ifdef __cplusplus } #endif
Add declarations for PySys_ResetWarnOptions() and PySys_AddWarnOption().
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
33231a276ae9ac84ae779531e9f346fb7719a4cb
// // arch/x86_64/rsp/vmov.c // // This file is subject to the terms and conditions defined in // 'LICENSE', which is part of this source code package. // #include "common.h" #include "rsp/cpu.h" #include "rsp/rsp.h" __m128i rsp_vmov(struct rsp *rsp, unsigned src, unsigned e, unsigned dest, unsigned de) { uint16_...
// // arch/x86_64/rsp/vmov.c // // This file is subject to the terms and conditions defined in // 'LICENSE', which is part of this source code package. // #include "common.h" #include "rsp/cpu.h" #include "rsp/rsp.h" __m128i rsp_vmov(struct rsp *rsp, unsigned src, unsigned e, unsigned dest, unsigned de) { uint16_...
--- +++ @@ -14,7 +14,7 @@ uint16_t data; // Get the element from VT. - data = rsp->cp2.div_in = rsp->cp2.regs[src].e[e]; + data = rsp->cp2.regs[src].e[e]; // Write out the upper part of the result. rsp->cp2.regs[dest].e[de] = data;
Fix a typo in the VMOV implementation.
bsd-3-clause
tj90241/cen64,LuigiBlood/cen64,tj90241/cen64,LuigiBlood/cen64
71db9767599b54ee8f8622bee2420daf78603dcf
#ifndef IPV4_H #define IPV4_H #include "syshead.h" #include "netdev.h" #define IPV4 0x04 #define ICMPV4 0x01 struct iphdr { uint8_t ihl : 4; /* TODO: Support Big Endian hosts */ uint8_t version : 4; uint8_t tos; uint16_t len; uint16_t id; uint16_t flags : 3; uint16_t frag_offset : 13; ...
#ifndef IPV4_H #define IPV4_H #include "syshead.h" #include "netdev.h" #define IPV4 0x04 #define ICMPV4 0x01 struct iphdr { uint8_t version : 4; uint8_t ihl : 4; uint8_t tos; uint16_t len; uint16_t id; uint16_t flags : 3; uint16_t frag_offset : 13; uint8_t ttl; uint8_t proto; ...
--- +++ @@ -9,8 +9,8 @@ #define ICMPV4 0x01 struct iphdr { + uint8_t ihl : 4; /* TODO: Support Big Endian hosts */ uint8_t version : 4; - uint8_t ihl : 4; uint8_t tos; uint16_t len; uint16_t id;
Swap fields in IPv4 header because of little endianness This should be handled more gracefully. Now, little endian byte order is assumed.
mit
saminiir/level-ip,saminiir/level-ip
8993b1ede652b3c81b1cae873a00716b3dd8545d
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. Must not be infinite, of course. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::siz...
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::size_t n = *gen::ranged<std::size_t>...
--- +++ @@ -6,7 +6,7 @@ namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the -//! original. +//! original. Must not be infinite, of course. template<typename T> void assertEqualCopies(Seq<T> seq) {
Add clarifying comment for assertEqualCopies
bsd-2-clause
whoshuu/rapidcheck,tm604/rapidcheck,whoshuu/rapidcheck,emil-e/rapidcheck,tm604/rapidcheck,emil-e/rapidcheck,unapiedra/rapidfuzz,emil-e/rapidcheck,whoshuu/rapidcheck,tm604/rapidcheck,unapiedra/rapidfuzz,unapiedra/rapidfuzz
1e0998cf1d80b72eafd1639c839c86ac6f38a6ef
#include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> #include <glib.h> static void main_window_destroy(GtkAccelGroup *group, GObject *acceleratable, guint keyval, GdkModifierType modifier, gpointer user_data) { gtk_widget_destroy(GTK_WIDGET(user_data)); } void main_window_bind_keys(GtkWidget *window) { GtkAccelGr...
#include <gtk/gtk.h> GtkWidget * main_window_create() { GtkWidget *window; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "ghighlighter"); g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); return window; }
--- +++ @@ -1,4 +1,24 @@ #include <gtk/gtk.h> +#include <gdk/gdkkeysyms.h> +#include <glib.h> + +static void +main_window_destroy(GtkAccelGroup *group, GObject *acceleratable, + guint keyval, GdkModifierType modifier, gpointer user_data) +{ + gtk_widget_destroy(GTK_WIDGET(user_data)); +} + +void +main_window_bin...
Destroy main window on Ctrl+q
mit
chdorner/ghighlighter-c
0daebd485c02840729740949caa429efd5cf0153
#ifndef SSPAPPLICATION_GAMESTATES_MENUSTATE_H #define SSPAPPLICATION_GAMESTATES_MENUSTATE_H #include "GameState.h" #include "../GraphicsDLL/GraphicsComponent.h" class MenuState : public GameState { private: const static int m_NR_OF_MENU_ITEMS = 2; UIComponent* m_uiComps[NR_OF_MENU_ITEMS]; TextComponent* m_textComps...
#ifndef SSPAPPLICATION_GAMESTATES_MENUSTATE_H #define SSPAPPLICATION_GAMESTATES_MENUSTATE_H #include "GameState.h" class MenuState : public GameState { private: public: MenuState(); ~MenuState(); int ShutDown(); int Initialize(GameStateHandler* gsh, ComponentHandler* cHandler); int Update(float dt, InputHandler ...
--- +++ @@ -1,10 +1,14 @@ #ifndef SSPAPPLICATION_GAMESTATES_MENUSTATE_H #define SSPAPPLICATION_GAMESTATES_MENUSTATE_H #include "GameState.h" +#include "../GraphicsDLL/GraphicsComponent.h" class MenuState : public GameState { private: + const static int m_NR_OF_MENU_ITEMS = 2; + UIComponent* m_uiComps[NR_OF_ME...
ADD ui and text comps to menustate
apache-2.0
Chringo/SSP,Chringo/SSP
acd4d69243c48f9bbff625d269b337eed0c47f24
#ifndef __POSIX_SIGNAL_SIGTABLES_H typedef struct { int signal; char *name; } Signal; typedef struct { int len; int items[]; } SignalVector; MODULE_SCOPE const Signal signals[]; MODULE_SCOPE const int nsigs; MODULE_SCOPE int max_signum; #define SIGOFFSET(SIG) ((SIG) - 1) void InitSignalTables (voi...
#ifndef __POSIX_SIGNAL_SIGTABLES_H typedef struct { int signal; char *name; } Signal; typedef struct { int len; int items[]; } SignalVector; extern const Signal signals[]; extern const int nsigs; extern int max_signum; #define SIGOFFSET(SIG) ((SIG) - 1) void InitSignalTables (void); SignalVector*...
--- +++ @@ -10,10 +10,10 @@ int items[]; } SignalVector; -extern const Signal signals[]; -extern const int nsigs; +MODULE_SCOPE const Signal signals[]; +MODULE_SCOPE const int nsigs; -extern int max_signum; +MODULE_SCOPE int max_signum; #define SIGOFFSET(SIG) ((SIG) - 1)
Hide global data symbols related to signal tables 'extern' decls for "signals", "nsigs" and "max_signum" changed to 'MODULE_SCOPE' in unix/sigtables.h to remove it from the symbol table of the generated shared object file.
mit
kostix/posix-signal
f0898d02f76cbd77206b6ef278b1da9721b7cd3d
// // MustacheToken.h // OCMustache // // Created by Wesley Moore on 31/10/10. // Copyright 2010 Wesley Moore. All rights reserved. // #import <Foundation/Foundation.h> enum mustache_token_type { mustache_token_type_etag = 1, // Escaped tag mustache_token_type_utag, // Unescaped tag mustache_token_type_section...
// // MustacheToken.h // OCMustache // // Created by Wesley Moore on 31/10/10. // Copyright 2010 Wesley Moore. All rights reserved. // #import <Foundation/Foundation.h> enum mustache_token_type { mustache_token_type_etag = 1, // Escaped tag mustache_token_type_utag, // Unescaped tag mustache_token_type_section...
--- +++ @@ -25,7 +25,7 @@ @property(nonatomic, assign) enum mustache_token_type type; @property(nonatomic, assign) const char *content; -@property(nonatomic, assign) size_t contentLength; +@property(nonatomic, assign) NSUInteger contentLength; - (id)initWithType:(enum mustache_token_type)token_type content:(co...
Fix type mismatch between property and ivar
bsd-3-clause
wezm/OCMustache,wezm/OCMustache
e36c3d63728197449d4e555823d7d07db16e2c3a
// REQUIRES: x86_64-linux // RUN: %host_cc -O0 -g %s -o %t 2>&1 // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s // // See PR31870 for more details on the XFAIL // XFAIL: avr #include <stdio.h> int inc(int a) { return a + 1; } int main() { printf("%p\n", inc); return 0; } ...
// REQUIRES: x86_64-linux // RUN: %host_cc -O0 -g %s -o %t 2>&1 // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s #include <stdio.h> int inc(int a) { return a + 1; } int main() { printf("%p\n", inc); return 0; } // CHECK: inc // CHECK: print_context.c:7 // CHECK: 5 : #inc...
--- +++ @@ -1,6 +1,9 @@ // REQUIRES: x86_64-linux // RUN: %host_cc -O0 -g %s -o %t 2>&1 // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s +// +// See PR31870 for more details on the XFAIL +// XFAIL: avr #include <stdio.h>
[AVR] Mark a failing symbolizer test as XFAIL git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309512 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llv...
588c5e4b6f5fa8e45811d3f4e95d3b94f8f58341
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \ // RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \ // RUN: %s -emit-llvm -debugger-tuning=lldb -o - | FileCheck %s // // RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info...
// RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \ // RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \ // RUN: %s -emit-llvm -debugger-tuning=lldb -o - | FileCheck %s #include "DebugSubmoduleA.h" #include "DebugSubmoduleB.h" // C...
--- +++ @@ -1,6 +1,11 @@ // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \ // RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \ +// RUN: %s -emit-llvm -debugger-tuning=lldb -o - | FileCheck %s +// +// RUN: %clang_cc1 -fmodule...
Add a test that local submodule visibility has no effect on debug info rdar://problem/27876262 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@302809 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl...
5dcd7a8c429aa6f7d26cb8dfce62e4a793a6d9b5
#ifndef TIMEOUT_QUEUE_H #define TIMEOUT_QUEUE_H #include <map> #include <common/time/time.h> class TimeoutQueue { typedef std::map<NanoTime, CallbackQueue> timeout_map_t; LogHandle log_; timeout_map_t timeout_queue_; public: TimeoutQueue(void) : log_("/event/timeout/queue"), timeout_queue_() { } ~Timeout...
#ifndef TIMEOUT_QUEUE_H #define TIMEOUT_QUEUE_H #include <map> class TimeoutQueue { typedef std::map<NanoTime, CallbackQueue> timeout_map_t; LogHandle log_; timeout_map_t timeout_queue_; public: TimeoutQueue(void) : log_("/event/timeout/queue"), timeout_queue_() { } ~TimeoutQueue() { } bool empty(void)...
--- +++ @@ -2,6 +2,8 @@ #define TIMEOUT_QUEUE_H #include <map> + +#include <common/time/time.h> class TimeoutQueue { typedef std::map<NanoTime, CallbackQueue> timeout_map_t;
Use new NanoTime location header, oops.
bsd-2-clause
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
fae7949017389ee7c127883fdfcd3672f98e2fc3
// // MRHexKeyboard.h // // Created by Mikk Rätsep on 02/10/13. // Copyright (c) 2013 Mikk Rätsep. All rights reserved. // #import <UIKit/UIKit.h> @interface MRHexKeyboard : UIView <UITextFieldDelegate> @property(nonatomic, assign) CGFloat height; @property(nonatomic, assign) BOOL display0xButton; @property(non...
// // MRHexKeyboard.h // // Created by Mikk Rätsep on 02/10/13. // Copyright (c) 2013 Mikk Rätsep. All rights reserved. // @import UIKit; @interface MRHexKeyboard : UIView <UITextFieldDelegate> @property(nonatomic, assign) CGFloat height; @property(nonatomic, assign) BOOL display0xButton; @property(nonatomic, a...
--- +++ @@ -5,7 +5,7 @@ // Copyright (c) 2013 Mikk Rätsep. All rights reserved. // -@import UIKit; +#import <UIKit/UIKit.h> @interface MRHexKeyboard : UIView <UITextFieldDelegate>
Switch to importing framework header Some Apps may not use modules
mit
doofyus/HexKeyboard
8da70953568e44c46d7aebeea3147c029135a824
/* Copyright (C) 2012-2013 Zeex * * 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 i...
/* Copyright (C) 2012-2013 Zeex * * 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 i...
--- +++ @@ -18,5 +18,15 @@ #include <windows.h> time_t timer_clock(void) { - return GetTickCount(); + LARGE_INTEGER freq, count; + + if (!QueryPerformanceFrequency(&freq)) { + return 0; + } + + if (!QueryPerformanceCounter(&count)) { + return 0; + } + + return (time_t)(1000.0L / freq.QuadPart * count...
Use QueryPerformanceCounter() timer instead of GetTickCount() GetTickCount() has poor resolution according to MSDN docs (from 10 to 16 ms).
apache-2.0
WopsS/sampgdk,Zeex/sampgdk,Zeex/sampgdk,WopsS/sampgdk,Zeex/sampgdk,WopsS/sampgdk
274937d4b721bb1162598610a3635ea67728c116
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!...
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */ #include "common.h" #include "commands.h" #include "imap-expunge.h" bool cmd_close(struct client_command_context *cmd) { struct client *client = cmd->client; struct mailbox *mailbox = client->mailbox; struct mail_storage *storage; if (!...
--- +++ @@ -18,6 +18,8 @@ if (!imap_expunge(mailbox, NULL)) client_send_untagged_storage_error(client, storage); + else if (mailbox_sync(mailbox, 0, 0, NULL) < 0) + client_send_untagged_storage_error(client, storage); if (mailbox_close(&mailbox) < 0) client_send_untagged_storage_error(cli...
CLOSE: Synchronize the mailbox after expunging messages to actually get them expunged. --HG-- branch : HEAD
mit
dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot
9a3831ff69c0f341416b38bab7d9f27ebbda2304
/* * context_del.c -- delete an entry from the context/profile list * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> #include <h/utils.h> /* * Delete a key/value pair f...
/* * context_del.c -- delete an entry from the context/profile list * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. */ #include <h/mh.h> /* * Delete a key/value pair from the context/profi...
--- +++ @@ -8,6 +8,7 @@ */ #include <h/mh.h> +#include <h/utils.h> /* * Delete a key/value pair from the context/profile list. @@ -28,8 +29,7 @@ else m_defs = np->n_next; free (np->n_name); - if (np->n_field) - free (np->n_field); + mh_xfree(np->n_field); free ((char *) ...
Replace `if (p) free(p)' with `mh_xfree(p)'.
bsd-3-clause
mcr/nmh,mcr/nmh
6420adb9d93a17d3d16ae17bb67b012273fa0e8d
//Trie data structure testing //All code written my Nathaniel Thompson #include <stdio.h> #include <stdlib.h> //trie structure typedef struct _trie{ char letter; //the letter that the node holds struct _trie *next[26];//pointers to the rest of the letters }trie; //fucntion prototypes void initialize(trie *);...
//Trie data structure testing //All code written my Nathaniel Thompson #include <stdio.h> #include <stdlib.h> //trie structure typedef struct _trie { char letter; //the letter that the node holds _trie *next[26];//pointers to the rest of the letters }trie; //main function int main(void) { }
--- +++ @@ -5,14 +5,40 @@ #include <stdlib.h> //trie structure -typedef struct _trie -{ +typedef struct _trie{ char letter; //the letter that the node holds - _trie *next[26];//pointers to the rest of the letters + struct _trie *next[26];//pointers to the rest of the letters }trie; + +//fucntion proto...
Structure was properly set up, TODO Create a small dictionary load dictionary into the trie
mit
Felttrip/TrieWords
b8af68049f97718e1ecd5e86aa1bf5c7cafa8be0
#pragma once #include <QObject> #include <QQmlParserStatus> #include "qslistmodel.h" /* QSJsonListModel is a data model that combine QSListModel and QSDiffRunner * into a single class. It may take a Javascript array object as source input, * it will compare with previous input then update the model according to * ...
#pragma once #include <QObject> #include <QQmlParserStatus> #include "qslistmodel.h" class QSJsonListModel : public QSListModel, public QQmlParserStatus { Q_OBJECT Q_PROPERTY(QString keyField READ keyField WRITE setKeyField NOTIFY keyFieldChanged) Q_PROPERTY(QVariantList source READ source WRITE setSource...
--- +++ @@ -3,6 +3,12 @@ #include <QObject> #include <QQmlParserStatus> #include "qslistmodel.h" + +/* QSJsonListModel is a data model that combine QSListModel and QSDiffRunner + * into a single class. It may take a Javascript array object as source input, + * it will compare with previous input then update the mo...
Add description to QSJsonListModel in source file.
apache-2.0
benlau/qsyncable,benlau/qsyncable
9daa20c4f49febf0046ed42e0b436ad9f6956a2c
#if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" #else #import <React/RCTBridgeModule.h> #endif @interface RNI18n : NSObject <RCTBridgeModule> @end
#import <React/RCTBridgeModule.h> @interface RNI18n : NSObject <RCTBridgeModule> @end
--- +++ @@ -1,4 +1,8 @@ +#if __has_include("RCTBridgeModule.h") +#import "RCTBridgeModule.h" +#else #import <React/RCTBridgeModule.h> +#endif @interface RNI18n : NSObject <RCTBridgeModule> @end
Add support for react-native < 0.40
mit
AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n,AlexanderZaytsev/react-native-i18n
56259f7f61084eabd4dc2d3d6cb3ea4cc161320f
#include <string.h> #include "c4-internal.h" void * ol_alloc(apr_size_t sz) { void *result = malloc(sz); if (result == NULL) FAIL(); return result; } void * ol_alloc0(apr_size_t sz) { void *result = ol_alloc(sz); memset(result, 0, sz); return result; } void * ol_realloc(void *ptr, ap...
#include <string.h> #include "c4-internal.h" void * ol_alloc(apr_size_t sz) { void *result = malloc(sz); if (result == NULL) FAIL(); return result; } void * ol_alloc0(apr_size_t sz) { void *result = ol_alloc(sz); memset(result, 0, sz); return result; } void * ol_realloc(void *ptr, ap...
--- +++ @@ -54,7 +54,7 @@ s = apr_pool_create(&pool, parent); if (s != APR_SUCCESS) - FAIL(); + FAIL_APR(s); return pool; }
Use FAIL_APR() rather than FAIL() in create_subpool().
mit
bloom-lang/c4,bloom-lang/c4,bloom-lang/c4
6f39bf9df903d2c150f1e2590211a91e7277c748
/* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU General Public Licen...
/* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU General Public Licen...
--- +++ @@ -14,19 +14,8 @@ /* Ioctls implemented */ -#define GFS2_IOCTL_IDENTIFY _GFS2C_(1) -#define GFS2_IOCTL_SUPER _GFS2C_(2) #define GFS2_IOCTL_SETFLAGS _GFS2C_(3) #define GFS2_IOCTL_GETFLAGS _GFS2C_(4) -struct gfs2_ioctl { - unsigned int gi_argc; - const char **gi_argv; - - ...
[GFS2] Remove unused ioctls and unused structure Signed-off-by: David Teigland <cf7ba74ea50525d3d47fcd7a6d69b51121a9f873@redhat.com> Signed-off-by: Steven Whitehouse <9801c4ef11586b619a1c43ac9377eea2aee672dd@redhat.com>
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Program...
cd1344fe322cd9d95b2c0f011d6766677cfcb29b
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include <string> #include <vector> #include "base/bas...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_ #include <string> #include <vector> #include "base/bas...
--- +++ @@ -10,13 +10,13 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" +#include "base/strings/string_split.h" #include "content/common/content_export.h" namespace content { struct ResourceDevToolsInfo : base::RefCounted<ResourceDevToolsInfo> { - typedef std::vector<std::pair<std::s...
Use base::StringPairs where appropriate from /content Because base/strings/string_split.h defines: typedef std::vector<std::pair<std::string, std::string> > StringPairs; BUG=412250 Review URL: https://codereview.chromium.org/600163003 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#296649}
bsd-3-clause
hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,dednal/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswa...
542c416be33f1cc748530f20db2025f43f490b30
#ifndef MIAOW_SIAGEN_H #define MIAOW_SIAGEN_H #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include <string> #include "asm.h" #include "helper.h" #define MAX_INSTR 1000 #define MAX_OPS 50 #define INSTR_TYPES 4 #define SCALAR_ALU 0 #define VECTOR_ALU 1 #define SCALAR_MEM 2 #def...
#ifndef MIAOW_SIAGEN_H #define MIAOW_SIAGEN_H #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> #include "asm.h" #include "helper.h" #define MAX_INSTR 1000 #define MAX_OPS 50 #define INSTR_TYPES 4 #define SCALAR_ALU 0 #define VECTOR_ALU 1 #define SCALAR_MEM 2 #define VECTOR_MEM 3 ...
--- +++ @@ -5,6 +5,7 @@ #include <stdlib.h> #include <sys/stat.h> #include <sys/types.h> +#include <string> #include "asm.h" #include "helper.h" @@ -23,7 +24,7 @@ typedef struct _instr { int opcode; - char op_str[30]; + std::string op_str; } Instr; typedef struct _instr_sel
Fix build on Linux where gcc apparently enforces character arrays as arrays for initialization purposes.
bsd-3-clause
VerticalResearchGroup/miaow,VerticalResearchGroup/miaow,VerticalResearchGroup/miaow,VerticalResearchGroup/miaow
4ba9ea887633b3783bd86aae9da2a35bcd25bffd
@import Foundation; #import <VENCore/VENCreateTransactionRequest.h> #import <VENCore/VENHTTP.h> #import <VENCore/VENHTTPResponse.h> #import <VENCore/VENTransaction.h> #import <VENCore/VENTransactionTarget.h> #import <VENCore/VENUser.h> #import <VENCore/NSArray+VENCore.h> #import <VENCore/NSDictionary+VENCore.h> #impor...
@import Foundation; #import <VENCore/VENCreateTransactionRequest.h> #import <VENCore/VENHTTP.h> #import <VENCore/VENHTTPResponse.h> #import <VENCore/VENTransaction.h> #import <VENCore/VENTransactionTarget.h> #import <VENCore/VENUser.h> extern NSString *const VENErrorDomainCore; typedef NS_ENUM(NSInteger, VENCoreErro...
--- +++ @@ -6,6 +6,11 @@ #import <VENCore/VENTransaction.h> #import <VENCore/VENTransactionTarget.h> #import <VENCore/VENUser.h> +#import <VENCore/NSArray+VENCore.h> +#import <VENCore/NSDictionary+VENCore.h> +#import <VENCore/NSError+VENCore.h> +#import <VENCore/NSString+VENCore.h> +#import <VENCore/UIDevice+VENCo...
Add formerly private headers to the umbrella header
mit
venmo/VENCore
ffeaf8d4204a555cb95858839378f36d0c5cc69e
#pragma once #include "SDL.h" #include "Component.h" #include "Point.h" #define NUM_MOUSE_BUTTONS 5 #define CONTROLLER_JOYSTICK_DEATHZONE 8000 class Input { public: Input(); ~Input(); void Poll(const SDL_Event& e); bool IsKeyPressed(SDL_Scancode key); bool IsKeyHeld(SDL_Scancode key) const; bool IsKeyRelease...
#pragma once #include "SDL.h" #include "Component.h" #include "Point.h" #define NUM_MOUSE_BUTTONS 5 #define CONTROLLER_JOYSTICK_DEATHZONE 8000 class Input { public: Input(); ~Input(); void Poll(const SDL_Event& e); bool IsKeyPressed(SDL_Scancode key); bool IsKeyHeld(SDL_Scancode key) const; bool IsKeyRelease...
--- +++ @@ -43,5 +43,8 @@ bool mouseButtons[NUM_MOUSE_BUTTONS]; bool lastMouseButtons[NUM_MOUSE_BUTTONS]; + + //Might need SDL_MouseMotionEvent instead + //Point mousePosition; };
Add mousePosition as Point, now commented for reworking
mit
CollegeBart/bart-sdl-engine-e16,CollegeBart/bart-sdl-engine-e16
cf0aebe327a7086e4c31a37aaa9b91491c619681
#ifndef _ECORE_STR_H # define _ECORE_STR_H #ifdef EAPI #undef EAPI #endif #ifdef WIN32 # ifdef BUILDING_DLL # define EAPI __declspec(dllexport) # else # define EAPI __declspec(dllimport) # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) # else # define EAPI...
#ifndef _ECORE_STR_H # define _ECORE_STR_H #ifdef EAPI #undef EAPI #endif #ifdef WIN32 # ifdef BUILDING_DLL # define EAPI __declspec(dllexport) # else # define EAPI __declspec(dllimport) # endif #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) # else # define EAPI...
--- +++ @@ -23,8 +23,8 @@ #endif /** - * @file Ecore_Data.h - * @brief Contains threading, list, hash, debugging and tree functions. + * @file Ecore_Str.h + * @brief Contains useful C string functions. */ # ifdef __cplusplus
Fix doxygen comments for new header. SVN revision: 27891
bsd-2-clause
gfriloux/ecore,gfriloux/ecore,gfriloux/ecore
9b662d66ce40ee91314cf392a73cf6991a654172
/** * @file * * @date 21.04.2016 * @author Anton Bondarev */ #ifndef TTYS_H_ #define TTYS_H_ #include <fs/idesc.h> #include <drivers/tty.h> #include <drivers/char_dev.h> struct uart; struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; extern struct idesc *uart_cdev_open(struct dev_mo...
/** * @file * * @date 21.04.2016 * @author Anton Bondarev */ #ifndef TTYS_H_ #define TTYS_H_ #include <fs/idesc.h> #include <drivers/tty.h> struct uart; struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; #endif /* TTYS_H_ */
--- +++ @@ -10,13 +10,18 @@ #include <fs/idesc.h> #include <drivers/tty.h> +#include <drivers/char_dev.h> struct uart; - struct tty_uart { struct idesc idesc; struct tty tty; struct uart *uart; }; +extern struct idesc *uart_cdev_open(struct dev_module *cdev, void *priv); + +#define TTYS_DEF(name, uar...
drivers: Add TTYS_DEF macro to oldfs
bsd-2-clause
embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox
47cb8d841569225b3e8e33945313709f964bd932
/* * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef BL2_H__ #define BL2_H__ void bl2_main(void); #endif /* BL2_H__ */
/* * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #ifndef BL2_H__ #define BL2_H__ struct entry_point_info; void bl2_main(void); struct entry_point_info *bl2_load_images(void); #endif /* BL2_H__ */
--- +++ @@ -7,9 +7,6 @@ #ifndef BL2_H__ #define BL2_H__ -struct entry_point_info; - void bl2_main(void); -struct entry_point_info *bl2_load_images(void); #endif /* BL2_H__ */
Fix MISRA rule 8.5 in common code Rule 8.5: An external object or function shall be declared once in one and only one file. Change-Id: I7c3d4ec7d3ba763fdb4600008ba10b4b93ecdfce Signed-off-by: Roberto Vargas <d75e640c49defb97bd074f828210df57ed181e1f@arm.com>
bsd-3-clause
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
c28b765893ed505ac62864c9d4ce67cd4f9b9fc0
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/loggi...
// Copyright 2014 Google Inc. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd #ifndef MEDIA_FILE_FILE_CLOSER_H_ #define MEDIA_FILE_FILE_CLOSER_H_ #include "packager/base/loggi...
--- +++ @@ -17,9 +17,12 @@ /// scope. struct FileCloser { inline void operator()(File* file) const { - if (file != NULL && !file->Close()) { - LOG(WARNING) << "Failed to close the file properly: " - << file->file_name(); + if (file != NULL) { + const std::string filename = file-...
Fix a possible crash if a file fails to be closed Change-Id: I6bc806a68b81ea5bde09bada1175f257c296afcd
bsd-3-clause
nevil/edash-packager,nevil/edash-packager,nevil/edash-packager
d60cc9416f92dc9dd4e59ecc9883b77ad7acfb3f
// This file is part of nbind, copyright (C) 2014-2015 BusFaster Ltd. // Released under the MIT license, see LICENSE. #pragma once #ifdef BUILDING_NODE_EXTENSION #include "Binding.h" #define NBIND_ERR(message) nbind::Bindings::setError(message) #define NBIND_CLASS(Name) \ template<class Bound> struct BindInvoker ...
// This file is part of nbind, copyright (C) 2014-2015 BusFaster Ltd. // Released under the MIT license, see LICENSE. #pragma once #ifdef BUILDING_NODE_EXTENSION #include "Binding.h" #define NBIND_ERR(message) nbind::Bindings::setError(message) #define NBIND_CLASS(Name) \ template<class Bound> struct BindInvoker ...
--- +++ @@ -19,7 +19,7 @@ template<class Bound> BindInvoker<Bound>::BindInvoker():definer(#Name) #define method(name) definer.function(#name, &Bound::name) -#define constructor definer.constructor +#define construct definer.constructor #define NBIND_INIT(moduleName) NODE_MODULE(moduleName, nbind::Bindings::in...
Fix GCC keyword conflict with simpler API.
mit
charto/nbind,charto/nbind,charto/nbind,charto/nbind,charto/nbind,charto/nbind
018638ec7f304a4acd11b881be3d02bd6af966b4
#include <string.h> #include "lib/minunit.h" #include "acacia.h" #define TEST_KEY "abcdefghijklmnopqrstuvwxyz" #define TEST_VALUE "foo_bar_baz_111" MU_TEST(test_store_fetch_simple) { struct Node *cache = cache_init(); cache_set(TEST_KEY, TEST_VALUE, cache); mu_check(strcmp(cache_get(TEST_KEY, cache), TEST_VALUE) ...
#include <string.h> #include "lib/minunit.h" #include "acacia.h" //#define TEST_KEY "abcd1111" #define TEST_KEY "abcdefghijklmnopqrstuvwxyz" #define TEST_VALUE "foo_bar_baz_111" MU_TEST(test_check) { struct Node *cache = cache_init(); cache_set(TEST_KEY, TEST_VALUE, cache); mu_check(strcmp(cache_get(TEST_KEY, cac...
--- +++ @@ -2,20 +2,27 @@ #include "lib/minunit.h" #include "acacia.h" -//#define TEST_KEY "abcd1111" #define TEST_KEY "abcdefghijklmnopqrstuvwxyz" #define TEST_VALUE "foo_bar_baz_111" -MU_TEST(test_check) { +MU_TEST(test_store_fetch_simple) { struct Node *cache = cache_init(); cache_set(TEST_KEY, TEST_...
Add a test for caching an empty string
mit
zedr/acacia
3cfe2d2e5b57ff33d4febcb0668d1d71fce2dd21
End of preview. Expand in Data Studio

This is a dataset built from CommitPackFT, providing ~1500 commits with diffs for several programming languages:

  • Python
  • JavaScript
  • TypeScript
  • Go
  • Ruby
  • Java
  • PHP
  • C
  • C++
  • Rust
  • Swift
  • Scala
  • Bash

The goal of this dataset is to evaluate the ability of models to retrieve a diff given its instruction.

Code To Produce Dataset

Below is the code to reproduce this dataset:

import datasets
from tqdm import tqdm
import difflib


outrepo = "cassanof/CodeEditSearch"
LANGS = ["python", "javascript", "go", "ruby", "java", "php", "c", "c++", "rust", "swift",
         "typescript", "scala", "kotlin", "r", "perl", "haskell", "lua", "shell", "dart", "julia"]

processed = []


def get_udiff(a, b):
    a = a.splitlines()
    b = b.splitlines()
    diff = difflib.unified_diff(a, b, lineterm="")
    return "\n".join(diff)


for lang in tqdm(LANGS):
    print(f"Processing {lang}")
    ds = datasets.load_dataset("bigcode/commitpackft", lang, split="train")
    ds = ds.shuffle(seed=42)
    print(f"{lang}: {len(ds)}")
    ds = ds.filter(lambda x: len(
        x["new_contents"] + x["old_contents"]) < 2500, num_proc=8)
    ds = ds.filter(lambda x: len(x["new_contents"].strip()) > 0 and len(
        x["old_contents"].strip()) > 0, num_proc=8)
    if len(ds) < 2000:
        print(f"Skipping {lang} due to insufficient data")
        continue
    print(f"{lang} after: {len(ds)}")
    ds = ds.select(range(2000))
    diffs = [get_udiff(a, b)
             for a, b in zip(ds["old_contents"], ds["new_contents"])]
    ds = {
        "after": ds["new_contents"],
        "before": ds["old_contents"],
        "diff": diffs,
        "instruction": ds["message"],
        "license": ds["license"],
        "repos": ds["repos"],
        "commit": ds["commit"],
    }
    ds = datasets.Dataset.from_dict(ds)
    ds = ds.filter(lambda x: len(x["diff"].splitlines()) > 10, num_proc=8)
    print(f" ******* Final {lang}: {len(ds)} *******")
    ds.push_to_hub(outrepo, lang)
    processed.append(lang)

print(processed)
Downloads last month
615