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
// // Copyright 2018 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // util_export.h : Defines ANGLE_UTIL_EXPORT, a macro for exporting symbols. #ifndef UTIL_EXPORT_H_ #define UTIL_EXPORT_H_ #if !defined(ANGLE_...
// // Copyright 2018 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // util_export.h : Defines ANGLE_UTIL_EXPORT, a macro for exporting symbols. #ifndef UTIL_EXPORT_H_ #define UTIL_EXPORT_H_ #if !defined(ANGLE_...
--- +++ @@ -16,7 +16,11 @@ # define ANGLE_UTIL_EXPORT __declspec(dllimport) # endif # elif defined(__GNUC__) -# define ANGLE_UTIL_EXPORT __attribute__((visibility("default"))) +# if defined(LIBANGLE_UTIL_IMPLEMENTATION) +# define ANGLE_UTIL_EXPORT __attribute__((visibi...
Revert "util: Always specify default visibility on exports." This reverts commit 2bf23ea84e4f071c18f01b94748f3be7dccc4019. Reason for revert: Probably not the right fix. Will export all angle_utils symbols in places where they shouldn't be. Original change's description: > util: Always specify default visibility on ...
bsd-3-clause
ppy/angle,ppy/angle,ppy/angle,ppy/angle
0163470450726394efaf11570daade9f34eb2f6e
#ifndef PICTUS_ACTIONMAP_H #define PICTUS_ACTIONMAP_H #include <functional> #include <map> namespace App { template <typename _key, typename _param> class ActionMapParam { public: typedef typename std::function<void(_param)> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } boo...
#ifndef PICTUS_ACTIONMAP_H #define PICTUS_ACTIONMAP_H #include <boost/function.hpp> #include <map> namespace App { template <typename _key, typename _param> class ActionMapParam { public: typedef boost::function<void(_param)> Function_Type; void AddAction(_key id, Function_Type f) { m_map[id] = f; } bo...
--- +++ @@ -1,14 +1,14 @@ #ifndef PICTUS_ACTIONMAP_H #define PICTUS_ACTIONMAP_H -#include <boost/function.hpp> +#include <functional> #include <map> namespace App { template <typename _key, typename _param> class ActionMapParam { public: - typedef boost::function<void(_param)> Function_Type; + typedef...
Use std::function instead of boost::function
mit
poppeman/Pictus,poppeman/Pictus,poppeman/Pictus
e285db1f6f9f42e98ac7f3f36de4cc21d743e9ad
/* * consumer_sdl_osx.m -- An OS X compatibility shim for SDL * Copyright (C) 2010 Ushodaya Enterprises Limited * Author: Dan Dennedy * * 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 Foundati...
/* * consumer_sdl_osx.m -- An OS X compatibility shim for SDL * Copyright (C) 2010 Ushodaya Enterprises Limited * Author: Dan Dennedy * * 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 Foundati...
--- +++ @@ -31,7 +31,7 @@ return NULL; } -static inline void mlt_cocoa_autorelease_close(void*) +static inline void mlt_cocoa_autorelease_close(void* p) { } #endif
Fix build on non-OSX due to missing parameter name.
lgpl-2.1
ttill/MLT,ttill/MLT-roto,siddharudh/mlt,xzhavilla/mlt,anba8005/mlt,zzhhui/mlt,ttill/MLT-roto-tracking,mltframework/mlt,siddharudh/mlt,j-b-m/mlt,mltframework/mlt,wideioltd/mlt,zzhhui/mlt,xzhavilla/mlt,j-b-m/mlt,zzhhui/mlt,siddharudh/mlt,anba8005/mlt,j-b-m/mlt,ttill/MLT-roto,ttill/MLT-roto-tracking,mltframework/mlt,gmarc...
2b1c7246a6be5f0b57ee0cfea70b6a2613163b7e
// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s // RUN: clang -### -S -x c /dev/null -fblo...
// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t // RUN: grep -F '"-fblocks"' %t // RUN: grep -F '"-fpascal-strings"' %t // RUN: clang...
--- +++ @@ -1,12 +1,14 @@ -// RUN: clang -### -S -x c /dev/null -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fno-math-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings %s 2> %t -// RUN: grep -F '"-fblocks"' %t -// RUN: grep -F '"-fpa...
Convert the remainder of this test case over to using FileCheck. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@91194 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
5099b80088141137d81c62d3e03208835faced06
/** * @file tasks.h * @brief Macros for configuring the run time tasks * * DAPLink Interface Firmware * Copyright (c) 2009-2020, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in ...
/** * @file tasks.h * @brief Macros for configuring the run time tasks * * DAPLink Interface Firmware * Copyright (c) 2009-2020, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in ...
--- +++ @@ -25,7 +25,7 @@ // trouble here is that reset for different targets is implemented differently so all targets // have to use the largest stack or these have to be defined in multiple places... Not ideal // may want to move away from threads for some of these behaviours to optimize mempory usage (RAM) -...
Fix k64f stack overflow during WebUSB flashing When flashing via the WebUSB interface (CMSIS v2) the K64F hangs and USB eventually times out. This is because the main stack overflows during this operation casuing RTX to trap and loop forever in osRtxErrorNotify. This patch prevents a stack overflow by by increasing t...
apache-2.0
google/DAPLink-port,google/DAPLink-port,google/DAPLink-port,google/DAPLink-port
2fefbbf03dbacb0ac6f5da487dad19bbe0958074
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundati...
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundati...
--- +++ @@ -25,6 +25,8 @@ static void create() { + KERNELD->set_global_access("Test", 1); + LOGD->post_message("test", LOG_DEBUG, "Test subsystem loading..."); load_dir("obj", 1);
Add global access to test subsystem
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
aacc405f32026f676293f5ba64d50e9a70ef50a9
// Copyright 2019 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...
// Copyright 2019 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...
--- +++ @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Adapter utility from fuzzer input to a temporary file, for fuzzing APIs that -// require a file instead of an input buffer. +#ifndef MATIO_WRAP_H_ +#define MATIO_WRAP_H_ #inclu...
Remove comment and add include guard
bsd-2-clause
tbeu/matio,MaartenBent/matio,tbeu/matio,tbeu/matio,MaartenBent/matio,tbeu/matio,MaartenBent/matio,MaartenBent/matio
0205d0b2e73e5bda5c045ae31edd05d5b9b688ec
#ifndef AT_NETWORK_H #define AT_NETWORK_H // Under Windows, define stuff that we need #ifdef _MSC_VER #include <winsock.h> #define MAXHOSTNAMELEN 64 #define EWOULDBLOCK WSAEWOULDBLOCK #define EINPROGRESS WSAEINPROGRESS #define MSG_WAITALL 0 typedef SOCKET Socket; typedef int ...
#ifndef AT_NETWORK_H #define AT_NETWORK_H // Under Windows, define stuff that we need #ifdef _MSC_VER #include <winsock.h> #define MAXHOSTNAMELEN 64 #define EWOULDBLOCK WSAEWOULDBLOCK #define EINPROGRESS WSAEINPROGRESS #define MSG_WAITALL 0 typedef SOCKET Socket; typedef int ...
--- +++ @@ -16,6 +16,7 @@ typedef SOCKET Socket; typedef int socklen_t; typedef char SocketOptionFlag; + typedef int SocketOptionValue; #else #include <unistd.h> #include <string.h> @@ -31,6 +32,7 @@ typedef int Socket; typedef int SocketOptionFlag; + ty...
Add new typedef for values sent to setsockopt().
apache-2.0
ucfistirl/atlas,ucfistirl/atlas
ba84947c6085e4851198dc21b4e7abb477b7f20f
/* * Copyright 2017 Brandon Yannoni * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
/* * Copyright 2017 Brandon Yannoni * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
--- +++ @@ -31,8 +31,6 @@ struct fqindexedarray { /* a pointer to an element array */ struct function_queue_element* elements; - pthread_mutex_t lock; /* unused */ - pthread_cond_t wait; /* unused */ unsigned int front; /* the index of the "first" element */ unsigned int back; /* the index of the "last" elem...
Remove unused members in fqindexedarray structure
apache-2.0
byannoni/qthreads
d5c5dedbd8284dc6e20d1c86f370a025ad5c3d25
// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_* // flags from sched.h #define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { char* buf = (cha...
// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_* // flags from sched.h #define _GNU_SOURCE #include <sched.h> #include <sys/syscall.h> #include <sys/wait.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static int child_func(void* arg) { char* buf = (cha...
--- +++ @@ -11,7 +11,8 @@ static int child_func(void* arg) { char* buf = (char*)arg; - strcpy(buf, "hello"); + printf("Child sees buf = \"%s\"\n", buf); + strcpy(buf, "hello from child"); return 0; } @@ -30,7 +31,8 @@ flags |= CLONE_VM; } - char buf[100] = {0}; + char buf[100]; + strcpy(bu...
Change the sample to pass message from parent as well
unlicense
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
a835e62e608714541135f90a26f46e919e3e52aa
#include <pony/pony.h> #include "encore.h" encore_actor_t *encore_create(encore_actor_t *type) { return pony_create(type); } /// Allocate s bytes of memory, zeroed out void *encore_alloc(size_t *s) { void *mem = pony_alloc(s); memset(mem, 0, s); return mem; } /// The starting point of all Encore programs in...
#include <pony/pony.h> #include "encore.h" encore_actor_t *encore_create(encore_create_t *type) { return pony_create(type); } /// Allocate s bytes of memory, zeroed out void *encore_alloc(size_t *s) { void *mem = pony_alloc(s); memset(mem, 0, s); return mem; } /// The starting point of all Encore programs i...
--- +++ @@ -1,7 +1,7 @@ #include <pony/pony.h> #include "encore.h" -encore_actor_t *encore_create(encore_create_t *type) +encore_actor_t *encore_create(encore_actor_t *type) { return pony_create(type); }
Fix also applied to corresponding C file
bsd-3-clause
parapluu/encore,parapluu/encore,parapluu/encore
dcdb76edb97d03a550f014c653c0cc1155fe9154
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT // CHECK-ABSENT-NOT: section .stack_sizes // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT // CHECK-PRESENT: section .stack_sizes int foo...
// RUN: %clang_cc1 -triple x86_64-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT // CHECK-ABSENT-NOT: section .stack_sizes // RUN: %clang_cc1 -triple x86_64-unknown -fstack-size-section %s -S -o - | FileCheck %s --check-prefix=CHECK-PRESENT // CHECK-PRESENT: section .stack_sizes int foo() { return 42; ...
--- +++ @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -S -o - | FileCheck %s --check-prefix=CHECK-ABSENT // CHECK-ABSENT-NOT: section .stack_sizes -// RUN: %clang_cc1 -triple x86_64-unknown -fst...
Fix test added in r321992 failing on some buildbots. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@321995 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,llvm-mirror/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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl...
2cb8f29ecd8d8864a2110ef72fed242c107ef1a5
/** * @copyright Copyright 2017 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * Unless required by applicable la...
/** * @copyright Copyright 2017 The J-PET Framework Authors. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may find a copy of the License in the LICENCE file. * * Unless required by applicable la...
--- +++ @@ -16,7 +16,7 @@ #ifndef _EVENTCATEGORIZERTOOLS_H_ #define _EVENTCATEGORIZERTOOLS_H_ -#include <DataObjects/JPetHit/JPetHit.h> +#include <JPetHit/JPetHit.h> struct Point3D {
Change include to proper one
apache-2.0
JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples,JPETTomography/j-pet-framework-examples
aa075fd45fabc26875fb3ac5c34cce70fe3a7030
/** * Copyright (c) 2012 David Chisnall. * This work was funded by TBricks. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * ri...
void __cxa_finalize(void *d ); extern void __dso_handle; __attribute((destructor)) static void cleanup(void) { __cxa_finalize(&__dso_handle); }
--- +++ @@ -1,3 +1,26 @@ +/** + * Copyright (c) 2012 David Chisnall. + * This work was funded by TBricks. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, incl...
Add missing copyright in the other file.
bsd-2-clause
sudosurootdev/external_libcxxrt,xin3liang/platform_external_libcxxrt,vegard/libcxxrt,vegard/libcxxrt,cemeyer/libcxxrt,cemeyer/libcxxrt,sudosurootdev/external_libcxxrt,vegard/libcxxrt,sudosurootdev/external_libcxxrt,cemeyer/libcxxrt,xin3liang/platform_external_libcxxrt,xin3liang/platform_external_libcxxrt
7e7ec2f533ee4ff14372f76f23701e726651f27d
// // synchronizer.h // P2PSP // // This code is distributed under the GNU General Public License (see // THE_GENERAL_GNU_PUBLIC_LICENSE.txt for extending this information). // Copyright (C) 2016, the P2PSP team. // http://www.p2psp.org // #include <boost/format.hpp> #include <boost/program_options/parsers.hpp> ...
// // synchronizer.h // P2PSP // // This code is distributed under the GNU General Public License (see // THE_GENERAL_GNU_PUBLIC_LICENSE.txt for extending this information). // Copyright (C) 2016, the P2PSP team. // http://www.p2psp.org // #include <boost/format.hpp> #include <boost/program_options/parsers.hpp> ...
--- +++ @@ -32,11 +32,11 @@ ~Synchronizer(); const std::vector<std::string>* peer_list; - + boost::thread_group thread_group_; void Run(int argc, const char* argv[]) throw(boost::system::system_error); //Run the argument parser void PlayChunk(); //Play the chunk to the player void Sy...
Add thread group to manage threads
mit
hehaichi/p2psp-experiments,hehaichi/p2psp-experiments,hehaichi/p2psp-experiments
b2c0eb6364d545a0083ec3d1cb55ea04fa6c6e2a
/*++ Copyright (c) 2006, 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 distribut...
/*++ Copyright (c) 2006, 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 distribut...
--- +++ @@ -23,7 +23,7 @@ #ifndef __PE_COFF_LOADER_LIB_H_ #define __PE_COFF_LOADER_LIB_H_ -#include <Protocol/PeiPeCoffLoader.h> +#include <Guid/PeiPeCoffLoader.h> EFI_PEI_PE_COFF_LOADER_PROTOCOL* EFIAPI
Move PeiPeCoffLoader from /Protocol to /Guid. git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@3047 6f19259b-4bc3-4df7-8a09-765794883524
bsd-2-clause
MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2
1bd430675c66ab64791a1aaf8260fd270486651d
// // VKVotable.h // VoatKit // // Created by Amar Ramachandran on 6/26/15. // Copyright © 2015 AmarJayR. All rights reserved. // #import "VKCreated.h" typedef NS_ENUM(NSUInteger, VKVoteStatus) { VKVoteStatusNone, VKVoteStatusUpvoted, VKVoteStatusDownvoted }; @interface VKVotable : VKCreated /** Th...
// // VKVotable.h // VoatKit // // Created by Amar Ramachandran on 6/26/15. // Copyright © 2015 AmarJayR. All rights reserved. // #import "VKCreated.h" typedef NS_ENUM(NSUInteger, VKVoteStatus) { VKVoteStatusUpvoted, VKVoteStatusDownvoted, VKVoteStatusNone }; @interface VKVotable : VKCreated /** Th...
--- +++ @@ -9,9 +9,9 @@ #import "VKCreated.h" typedef NS_ENUM(NSUInteger, VKVoteStatus) { + VKVoteStatusNone, VKVoteStatusUpvoted, - VKVoteStatusDownvoted, - VKVoteStatusNone + VKVoteStatusDownvoted }; @interface VKVotable : VKCreated
Change the default VKVoteStatus value to VKVoteStatusNone This is necessary because unvoted items don't send a "voteValue" field so the voteStatusJSONTransformer is never called
mit
nuudles/VoatKit,AmarJayR/VoatKit
077a4fb5a3055d6d681bdd885bc58a3b3c0830aa
/* USB commands use the first byte as the 'type' variable. * Subsequent bytes are generally the 'arguments'. * So host->device usb packets usually look like: * [command, arg1, arg2, 0, 0, ... , 0, 0] * to which the device will respond with * [CMD_ACK, command, 0, 0, 0 ..., 0, 0] * * The exception to this, are th...
#ifndef USB_COMMANDS_H #define USB_COMMANDS_H #define CMD_ACK 0xAF #define CMD_RESP 0xBF #define CMD_BL_ON 0x10 #define CMD_BL_OFF 0x11 #define CMD_BL_LEVEL 0x12 #define CMD_BL_UP 0x13 #define CMD_BL_DOWN 0x14 #define CMD_BL_GET_STATE 0x1F #define CMD_RGB_SET 0x20 #...
--- +++ @@ -1,3 +1,17 @@ +/* USB commands use the first byte as the 'type' variable. + * Subsequent bytes are generally the 'arguments'. + * So host->device usb packets usually look like: + * [command, arg1, arg2, 0, 0, ... , 0, 0] + * to which the device will respond with + * [CMD_ACK, command, 0, 0, 0 ..., 0, 0] + ...
Document the usb protocol (ish)
bsd-3-clause
OSCARAdapter/OSCAR,OSCARAdapter/OSCAR
2b8300582a7e62df81ab5a32efee5c0053d61161
#ifndef __TYPES_H__ #define __TYPES_H__ typedef long off_t; typedef unsigned long size_t; typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; type...
#ifndef __TYPES_H__ #define __TYPES_H__ typedef long off_t; typedef unsigned long size_t; typedef signed long ssize_t; /* Used for a count of bytes or an error indication. */ typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; type...
--- +++ @@ -15,6 +15,16 @@ typedef unsigned long clockid_t; typedef int pid_t; +typedef int gid_t; +typedef int uid_t; +typedef int dev_t; +typedef int ino_t; +typedef int mode_t; +typedef int caddr_t; + +typedef unsigned int wint_t; +typedef unsigned long useconds_t; + typedef unsigned long clock_t; /* clock() ...
[libc] Add more typedef in minilibc.
apache-2.0
geniusgogo/rt-thread,weety/rt-thread,nongxiaoming/rt-thread,weiyuliang/rt-thread,ArdaFu/rt-thread,nongxiaoming/rt-thread,AubrCool/rt-thread,FlyLu/rt-thread,armink/rt-thread,weiyuliang/rt-thread,FlyLu/rt-thread,hezlog/rt-thread,RT-Thread/rt-thread,hezlog/rt-thread,armink/rt-thread,armink/rt-thread,yongli3/rt-thread,hezl...
41f2f1829f3227b2d405feb75751ac5debfcc1e8
#include "scanner.h" void scanner_init() { scanner_token_init(); current_symbol = T_EOF; scanner_get_symbol(); } void scanner_token_init() { T_EOF = -1; } void scanner_get_symbol() { }
#include "scanner.h"
--- +++ @@ -1 +1,16 @@ #include "scanner.h" + +void scanner_init() { + scanner_token_init(); + + current_symbol = T_EOF; + scanner_get_symbol(); +} + +void scanner_token_init() { + T_EOF = -1; +} + +void scanner_get_symbol() { + +}
Add first (dummy) implementation of functions to make it compile
mit
danielkocher/ocelot2
6f245f8f098efa6c9c9e2dcafec83670921c8ea6
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached #import <Foundation/Foundation.h> /** Convert RFC1123 format dates */ @interf...
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached /** Convert RFC1123 format dates */ @interface NSDate (RFC1123) /** * @name...
--- +++ @@ -8,9 +8,10 @@ // No obvious license attached +#import <Foundation/Foundation.h> + /** Convert RFC1123 format dates - */ @interface NSDate (RFC1123)
Add explicit Foundation import to NSDate extension (for spm compatibility)
mit
thecatalinstan/Criollo,thecatalinstan/Criollo,thecatalinstan/Criollo
9dc95fbb934b842c8c055541d727477eb5de8d44
// RUN: %clang_scs %s -o %t // RUN: %run %t // Basic smoke test for the runtime #include "libc_support.h" #include "minimal_runtime.h" int scs_main(void) { scs_fputs_stdout("In main.\n"); return 0; }
// RUN: %clang_scs -D INCLUDE_RUNTIME %s -o %t // RUN: %run %t // RUN: %clang_scs %s -o %t // RUN: not --crash %run %t // Basic smoke test for the runtime #include "libc_support.h" #ifdef INCLUDE_RUNTIME #include "minimal_runtime.h" #else #define scs_main main #endif int scs_main(void) { scs_fputs_stdout("In mai...
--- +++ @@ -1,18 +1,10 @@ -// RUN: %clang_scs -D INCLUDE_RUNTIME %s -o %t +// RUN: %clang_scs %s -o %t // RUN: %run %t - -// RUN: %clang_scs %s -o %t -// RUN: not --crash %run %t // Basic smoke test for the runtime #include "libc_support.h" - -#ifdef INCLUDE_RUNTIME #include "minimal_runtime.h" -#else -#defin...
[scs] Disable negative test in shadowcallstack. The test checks that scs does NOT work correctly w/o runtime support. That's a strange thing to test, and it is also flaky, because things may just work if x18 happens to point to a writable page. git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@335982 91177308-0d34...
apache-2.0
llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt
06a3c0baea19e5ff295b34943fcec9609a686952
#include <stdlib.h> #include <check.h> #include "../src/roman_calculator.h" void verify_addition(const char *left, const char *right, const char *expected_result) { char *actual_result = roman_calculator_add(left, right); ck_assert_msg( strcmp(expected_result, actual_result) == 0, "%s + %s: expected %s, but w...
#include <stdlib.h> #include <check.h> #include "../src/roman_calculator.h" void verify_addition(const char *left, const char *right, const char *expected_result) { char *actual_result = roman_calculator_add(left, right); ck_assert_msg( strcmp(expected_result, actual_result) == 0, "%s + %s: expected %s, but w...
--- +++ @@ -22,9 +22,19 @@ } END_TEST +START_TEST(can_add_by_concatenation) +{ + verify_addition("X", "I", "XI"); + verify_addition("MCX", "XV", "MCXXV"); + verify_addition("DCI", "II", "DCIII"); + verify_addition("LX", "XVI", "LXXVI"); +} +END_TEST + TCase *addition_tests() { TCase *test_case = tcase_create(...
Add clarifying test about addition by concatenation It doesn't just apply to repeating the same numeral.
mit
greghaskins/roman-calculator.c
1bf18c373e240b9a3f00e48084796a131171d19f
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Performs conv a...
/* * This file is part of libFirm. * Copyright (C) 2012 University of Karlsruhe. */ /** * @file * @brief Implements several optimizations for IA32. * @author Christian Wuerdig */ #ifndef FIRM_BE_IA32_IA32_OPTIMIZE_H #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" /** * Prepares irg fo...
--- +++ @@ -12,11 +12,6 @@ #define FIRM_BE_IA32_IA32_OPTIMIZE_H #include "firm_types.h" - -/** - * Prepares irg for codegeneration. - */ -void ia32_pre_transform_phase(ir_graph *irg); /** * Performs conv and address mode optimizations.
ia32: Remove stale declaration of 'ia32_pre_transform_phase()'. This function was deleted in 2007!
lgpl-2.1
jonashaag/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,jonashaag/libfirm,jonashaag/libfirm,MatzeB/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,libfirm/libfirm,MatzeB/libfirm,libfirm/libfirm,jonashaag/libfirm,MatzeB/libfirm,MatzeB/libfirm
ef8f03fe761ede729d5e1ee93f70ae6c40994bad
#include <stdio.h> #include <time.h> #include <stdlib.h> int check_date(struct tm *date, time_t time, char *name) { if( date == NULL ) { printf("%s(%lld) returned null\n", name, (long long)time); return 1; } else { printf("%s(%lld): %s\n", name, (long long)time, asctime(date)); ...
#include <stdio.h> #include <time.h> #include <stdlib.h> int check_date(struct tm *date, time_t time, char *name) { if( date == NULL ) { printf("%s(%lld) returned null\n", name, (long long)time); return 1; } else { printf("%s(%lld): %s\n", name, (long long)time, asctime(date)); ...
--- +++ @@ -25,6 +25,8 @@ return 1; } + printf("sizeof time_t: %ld, tm.tm_year: %ld\n", sizeof(time_t), sizeof(gmdate->tm_year)); + number = strtoll(argv[1], NULL, 0); time = (time_t)number;
Print out the size of time_t and tm.tm_year for debugging porpuses.
mit
chromatic/y2038,chromatic/y2038,evalEmpire/y2038,bulk88/y2038,schwern/y2038,chromatic/y2038,foxtacles/y2038,foxtacles/y2038,bulk88/y2038,bulk88/y2038,evalEmpire/y2038,schwern/y2038
c68037fdc18d4dade36611a4a93dcc3fbbcfa045
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-2013 ARM Limited * * 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 re...
/* CMSIS-DAP Interface Firmware * Copyright (c) 2009-2013 ARM Limited * * 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 re...
--- +++ @@ -21,7 +21,7 @@ // built for bootloader 1xxx //#define FW_BUILD "1203" // build for bootloader 0xxx -#define FW_BUILD "0226" +#define FW_BUILD "0227" void update_html_file(uint8_t *buf, uint32_t bufsize); uint8_t * get_uid_string (void);
Increment FW_BUILD. Initial release for kl26z_nrf51822_if with CDC support
apache-2.0
sg-/DAPLink,google/DAPLink-port,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port,sg-/DAPLink,google/DAPLink-port
e98d0be00b0694bb4480cbc1e2aac77cd1b57cd5
// Copyright 2017, Jeffrey E. Bedard #include "text_widget.h" #include "XSTextWidget.h" #include "config.h" #include "font.h" #include "xdata.h" short xstatus_draw_text_widget(struct XSTextWidget * widget) { xcb_connection_t * xc = widget->connection; struct JBDim font_size = xstatus_get_font_size(); xcb_image_text_...
// Copyright 2017, Jeffrey E. Bedard #include "text_widget.h" #include "XSTextWidget.h" #include "font.h" #include "xdata.h" short xstatus_draw_text_widget(struct XSTextWidget * widget) { xcb_connection_t * xc = widget->connection; struct JBDim font_size = xstatus_get_font_size(); xcb_image_text_8(xc, widget->buffer...
--- +++ @@ -1,6 +1,7 @@ // Copyright 2017, Jeffrey E. Bedard #include "text_widget.h" #include "XSTextWidget.h" +#include "config.h" #include "font.h" #include "xdata.h" short xstatus_draw_text_widget(struct XSTextWidget * widget) @@ -10,5 +11,6 @@ xcb_image_text_8(xc, widget->buffer_size, xstatus_get_window(...
Include configured padding in offset calculation.
mit
jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus
2044a19198c1a178b0994ece8db9286099586ed4
// Copyright 2015 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 BROWSER_BRIGHTRAY_PATHS_H_ #define BROWSER_BRIGHTRAY_PATHS_H_ #include "base/compiler_specific.h" #if defined(OS_WIN) #include "base/base_paths_...
// Copyright 2015 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 BROWSER_BRIGHTRAY_PATHS_H_ #define BROWSER_BRIGHTRAY_PATHS_H_ #include "base/compiler_specific.h" #if defined(OS_WIN) #include "base/base_paths_...
--- +++ @@ -20,7 +20,7 @@ namespace brightray { enum { - PATH_START = 1000, + PATH_START = 11000, DIR_USER_DATA = PATH_START, // Directory where user data can be written. DIR_USER_CACHE, // Directory where user cache can be written.
Change our PATH_START to 11000
mit
atom/brightray,bbondy/brightray,brave/brightray,atom/brightray,brave/brightray,bbondy/brightray
8b6c24dce25e743ceecd06d1c175c1cf8b91627b
// // log_thread.h // #ifndef log_thread_h #define log_thread_h #include "queue_atomic.h" struct log_thread; typedef std::shared_ptr<log_thread> log_thread_ptr; #define LOG_BUFFER_SIZE 1024 struct log_thread : std::thread { static const bool debug; static const int flush_inter...
// // log_thread.h // #ifndef log_thread_h #define log_thread_h #include "queue_atomic.h" struct log_thread; typedef std::shared_ptr<log_thread> log_thread_ptr; #define LOG_BUFFER_SIZE 1024 struct log_thread : std::thread { static const bool debug; static const int flush_inter...
--- +++ @@ -24,10 +24,10 @@ time_t last_time; std::atomic<bool> running; std::atomic<bool> writer_waiting; - std::thread thread; std::mutex log_mutex; std::condition_variable log_cond; ...
Fix thread initialisation race (thread sanitizer)
isc
metaparadigm/latypus,metaparadigm/latypus,metaparadigm/latypus,metaparadigm/latypus
59e44a3ff36e0a67cd39c8e3149d2fdaa089b7d4
#if (PAGE_SIZE == 4096) CACHE(32) #endif CACHE(64) #if L1_CACHE_BYTES < 64 CACHE(96) #endif CACHE(128) #if L1_CACHE_BYTES < 128 CACHE(192) #endif CACHE(256) CACHE(512) CACHE(1024) CACHE(2048) CACHE(4096) CACHE(8192) CACHE(16384) CACHE(32768) CACHE(65536) CACHE(131072) #if (NR_CPUS > 512) || (MAX_NUMNODES...
#if (PAGE_SIZE == 4096) CACHE(32) #endif CACHE(64) #if L1_CACHE_BYTES < 64 CACHE(96) #endif CACHE(128) #if L1_CACHE_BYTES < 128 CACHE(192) #endif CACHE(256) CACHE(512) CACHE(1024) CACHE(2048) CACHE(4096) CACHE(8192) CACHE(16384) CACHE(32768) CACHE(65536) CACHE(131072) #ifndef CONFIG_MMU CACHE(262144) C...
--- +++ @@ -19,8 +19,10 @@ CACHE(32768) CACHE(65536) CACHE(131072) +#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) + CACHE(262144) +#endif #ifndef CONFIG_MMU - CACHE(262144) CACHE(524288) CACHE(1048576) #ifdef CONFIG_LARGE_ALLOCS
[PATCH] Increase max kmalloc size for very large systems Systems with extemely large numbers of nodes or cpus need to kmalloc structures larger than is currently supported. This patch increases the maximum supported size for very large systems. This patch should have no effect on current systems. (akpm: why not jus...
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,Krist...
a615fa83959896f8eac76c235953fb164cd1a9b9
// // Copyleft RIME Developers // License: GPLv3 // // 2011-03-14 GONG Chen <chen.sst@gmail.com> // #ifndef RIME_COMMON_H_ #define RIME_COMMON_H_ #include <memory> #include <utility> #define BOOST_BIND_NO_PLACEHOLDERS #include <boost/signals2/connection.hpp> #include <boost/signals2/signal.hpp> #ifdef RIME_ENABLE_LOG...
// // Copyleft RIME Developers // License: GPLv3 // // 2011-03-14 GONG Chen <chen.sst@gmail.com> // #ifndef RIME_COMMON_H_ #define RIME_COMMON_H_ #include <memory> #include <utility> #define BOOST_BIND_NO_PLACEHOLDERS #include <boost/signals2/connection.hpp> #include <boost/signals2/signal.hpp> #ifdef RIME_ENABLE_LOG...
--- +++ @@ -17,7 +17,7 @@ #include <glog/logging.h> #else #include "no_logging.h" -#endif // RIME_ENABLE_LOGGGING +#endif // RIME_ENABLE_LOGGING namespace rime {
Fix a typo in the comment.
bsd-3-clause
kionz/librime,j717273419/librime,kionz/librime,bygloam/librime,rime/librime,rime/librime,jakwings/librime,bygloam/librime,bygloam/librime,j717273419/librime,rwduzhao/librime,Prcuvu/librime,Prcuvu/librime,j717273419/librime,rwduzhao/librime,rwduzhao/librime,kionz/librime,jakwings/librime,Prcuvu/librime,jakwings/librime,...
f16b686efbe6bfe50c1fbb3c5b318c279fc16ec0
#define _XOPEN_SOURCE 500 #include <unistd.h> #include <stdlib.h> char *os_find_self(void) { // PATH_MAX (used by readlink(2)) is not necessarily available size_t size = 2048, used = 0; char *path = NULL; do { size *= 2; path = realloc(path, size); used = readlink("/proc/self/ex...
#define _XOPEN_SOURCE 500 #include <unistd.h> #include <stdlib.h> char *os_find_self(void) { // PATH_MAX (used by readlink(2)) is not necessarily available size_t size = 2048, used = 0; char *path = NULL; do { size *= 2; path = realloc(path, size); used = readlink("/proc/self/ex...
--- +++ @@ -11,7 +11,8 @@ size *= 2; path = realloc(path, size); used = readlink("/proc/self/exe", path, size); - } while (used > size && path != NULL); + path[used - 1] = '\0'; + } while (used >= size && path != NULL); return path; }
Mend loop condition from 344aae0
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr
387ec6864a25317ff45f9001809c4752047e2637
#include <jemalloc.h> int main(int argc, char** argv) { void *volatile dummyPtr = malloc(42); (void)argv; return argc; }
#include <jemalloc.h> int main(int argc, char** argv) { (void)argv; return argc + (int)(malloc(42)); }
--- +++ @@ -1,6 +1,7 @@ #include <jemalloc.h> int main(int argc, char** argv) { + void *volatile dummyPtr = malloc(42); (void)argv; - return argc + (int)(malloc(42)); + return argc; }
[CMAKE] Fix a -Wpointer-to-int-cast when searching Jemalloc Summary: This would trigger failures when `-Werror` is enabled, such as: https://build.bitcoinabc.org/viewLog.html?tab=buildLog&logTab=tree&filter=debug&expand=all&buildId=66573&guest=1#footer Test Plan: cmake -GNinja .. \ -DUSE_JEMALLOC_EXPERIMENTAL=O...
mit
cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,cculianu/bitcoin-abc,cculianu/bitcoin-abc,cculianu/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc,Bitcoin-ABC/bitcoin-abc...
c9df2beb473f7461797074c51789761e0dbc1567
/* * the continuation data assigned to each request along side with the functions * to manipulate them * * Vmon: June 2013 */ #ifndef BANJAX_CONTINUATION_H #define BANJAX_CONTINUATION_H #include "banjax.h" #include "banjax_filter.h" #include "transaction_muncher.h" class Banjax; class TransactionData{ public: ...
/* * the continuation data assigned to each request along side with the functions * to manipulate them * * Vmon: June 2013 */ #ifndef BANJAX_CONTINUATION_H #define BANJAX_CONTINUATION_H #include "banjax.h" #include "banjax_filter.h" #include "transaction_muncher.h" class Banjax; class TransactionData{ public: ...
--- +++ @@ -15,14 +15,6 @@ class TransactionData{ public: - std::shared_ptr<Banjax> banjax; - TSHttpTxn txnp; - - TransactionMuncher transaction_muncher; - FilterResponse response_info; - - ~TransactionData(); - /** Constructor to set the default values */ @@ -35,11 +27,19 @@ static int ha...
Make TransactionData member vars private
agpl-3.0
equalitie/banjax,equalitie/banjax,equalitie/banjax,equalitie/banjax,equalitie/banjax
d49604b9ed52928f8a3b31cc560692f130928014
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -emit-llvm-bc -o %t.bc %s // RUN: %clang_cc1 -triple i386-pc-linux-gnu -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NO-BC %s // RUN: not %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o -...
// RUN: %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -emit-llvm-bc -o %t.bc %s // RUN: %clang_cc1 -triple i386-pc-linux-gnu -mlink-bitcode-file %t.bc -O3 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NO-BC %s // RUN: not %clang_cc1 -triple i386-pc-linux-gnu -DBITCODE -mlink-bitcode-file %t.bc -O3 -emit-llvm -o -...
--- +++ @@ -6,7 +6,7 @@ #ifdef BITCODE -// CHECK-BC: 'f': symbol multiply defined +// CHECK-BC: fatal error: cannot link module {{.*}}'f': symbol multiply defined int f(void) { return 42; }
Make this test a bit stricter by checking clang's output too. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@220604 91177308-0d34-0410-b5e6-96231b3b80d8
apache-2.0
apple/swift-clang,apple/swift-clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl...
b3dff4d84df5f1b4b0ad59ac760c32f531321d32
/* * This file is part of libbdplus * Copyright (C) 2015 VideoLAN * * 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 la...
/* * This file is part of libbdplus * Copyright (C) 2015 VideoLAN * * 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 la...
--- +++ @@ -20,10 +20,9 @@ #ifndef FILE_DEFAULT_H_ #define FILE_DEFAULT_H_ -#include "filesystem.h" - #include "util/attributes.h" -BD_PRIVATE BDPLUS_FILE_H *file_open_default(void *root_path, const char *file_name); +struct bdplus_file; +BD_PRIVATE struct bdplus_file *file_open_default(void *root_path, const ...
Replace include with forward declaration
lgpl-2.1
ShiftMediaProject/libbdplus,ShiftMediaProject/libbdplus,ShiftMediaProject/libbdplus
b9be70ddceebc4b6a9eff29a72bd680e10e091c7
#include <gst/gst.h> #include "kms-core.h" static GstElement *pipe = NULL; static G_LOCK_DEFINE(mutex); static gboolean init = FALSE; static gpointer gstreamer_thread(gpointer data) { GMainLoop *loop; loop = g_main_loop_new(NULL, TRUE); g_main_loop_run(loop); return NULL; } void kms_init(gint *argc, gchar **argv...
#include <gst/gst.h> #include "kms-core.h" static GstElement *pipe = NULL; static G_LOCK_DEFINE(mutex); static gboolean init = FALSE; static gboolean bus_watch(GstBus *bus, GstMessage *message, gpointer data) { KMS_LOG_DEBUG("TODO: implement bus watcher\n"); return TRUE; } void kms_init(gint *argc, gchar **argv[])...
--- +++ @@ -5,10 +5,12 @@ static G_LOCK_DEFINE(mutex); static gboolean init = FALSE; -static gboolean -bus_watch(GstBus *bus, GstMessage *message, gpointer data) { - KMS_LOG_DEBUG("TODO: implement bus watcher\n"); - return TRUE; +static gpointer +gstreamer_thread(gpointer data) { + GMainLoop *loop; + loop = g_mai...
Make all bus events to be signals
lgpl-2.1
shelsonjava/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,todotobe1/kurento-media-server,lulufei/kurento-media-server,TribeMedia/kurento-media-server,shelsonjava/kurento-media-server,Kurento/kurento-media-server,lulufei/kurento-media-server,mparis/kurento-media-server,Kurento/kurento-m...
aad15687e0b91cba541cb939df092a15dbf43ae5
/* -------------------------------------------------------------------------- * Name: errors.h * Purpose: Error type and constants * ----------------------------------------------------------------------- */ #ifndef ERRORS_H #define ERRORS_H typedef unsigned long int error; /* Generic errors */ #define error_...
/* -------------------------------------------------------------------------- * Name: errors.h * Purpose: Error type and constants * ----------------------------------------------------------------------- */ #ifndef ERRORS_H #define ERRORS_H typedef unsigned long int error; #define error_OK 0 ...
--- +++ @@ -8,25 +8,34 @@ typedef unsigned long int error; -#define error_OK 0 -#define error_EXISTS 1 -#define error_NOT_FOUND 2 -#define error_OOM 3 -#define error_STOP_WALK 4 -#define error_CLASHES 5 /* key would clash with existi...
Make error constants unsigned longs.
bsd-2-clause
dpt/Containers,dpt/Containers
44f9fbcddec64b7c43f7882ab58c8f23007a44d0
// @(#)root/sqlite: // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
// @(#)root/sqlite:$Id$ // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013 /************************************************************************* * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
--- +++ @@ -1,4 +1,4 @@ -// @(#)root/sqlite:$Id$ +// @(#)root/sqlite: // Author: o.freyermuth <o.f@cern.ch>, 01/06/2013 /************************************************************************* @@ -9,8 +9,8 @@ * For the list of contributors see $ROOTSYS/README/CREDITS. * *************************...
Fix fatal typo in code guard
lgpl-2.1
tc3t/qoot,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot,Dr15Jones/root,tc3t/qoot,Dr15Jones/root,tc3t/qoot,Dr15Jones/root,Dr15Jones/root,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,kirbyherm/root-r-tools,kirbyherm/root-r-tools,tc3t/qoot,tc3t/qoot,kirbyherm/root-r-tools,Dr15Jones/root,Dr15Jones/root,kirbyherm/root-r-too...
9e868196a26d39cd38f1f2b07876ffcea5037076
// [zooey, 2005]: made MTextAddon really an abstract class //================================================================== // MTextAddOn.h // Copyright 1996 Metrowerks Corporation, All Rights Reserved. //================================================================== // This is a proxy class used by Editor add...
//================================================================== // MTextAddOn.h // Copyright 1996 Metrowerks Corporation, All Rights Reserved. //================================================================== // This is a proxy class used by Editor add_ons. It does not inherit from BView // but provides an ab...
--- +++ @@ -1,3 +1,4 @@ +// [zooey, 2005]: made MTextAddon really an abstract class //================================================================== // MTextAddOn.h // Copyright 1996 Metrowerks Corporation, All Rights Reserved. @@ -5,45 +6,40 @@ // This is a proxy class used by Editor add_ons. It does not i...
Replace BeIDE header by the Pe version We won't be building for BeIDE anyway...
mit
mmuman/dontworry,mmuman/dontworry
6d5fabbdb3b2f9e81ad75c93c0b238fa0a6e14fa
#include "modlib.h" uint16_t MODBUSSwapEndian( uint16_t Data ) { //Change big-endian to little-endian and vice versa uint8_t Swap; //Create 2 bytes long union union Conversion { uint16_t Data; uint8_t Bytes[2]; } Conversion; //Swap bytes Conversion.Data = Data; Swap = C...
#include "modlib.h" uint16_t MODBUSSwapEndian( uint16_t Data ) { //Change big-endian to little-endian and vice versa unsigned char Swap; //Create 2 bytes long union union Conversion { uint16_t Data; unsigned char Bytes[2]; } Conversion; //Swap bytes Conversion.Data = Data; ...
--- +++ @@ -4,13 +4,13 @@ { //Change big-endian to little-endian and vice versa - unsigned char Swap; + uint8_t Swap; //Create 2 bytes long union union Conversion { uint16_t Data; - unsigned char Bytes[2]; + uint8_t Bytes[2]; } Conversion; //Swap bytes @@ -2...
Change 'unsigned character' type variables to 'uint8_t'
mit
Jacajack/modlib
19faea809ec3ea8a9722b0e87bb028fd23c721a1
/*===- count.c - The 'count' testing tool ---------------------------------===*\ * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * \*===-------------------------------------------------------...
/*===- count.c - The 'count' testing tool ---------------------------------===*\ * * The LLVM Compiler Infrastructure * * This file is distributed under the University of Illinois Open Source * License. See LICENSE.TXT for details. * \*===-------------------------------------------------------...
--- +++ @@ -26,13 +26,15 @@ } NumLines = 0; - while ((NumRead = fread(Buffer, 1, sizeof(Buffer), stdin))) { + do { unsigned i; + + NumRead = fread(Buffer, 1, sizeof(Buffer), stdin); for (i = 0; i != NumRead; ++i) if (Buffer[i] == '\n') ++NumLines; - } + } while (NumRead == s...
Fix extra fread after EOF, non-wires-crossed version. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@105270 91177308-0d34-0410-b5e6-96231b3b80d8
bsd-2-clause
dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm...
c6e1f67b17b4cb9d707af1245c1ecf00f91f23c0
#include <stdlib.h> #include <stdio.h> int main(int argc, char ** argv){ printf("Test\n"); void* test = malloc(1024*1024); if(test > 0){ printf("Malloc\n"); free(test); printf("Free\n"); }else{ printf("Malloc Failed\n"); } return 0; }
#include <stdio.h> int main(int argc, char ** argv){ printf("Test\n"); return 0; }
--- +++ @@ -1,6 +1,15 @@ +#include <stdlib.h> #include <stdio.h> int main(int argc, char ** argv){ printf("Test\n"); + void* test = malloc(1024*1024); + if(test > 0){ + printf("Malloc\n"); + free(test); + printf("Free\n"); + }else{ + printf("Malloc Failed\n"); + } ...
WIP: Fix bugs with libc, executor
mit
redox-os/libc,redox-os/libc,redox-os/libc
38bcd605bc3a57bf3bd354826e16e41d74d87933
// mat_x num of rows equals to // mat_a num of rows #define A_ROWS 3 #define X_ROWS 3 // mat_x num of cols equals to // mat_b num of cols #define B_COLS 3 #define X_COLS 3 // mat_a num of cols should be equals to // mat_b num of rows #define A_COLS 2 #define B_ROWS 2 #include <stdio.h> // #include <mpi.h> void print_...
#include <stdio.h> #include <mpi.h> int main(int argc, char *argv[]) { int numprocs, rank, namelen; char processor_name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Get_processor_name(processor_name, &namelen); // T...
--- +++ @@ -1,17 +1,71 @@ +// mat_x num of rows equals to +// mat_a num of rows +#define A_ROWS 3 +#define X_ROWS 3 +// mat_x num of cols equals to +// mat_b num of cols +#define B_COLS 3 +#define X_COLS 3 +// mat_a num of cols should be equals to +// mat_b num of rows +#define A_COLS 2 +#define B_ROWS 2 + #include ...
Add matrix multiplication code in C
mit
arthurazs/uff-lpp,arthurazs/uff-lpp,arthurazs/uff-lpp
fee172d7eafd98a5df3c251ed5065f9e91eb4b2a
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
--- +++ @@ -21,13 +21,13 @@ namespace swift { /// Returns the minimum of `a` and `b`, or `a` if they are equivalent. template <typename T> - constexpr const T& min(const T &a, const T &b) { + constexpr const T &min(const T &a, const T &b) { return !(b < a) ? a : b; } /// Returns the maximum of...
Fix methods return type ampersand location (NFC)
apache-2.0
hughbe/swift,ken0nek/swift,SwiftAndroid/swift,glessard/swift,djwbrown/swift,swiftix/swift,tjw/swift,austinzheng/swift,manavgabhawala/swift,allevato/swift,therealbnut/swift,xedin/swift,arvedviehweger/swift,aschwaighofer/swift,shajrawi/swift,zisko/swift,ahoppen/swift,OscarSwanros/swift,JaSpa/swift,parkera/swift,swiftix/s...
0c84db950784ba4dd56f92220419490faff1f915
#include "h_iconv.h" // Wrapper functions, since iconv_open et al are macros in libiconv. iconv_t h_iconv_open(const char *tocode, const char *fromcode) { return iconv_open(tocode, fromcode); } void h_iconv_close(iconv_t cd) { iconv_close(cd); } size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, ...
#include "h_iconv.h" // Wrapper functions, since iconv_open et al are macros in libiconv. iconv_t h_iconv_open(const char *tocode, const char *fromcode) { return iconv_open(tocode, fromcode); } void h_iconv_close(iconv_t cd) { iconv_close(cd); } size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, ...
--- +++ @@ -11,5 +11,8 @@ size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) { + // Cast inbuf to (void*) so that it works both on Solaris, which expects + // a (const char**), and on other platforms (e.g. Linux), which expect + // a (char *...
Add a comment explaining why iconv needs a (void*) for its parameter.
bsd-3-clause
judah/haskeline,ghc/packages-haskeline,leroux/packages-haskeline,ghc/packages-haskeline,judah/haskeline
f26f972cf79bc911fd3997d903128b7aac8b1677
/* * PBKDF2 * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_PBKDF2_H__ #define BOTAN_PBKDF2_H__ #include <botan/pbkdf.h> #include <botan/mac.h> namespace Botan { /** * PKCS #5 PBKDF2 */ class BOTAN_DLL PKCS5_PBKDF2 : public PBKDF { public: std::string nam...
/* * PBKDF2 * (C) 1999-2007 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_PBKDF2_H__ #define BOTAN_PBKDF2_H__ #include <botan/pbkdf.h> #include <botan/mac.h> namespace Botan { /** * PKCS #5 PBKDF2 */ class BOTAN_DLL PKCS5_PBKDF2 : public PBKDF { public: std::string nam...
--- +++ @@ -36,9 +36,9 @@ /** * Create a PKCS #5 instance using the specified message auth code - * @param mac the MAC to use + * @param mac_fn the MAC to use */ - PKCS5_PBKDF2(MessageAuthenticationCode* m) : mac(m) {} + PKCS5_PBKDF2(MessageAuthenticationCode* mac_fn) : mac(...
Fix Doxygen comment in PBKDF2 constructor
bsd-2-clause
Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecuri...
7777019a00df754e5e61f8d26af86014a02f8f92
#pragma once #include <string> #include <sstream> #include <Eigen/Dense> std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) { std::stringstream ss; ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl; return ss.str(); } /* * allclose() function to match nump...
#pragma once #include <string> #include <sstream> #include <Eigen/Dense> std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) { std::stringstream ss; ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl; return ss.str(); }
--- +++ @@ -8,3 +8,20 @@ ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl; return ss.str(); } + +/* + * allclose() function to match numpy.allclose + * https://stackoverflow.com/questions/15051367/how-to-compare-vectors-approximately-in-eige://stackoverflow.com/questions/15051367/how...
Add allclose function for testing Compare relative and absolute tolerence of matrix elements. Eigen isApprox() functions compare matrix norms.
bsd-2-clause
oliverlee/bicycle,oliverlee/bicycle
fdeab35e4997c16515efea32d97845786d373990
#include <jni.h> #include <signal.h> #include <android/log.h> #define CATCHSIG(X) sigaction(X, &handler, &old_sa[X]) static struct sigaction old_sa[NSIG]; void android_sigaction(int signal, siginfo_t *info, void *reserved) { // TODO invoke java method } JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserv...
#include <jni.h> #include <android/log.h> JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { __android_log_print(ANDROID_LOG_VERBOSE, "Scavenger Jni", "JNI_OnLoad is called"); }
--- +++ @@ -1,7 +1,27 @@ #include <jni.h> +#include <signal.h> #include <android/log.h> + +#define CATCHSIG(X) sigaction(X, &handler, &old_sa[X]) + +static struct sigaction old_sa[NSIG]; + +void android_sigaction(int signal, siginfo_t *info, void *reserved) { + // TODO invoke java method +} JNIEXPORT jint JNI...
Add jni code to catch crash signal
apache-2.0
Shunix/Scavenger,Shunix/Scavenger
0d91ee8a0d9b26e4847ce5724a08a0d5160b38e8
char* file_to_buffer(const char *filename) { struct stat sb; stat(filename, &sb); char *buffer = (char*) malloc(sb.st_size * sizeof(char)); FILE *f = fopen(filename, "rb"); assert(fread((void*) buffer, sizeof(char), sb.st_size, f)); fclose(f); return buffer; } void* mmalloc(size_t sz, char ...
char* file_to_buffer(const char *filename) { struct stat sb; stat(filename, &sb); char *buffer = (char*) malloc(sb.st_size * sizeof(char)); FILE *f = fopen(filename, "rb"); assert(fread((void*) buffer, sizeof(char), sb.st_size, f)); fclose(f); return buffer; }
--- +++ @@ -7,3 +7,15 @@ fclose(f); return buffer; } + +void* mmalloc(size_t sz, char *filename) { + int fd = open(filename, O_RDWR | O_CREAT, 0666); + assert(fd != -1); + char v = 0; + for (size_t i = 0; i < sz; i++) { + assert(write(fd, &v, sizeof(char))); + } + void *map = mmap(...
Implement dirty unallocatable memory mapped alloc.
mit
frostburn/tinytsumego,frostburn/tinytsumego
9075cf1aa531252ffd4b97bddcbc4ca702da5436
#include <kotaka/paths.h> #include <kotaka/log.h> #include "~/test.h" #include <status.h> static void create() { } void ignite(int count) { call_out("bomb", 0, count); } void touchall() { int i; LOGD->post_message("test", LOG_INFO, "Beginning touch"); call_out("do_touch", 0, status(ST_OTABSIZE) - 1); } stati...
#include <kotaka/paths.h> #include <kotaka/log.h> #include "~/test.h" #include <status.h> static void create() { } void ignite(int count) { call_out("bomb", 0, count); } static void bomb(int quota) { int max; max = (int)sqrt((float)quota); if (quota % max != 0) { max = quota % max; } if (max > quota) { ...
--- +++ @@ -13,21 +13,47 @@ call_out("bomb", 0, count); } +void touchall() +{ + int i; + + LOGD->post_message("test", LOG_INFO, "Beginning touch"); + + call_out("do_touch", 0, status(ST_OTABSIZE) - 1); +} + +static void do_touch(int quota) +{ + int limit; + + limit = 1024; + + if (quota % limit != 0) { + limit ...
Add call_touch to game test
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
83cf9c9d6a93e0a651547662d556da840bf66b98
#ifndef ALCOMPLEX_H #define ALCOMPLEX_H #include <complex> #include "alspan.h" /** * Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is * FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier * Transform (DFT) of the time domain data stored in the buffer. The buffer is *...
#ifndef ALCOMPLEX_H #define ALCOMPLEX_H #include <complex> #include "alspan.h" /** * Iterative implementation of 2-radix FFT (In-place algorithm). Sign = -1 is * FFT and 1 is iFFT (inverse). Fills the buffer with the Discrete Fourier * Transform (DFT) of the time domain data stored in the buffer. The buffer is *...
--- +++ @@ -17,7 +17,8 @@ * Calculate the complex helical sequence (discrete-time analytical signal) of * the given input using the discrete Hilbert transform (In-place algorithm). * Fills the buffer with the discrete-time analytical signal stored in the - * buffer. The buffer is an array of complex numbers and...
Add a note about clearing complex_hilbert's imaginary input
lgpl-2.1
aaronmjacobs/openal-soft,aaronmjacobs/openal-soft
b212ab9ea21a093ba8fa9895e723bc76b84cf284
/* Chrome Linux plugin * * This software is released under either the GNU Library General Public * License (see LICENSE.LGPL). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2.1, February 1999 */ #ifndef LABELS...
/* Chrome Linux plugin * * This software is released under either the GNU Library General Public * License (see LICENSE.LGPL). * * Note that the only valid version of the LGPL license as far as this * project is concerned is the original GNU Library General Public License * Version 2.1, February 1999 */ #ifndef LABELS...
--- +++ @@ -25,8 +25,8 @@ class Labels { private: int selectedLanguage; - std::map<std::string,std::string[3]> labels; - std::map<int,std::string[3]> errors; + std::map<std::string,std::vector<std::string> > labels; + std::map<int,std::vector<std::string> > errors; std::map<std::string, int> languages; void ...
Fix GCC bug based code (allows to compile with clang)
lgpl-2.1
metsma/chrome-token-signing,cristiano-andrade/chrome-token-signing,cristiano-andrade/chrome-token-signing,fabiorusso/chrome-token-signing,cristiano-andrade/chrome-token-signing,metsma/chrome-token-signing,metsma/chrome-token-signing,fabiorusso/chrome-token-signing,fabiorusso/chrome-token-signing,cristiano-andrade/chrom...
edcfd59b7b9e3e114ba66b552a1cca48b7365008
//===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=// // // This file contains the declarations of all of the Binary Operator classes. // //===----------------------------------------------------------------------===// #ifndef LLVM_IBINARY_H #define LLVM_IBINARY_H #include "llvm/InstrTypes....
//===-- llvm/iBinary.h - Binary Operator node definitions --------*- C++ -*--=// // // This file contains the declarations of all of the Binary Operator classes. // //===----------------------------------------------------------------------===// #ifndef LLVM_IBINARY_H #define LLVM_IBINARY_H #include "llvm/InstrTypes....
--- +++ @@ -16,25 +16,17 @@ // All of these classes are subclasses of the BinaryOperator class... // -class AddInst : public BinaryOperator { +class GenericBinaryInst : public BinaryOperator { + const char *OpcodeString; public: - AddInst(Value *S1, Value *S2, const string &Name = "") - : BinaryOperator(I...
Make a new GenericBinaryInst class, instead of providing lots of silly little classes. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@82 91177308-0d34-0410-b5e6-96231b3b80d8
bsd-2-clause
dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymagg...
9af81a685e627783b65a9346fa02270a5b59b304
#include "ug_thread_safe_counter.h" #pragma once // obsolete once intrusive_ref_counter is available everywhere namespace Moses { class reference_counter { public: friend void intrusive_ptr_add_ref(reference_counter const* p) { if (p) ++p->m_refcount; } friend void intrusive_ptr_release(re...
#include "ug_thread_safe_counter.h" #pragma once // obsolete once intrusive_ref_counter is available everywhere namespace Moses { class reference_counter { public: friend void intrusive_ptr_add_ref(reference_counter* p) { if (p) ++p->m_refcount; } friend void intrusive_ptr_release(referenc...
--- +++ @@ -7,11 +7,11 @@ class reference_counter { public: - friend void intrusive_ptr_add_ref(reference_counter* p) + friend void intrusive_ptr_add_ref(reference_counter const* p) { if (p) ++p->m_refcount; } - friend void intrusive_ptr_release(reference_counter* p) + friend voi...
Allow intrusive pointers to const objects.
lgpl-2.1
pjwilliams/mosesdecoder,KonceptGeek/mosesdecoder,tofula/mosesdecoder,pjwilliams/mosesdecoder,pjwilliams/mosesdecoder,KonceptGeek/mosesdecoder,tofula/mosesdecoder,moses-smt/mosesdecoder,alvations/mosesdecoder,KonceptGeek/mosesdecoder,moses-smt/mosesdecoder,pjwilliams/mosesdecoder,alvations/mosesdecoder,hychyc07/mosesdec...
b2a3bd280e31b194b9cff3e44915f6344e959bef
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once...
/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * */ #pragma once...
--- +++ @@ -14,14 +14,15 @@ namespace proxygen { -class MockTimeUtil : public TimeUtil { +template <typename ClockType = std::chrono::steady_clock> +class MockTimeUtilGeneric : public TimeUtilGeneric<ClockType> { public: void advance(std::chrono::milliseconds ms) { t_ += ms; } - void setCurrent...
Expire cached TLS session tickets using tlsext_tick_lifetime_hint Summary: Our current TLS cache in liger does not respect timeout hints. We should start doing that because it will limit certain kinds of attacks if an attacker gets access to a master key. Test Plan: Added new test in SSLSessionPersistentCacheTest to ...
bsd-3-clause
LilMeyer/proxygen,songfj/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,raphaelamorim/proxygen,KublaikhanGeek/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,pueril/proxygen,hongliangzhao/proxygen,raphaelamorim/proxygen,Werror/proxygen,chenmoshushi/proxygen,supriyantomaftuh/proxygen,hiproz/proxygen,jgli/prox...
dfdb3a90d41a8d784e39321f64f2c9cca2bbcfb3
// Copyright (c) 2011 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing projec...
// Copyright (c) 2011 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing projec...
--- +++ @@ -21,4 +21,12 @@ #endif // _WIN32 +// App Version/Identity +namespace webmlive { + +static const char* kClientName = "webmlive client encoder"; +static const char* kClientVersion = "0.0.2.0"; + +} // namespace webmlive + #endif // CLIENT_ENCODER_CLIENT_ENCODER_BASE_H_
Add client name and version constants. Change-Id: Ic5aeafb91ebb9d04ca89679512d3088c612f84e1
bsd-3-clause
kleopatra999/webm.webmlive,kalli123/webm.webmlive,gshORTON/webm.webmlive,reimaginemedia/webm.webmlive,ericmckean/webm.webmlive,kim42083/webm.webmlive,ericmckean/webm.webmlive,Acidburn0zzz/webm.webmlive,Maria1099/webm.webmlive,abwiz0086/webm.webmlive,kleopatra999/webm.webmlive,Acidburn0zzz/webm.webmlive,felipebetancur/w...
ecb1728e6880e9368cc9bbd4ba3a82b47456152a
#pragma once /* Customer Structure */ typedef struct customer { char name[25]; // Customer's name long int accnum; // Customer's Account Number long int balance; // Customer's Balance long long int ccn; // Customer's CCN short int pin; // Customer's PIN } customer; /* Current Logged In Custom...
#pragma once /* Customer Structure */ typedef struct customer { char name[25]; // Customer's name long int accnum; // Customer's Account Number long int balance; // Customer's Balance long long int ccn; // Customer's CCN short int pin; // Customer's PIN } customer; /* Current Logged In Custom...
--- +++ @@ -34,7 +34,7 @@ customer customers[5]; -char char* welcome_message = "********************************\ +const char* welcome_message = "********************************\ *-->Welcome to Bahria Bank!<---*\ ********************************\n";
Fix declaration of welcome message!
mit
saifali96/ATM-Simulator,saifali96/ATM-Simulator
5e35dc73b64ddcb393f291139a394007f6ebb166
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE #undef io_add_notify struct io *io_add_notify(const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(...
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { r...
--- +++ @@ -5,10 +5,10 @@ #ifdef IOLOOP_NOTIFY_NONE -struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, - const char *path __attr_unused__, - io_callback_t *callback __attr_unused__, - void *context __attr_unused__) +#undef io_add_notify +struct io *io_add_notify(const c...
Fix for building without notify
mit
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
9af5280bb7f53ddff998b69ad6007349ffcfeb7c
#ifndef __ASM_SH_FTRACE_H #define __ASM_SH_FTRACE_H #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ #define FTRACE_SYSCALL_MAX NR_syscalls #ifndef __ASSEMBLY__ extern void mcount(void); #define MCOUNT_ADDR ((long)(mcount)) #ifdef CONFIG_DYNAMIC_FTRACE #define CALL_ADDR ((long)(f...
#ifndef __ASM_SH_FTRACE_H #define __ASM_SH_FTRACE_H #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ #define FTRACE_SYSCALL_MAX (NR_syscalls - 1) #ifndef __ASSEMBLY__ extern void mcount(void); #define MCOUNT_ADDR ((long)(mcount)) #ifdef CONFIG_DYNAMIC_FTRACE #define CALL_ADDR ((l...
--- +++ @@ -4,7 +4,7 @@ #ifdef CONFIG_FUNCTION_TRACER #define MCOUNT_INSN_SIZE 4 /* sizeof mcount call */ -#define FTRACE_SYSCALL_MAX (NR_syscalls - 1) +#define FTRACE_SYSCALL_MAX NR_syscalls #ifndef __ASSEMBLY__ extern void mcount(void);
sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX. This is supposed to be the equivalent of __NR_syscalls, not __NR_syscalls -1. The x86 code this was based on had simply fallen out of sync at the time this was implemented. Fix it up now. As a result, tracing of __NR_perf_counter_open works as advertised. Signed-off-by: Pau...
mit
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,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,Krist...
c68e3206862f647117a46a73af76764d750c05bd
/* * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(__strlcpy, __strxfrm) strong_alias(...
/* * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #define L_strlcpy #define Wstrlcpy __strlcpy #include "wstring.c" strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY weak_alias(strlcpy, strxfrm) #endif #undef L_...
--- +++ @@ -12,7 +12,8 @@ strong_alias(__strlcpy, strlcpy) #ifdef __LOCALE_C_ONLY -weak_alias(strlcpy, strxfrm) +weak_alias(__strlcpy, __strxfrm) +strong_alias(__strxfrm, strxfrm) #endif #undef L_strlcpy
Use correct syntax, correct weak/strong for [__]strxfrm
lgpl-2.1
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
3b4851ccd8e04b2db4127ced955cbfecb1e99786
#ifndef _MAIN_H_ #define _MAIN_H_ #define PROGRAM_MAJOR_VERSION 0 #define PROGRAM_MINOR_VERSION 1 #define PROGRAM_PATCH_VERSION 0 #endif /* _MAIN_H_ */
#ifndef _MAIN_H_ #define _MAIN_H_ #define PROGRAM_MAJOR_VERSION 0 #define PROGRAM_MINOR_VERSION 0 #define PROGRAM_PATCH_VERSION 6 #endif /* _MAIN_H_ */
--- +++ @@ -2,8 +2,8 @@ #define _MAIN_H_ #define PROGRAM_MAJOR_VERSION 0 -#define PROGRAM_MINOR_VERSION 0 -#define PROGRAM_PATCH_VERSION 6 +#define PROGRAM_MINOR_VERSION 1 +#define PROGRAM_PATCH_VERSION 0 #endif /* _MAIN_H_ */
Increase game version to 0.1.0.
mit
zear/HomingFever
0d0f6c5793f01a6ef27140ec881d2f5605d5260e
#ifndef SYSSTATS_H #define SYSSTATS_H #include <stdbool.h> #include <ncurses.h> #include <sys/timerfd.h> #include "../util/file_utils.h" #define MAXTOT 16 #define BASE 1024 #define MAXPIDS "/proc/sys/kernel/pid_max" #define MEMFREE "MemAvailable:" #define SECS 60 #define TIME_READ_DEFAULT 0 #define SYS_TIMER_...
#ifndef SYSSTATS_H #define SYSSTATS_H #include <stdbool.h> #include <ncurses.h> #include <sys/timerfd.h> #include "../util/file_utils.h" #define MAXTOT 16 #define BASE 1024 #define MAXPIDS "/proc/sys/kernel/pid_max" #define MEMFREE "MemFree:" #define SECS 60 #define TIME_READ_DEFAULT 0 #define SYS_TIMER_EXPIR...
--- +++ @@ -13,7 +13,7 @@ #define MAXPIDS "/proc/sys/kernel/pid_max" -#define MEMFREE "MemFree:" +#define MEMFREE "MemAvailable:" #define SECS 60
Use MemAvailable for "free mem"
mit
tijko/dashboard
31810dca7c6aec8eaaaf4e690f24d126c7ac917c
#ifndef DASHBOARD_H #define DASHBOARD_H #include <sys/types.h> #include "src/process/process.h" #include "src/system/sys_stats.h" typedef struct { int max_x; int max_y; int prev_x; int prev_y; char *fieldbar; sysaux *system; ps_node *process_list; Tree *process_tree; } Board; vo...
#ifndef DASHBOARD_H #define DASHBOARD_H #include <sys/types.h> #include "src/process/process.h" #include "src/system/sys_stats.h" typedef struct { int max_x; int max_y; int prev_x; int prev_y; char *fieldbar; sysaux *system; ps_node *process_list; Tree *process_tree; } Board; vo...
--- +++ @@ -26,8 +26,6 @@ void update_process_stats(Tree *ps_tree, ps_node *ps, sysaux *sys); -static int calculate_ln_diff(Board *board, int ln, int prev_ln); - Board *init_board(void); void free_board(Board *board);
Remove static declaration of line diff
mit
tijko/dashboard
63eaf55f3ec45366e1ef5dab02f1d98a096d1ea2
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include "greatest.h" TEST standalone_pass(void) { PASS(); } /* Add all the definitions that need to be in the test runner's main file. */ GREATEST_MAIN_DEFS(); int main(int argc, char **argv) { struct greatest_report_t report; (void)argc; (...
#include <stdlib.h> #include <stdio.h> #include <assert.h> #include "greatest.h" TEST standalone_pass(void) { PASS(); } /* Add all the definitions that need to be in the test runner's main file. */ GREATEST_MAIN_DEFS(); int main(int argc, char **argv) { (void)argc; (void)argv; /* Initialize gre...
--- +++ @@ -12,6 +12,7 @@ GREATEST_MAIN_DEFS(); int main(int argc, char **argv) { + struct greatest_report_t report; (void)argc; (void)argv; @@ -24,7 +25,6 @@ printf("\nStandard report, as printed by greatest:\n"); GREATEST_PRINT_REPORT(); - struct greatest_report_t report; ...
Fix warning for mixing declarations and code in ISO C90.
isc
silentbicycle/greatest,silentbicycle/greatest
c2b84152f437e86cc2b55c1cc0bbb35d3fa645b5
/* * Copyright 2016 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * 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 ...
/* * Copyright 2016 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * 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 ...
--- +++ @@ -27,7 +27,8 @@ int rpmErrorCb (rpmlogRec rec, rpmlogCallbackData data) { dE("RPM: %s", rpmlogRecMessage(rec)); - return RPMLOG_EXIT; // don't perform default logging + return RPMLOG_DEFAULT; +} void rpmLibsPreload() {
probes/rpm: Fix erro cb return value We have to use RPMLOG_DEFAULT, because RPMLOG_EXIT cause exit of whole probe.
lgpl-2.1
redhatrises/openscap,OpenSCAP/openscap,mpreisler/openscap,jan-cerny/openscap,mpreisler/openscap,jan-cerny/openscap,ybznek/openscap,jan-cerny/openscap,ybznek/openscap,jan-cerny/openscap,OpenSCAP/openscap,Hexadorsimal/openscap,jan-cerny/openscap,OpenSCAP/openscap,ybznek/openscap,jan-cerny/openscap,Hexadorsimal/openscap,m...
e2ca3c802f97b5ee52f1d15d0e43097a5bef6187
#ifndef COMPAT_H #define COMPAT_H #ifndef HAVE_PLEDGE #include "pledge.h" #endif #ifndef HAVE_STRTONUM #include "strtonum.h" #endif /* Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available */ #ifndef CLOCK_MONOTONIC #define CLOCK_MONOTONIC CLOCK_REALTIME #endif #ifndef timespecsub #define timespecsub(tsp, usp, vsp...
#ifndef COMPAT_H #define COMPAT_H #ifndef HAVE_PLEDGE #include "pledge.h" #endif #ifndef HAVE_STRTONUM #include "strtonum.h" #endif #ifndef timespecsub #define timespecsub(tsp, usp, vsp) \ do { \ (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ i...
--- +++ @@ -7,6 +7,11 @@ #ifndef HAVE_STRTONUM #include "strtonum.h" +#endif + +/* Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available */ +#ifndef CLOCK_MONOTONIC +#define CLOCK_MONOTONIC CLOCK_REALTIME #endif #ifndef timespecsub
Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available.
bsd-2-clause
ansilove/ansilove,ansilove/AnsiLove-C
f00bfc8fa7c73e6c58dc71d2da4555ce1712aef4
#pragma once #include <stdint.h> #include <stdlib.h> #include "ewok.h" enum { N_DIVISIONS = 1<<14 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS]; }; /* Build an index on top of an existing libewok EWAH map. */ extern void ewah_build...
#pragma once #include <stdint.h> #include <stdlib.h> #include "ewok.h" enum { N_DIVISIONS = 65536, LOG2_DIVISIONS = 16 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS]; }; /* Build an index on top of an existing libewok EWAH map. */ e...
--- +++ @@ -4,7 +4,7 @@ #include <stdlib.h> #include "ewok.h" -enum { N_DIVISIONS = 65536, LOG2_DIVISIONS = 16 }; +enum { N_DIVISIONS = 1<<14 }; struct indexed_ewah_map { struct ewah_bitmap *map; size_t bit_from_division[N_DIVISIONS], ptr_from_division[N_DIVISIONS];
Change number of divisions in index to 2^14
mit
ratelle/erl_ip_index,ratelle/erl_ip_index,ratelle/erl_ip_index
1200ec14e9e0ec6b27033f59778c7c4dd6690ca4
/* rwsem-const.h: RW semaphore counter constants. */ #ifndef _SPARC64_RWSEM_CONST_H #define _SPARC64_RWSEM_CONST_H #define RWSEM_UNLOCKED_VALUE 0x00000000 #define RWSEM_ACTIVE_BIAS 0x00000001 #define RWSEM_ACTIVE_MASK 0x0000ffff #define RWSEM_WAITING_BIAS (-0x00010000) #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE...
/* rwsem-const.h: RW semaphore counter constants. */ #ifndef _SPARC64_RWSEM_CONST_H #define _SPARC64_RWSEM_CONST_H #define RWSEM_UNLOCKED_VALUE 0x00000000 #define RWSEM_ACTIVE_BIAS 0x00000001 #define RWSEM_ACTIVE_MASK 0x0000ffff #define RWSEM_WAITING_BIAS 0xffff0000 #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BI...
--- +++ @@ -5,7 +5,7 @@ #define RWSEM_UNLOCKED_VALUE 0x00000000 #define RWSEM_ACTIVE_BIAS 0x00000001 #define RWSEM_ACTIVE_MASK 0x0000ffff -#define RWSEM_WAITING_BIAS 0xffff0000 +#define RWSEM_WAITING_BIAS (-0x00010000) #define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS #define RWSEM_ACTIVE_WRITE_BIAS (RWSEM...
sparc64: Fix rwsem constant bug leading to hangs. As noticed by Linus, it is critical that some of the rwsem constants be signed. Yet, hex constants are unsigned unless explicitly casted or negated. The most critical one is RWSEM_WAITING_BIAS. This bug was exacerbated by commit 424acaaeb3a3932d64a9b4bd59df6cf72c22d...
mit
KristFoundation/Programs,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,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,Krist...
ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; #pragma link C++ class AliAODRecoDecayHF+; #pragma link C++ class AliAODRecoDecayHF2Prong+; #pragma link C++ cl...
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; #pragma link C++ class AliD0toKpi+; #pragma link C++ class AliD0toKpiAnalysis+; #pragma link C++ class AliBtoJP...
--- +++ @@ -6,11 +6,6 @@ #pragma link C++ class AliQuarkoniaAcceptance+; #pragma link C++ class AliQuarkoniaEfficiency+; - -#pragma link C++ class AliD0toKpi+; -#pragma link C++ class AliD0toKpiAnalysis+; -#pragma link C++ class AliBtoJPSItoEle+; -#pragma link C++ class AliBtoJPSItoEleAnalysis+; #pragma link...
Move AliD0toKpi* and AliBtoJPSI* from libPWG3base to libPWG3 (Andrea)
bsd-3-clause
yowatana/AliPhysics,akubera/AliPhysics,rderradi/AliPhysics,rbailhac/AliPhysics,AMechler/AliPhysics,adriansev/AliPhysics,ppribeli/AliPhysics,hcab14/AliPhysics,pbatzing/AliPhysics,dlodato/AliPhysics,ALICEHLT/AliPhysics,pbuehler/AliPhysics,alisw/AliPhysics,SHornung1/AliPhysics,dstocco/AliPhysics,hzanoli/AliPhysics,rihanph...
31c42798c74f5ae31a996ea17c96ec1301876a26
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONSENSUS_CONSENSUS_H #define BITCOIN_CONSENSUS_CONSENSUS_H /** ...
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef BITCOIN_CONSENSUS_CONSENSUS_H #define BITCOIN_CONSENSUS_CONSENSUS_H /** ...
--- +++ @@ -9,7 +9,7 @@ /** The maximum allowed size for a serialized block, in bytes (network rule) */ static const unsigned int MAX_BLOCK_SIZE = 2000000; /** The maximum allowed number of signature check operations in a block (network rule) */ -static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50; +sta...
Make sigop limit `20000` just as in Bitcoin, ignoring our change to the blocksize limit.
mit
bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash,bitcoinsSG/zcash,CTRoundTable/Encrypted.Cash,CTRoundTable/Encrypted.Cash,bitcoinsSG/zcash
6ef996a3b60c5e85621acb5f1ef9ccf7da6a1925
#ifndef BANDIT_DEFAULT_FAILURE_FORMATTER_H #define BANDIT_DEFAULT_FAILURE_FORMATTER_H namespace bandit { namespace detail { struct default_failure_formatter : public failure_formatter { std::string format(const assertion_exception& err) const { std::stringstream ss; if(err.file_name().size()) ...
#ifndef BANDIT_DEFAULT_FAILURE_FORMATTER_H #define BANDIT_DEFAULT_FAILURE_FORMATTER_H namespace bandit { namespace detail { struct default_failure_formatter : public failure_formatter { std::string format(const assertion_exception& err) const { std::stringstream ss; if(err.file_name().size()) ...
--- +++ @@ -20,7 +20,7 @@ ss << ": "; } - ss << err.what(); + ss << std::endl << err.what(); return ss.str(); }
Add line break in default error formatter
mit
ogdf/bandit,ogdf/bandit
f7d94cd1d223a1e0ede58bb361e28e0f14ad4ff9
/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.2 2000/07/06 17:20:52 brun Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.1.1.1 2000/05/16 17:00:44 rdm Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. * * ...
--- +++ @@ -1,4 +1,4 @@ -/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.1.1.1 2000/05/16 17:00:44 rdm Exp $ */ +/* @(#)root/treeplayer:$Name: $:$Id: LinkDef.h,v 1.2 2000/07/06 17:20:52 brun Exp $ */ /************************************************************************* * Copyright (C) 1995-2000, Rene B...
Declare option "+" for TTreePlayer git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@986 27541ba8-7e3a-0410-8455-c3a389f83636
lgpl-2.1
root-mirror/root,mattkretz/root,krafczyk/root,olifre/root,root-mirror/root,mhuwiler/rootauto,omazapa/root-old,krafczyk/root,veprbl/root,perovic/root,smarinac/root,esakellari/root,sawenzel/root,buuck/root,ffurano/root5,beniz/root,zzxuanyuan/root,Duraznos/root,veprbl/root,krafczyk/root,jrtomps/root,mkret2/root,abhinavmou...
d0adf82885e8d650575f9290ca2e2620e240bec5
/* * C Interface between calcterm and a calculator. * A shared library must implement this interface * to be loadable by calcterm. */ extern "C" { struct CI_Config { int flag; }; struct CI_Result { char* one_line; char** grid; int y; }; void CI_init( CI_Config* config ); CI_Result* ...
typedef CI_Config void*; CI_Result CI_submit(char const* input);
--- +++ @@ -1,6 +1,23 @@ +/* + * C Interface between calcterm and a calculator. + * A shared library must implement this interface + * to be loadable by calcterm. + */ -typedef CI_Config void*; +extern "C" { +struct CI_Config { + int flag; +}; +struct CI_Result { + char* one_line; + char** grid; + ...
Add a basic interface for calcterm
bsd-2-clause
dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm,dpacbach/calcterm
f4370ff2104c52e41aa4a01935f22aae342e07f7
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This files defines a helper to trigger the registration of dialects to // the system. #ifndef...
// Copyright 2020 The IREE Authors // // Licensed under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This files defines a helper to trigger the registration of dialects to // the system. #ifndef...
--- +++ @@ -12,7 +12,6 @@ #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h" #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h" -#include "mlir-hlo/Dialect/mhlo/IR/lhlo_ops.h" #include "mlir/IR/Dialect.h" namespace mlir { @@ -21,7 +20,6 @@ inline void registerXLADialects(DialectRegistry &registry) { // clang-forma...
Move the lhlo dialect into its own directory. Also remove it from registerAllMhloDialects and make registrations explicit. PiperOrigin-RevId: 412411838
apache-2.0
iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,google/iree,google/iree,iree-org/iree,iree-org/iree,google/iree,iree-org/iree
b650f4bc8e04662493546c8ab2ab0fbca1081dac
#ifndef _OFFLINE_STATES_H_ #define _OFFLINE_STATES_H_ /* Cpu offline states go here */ enum cpu_state_vals { CPU_STATE_OFFLINE, CPU_STATE_INACTIVE, CPU_STATE_ONLINE, CPU_MAX_OFFLINE_STATES }; #ifdef CONFIG_HOTPLUG_CPU extern enum cpu_state_vals get_cpu_current_state(int cpu); extern void set_cpu_current_state(int...
#ifndef _OFFLINE_STATES_H_ #define _OFFLINE_STATES_H_ /* Cpu offline states go here */ enum cpu_state_vals { CPU_STATE_OFFLINE, CPU_STATE_INACTIVE, CPU_STATE_ONLINE, CPU_MAX_OFFLINE_STATES }; extern enum cpu_state_vals get_cpu_current_state(int cpu); extern void set_cpu_current_state(int cpu, enum cpu_state_vals ...
--- +++ @@ -9,10 +9,30 @@ CPU_MAX_OFFLINE_STATES }; +#ifdef CONFIG_HOTPLUG_CPU extern enum cpu_state_vals get_cpu_current_state(int cpu); extern void set_cpu_current_state(int cpu, enum cpu_state_vals state); -extern enum cpu_state_vals get_preferred_offline_state(int cpu); extern void set_preferred_offline_s...
powerpc: Fix SMP build with disabled CPU hotplugging. Compiling 2.6.33 with SMP enabled and HOTPLUG_CPU disabled gives me the following link errors: LD init/built-in.o LD .tmp_vmlinux1 arch/powerpc/platforms/built-in.o: In function `.smp_xics_setup_cpu': smp.c:(.devinit.text+0x88): undefined reference t...
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,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_kana...
5b72d74ce2fccca2a301de60f31b16ddf5c93984
#ifndef __libfixmath_color_h__ #define __libfixmath_color_h__ #include "fix16.h" typedef union { struct { unsigned int :1; unsigned int b:5; unsigned int g:5; unsigned int r:5; } __packed; uint8_t comp[3]; uint16_t raw; } ...
#ifndef __libfixmath_color_h__ #define __libfixmath_color_h__ #include "fix16.h" typedef union { struct { unsigned int r:5; unsigned int g:5; unsigned int b:5; unsigned int :1; } __packed; uint8_t comp[3]; uint16_t raw; } ...
--- +++ @@ -5,10 +5,10 @@ typedef union { struct { + unsigned int :1; + unsigned int b:5; + unsigned int g:5; unsigned int r:5; - unsigned int g:5; - unsigned int b:5; - unsigned int :1; } _...
Change R and B components
mit
ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul,ijacquez/libyaul
3c1245b31011d25f7c660592d456cf9109766195
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
/* * Copyright 2006 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing ...
--- +++ @@ -21,8 +21,17 @@ } // namespace rtc +// Trigger a fatal error (which aborts the process and prints an error +// message). FATAL_ERROR_IF may seem a lot like assert, but there's a crucial +// difference: it's always "on". This means that it can be used to check for +// regular errors that could actuall...
Define convenient FATAL_ERROR() and FATAL_ERROR_IF() macros R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/16079004 Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc Cr-Mirrored-Commit: 0fa6366ed15f48b3ec227987f21f339180fb4936
bsd-3-clause
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
d660bde85ad87e3309082e9031b77e9e16b5752d
#include <alsa/asoundlib.h> snd_seq_t *hdl; static snd_midi_event_t *mbuf; static int midiport; /* open */ int midiopen(void) { snd_midi_event_new(32, &mbuf); if (snd_seq_open(&hdl, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) { return 1; } else { snd_seq_set_client_name(hdl, "svmidi"); if ((midiport = snd_seq_c...
#include <alsa/asoundlib.h> snd_seq_t *hdl; static snd_midi_event_t *mbuf; static int midiport; /* open */ int midiopen(void) { snd_midi_event_new(32, &mbuf); if (snd_seq_open(&hdl, "default", SND_SEQ_OPEN_OUTPUT, 0) != 0) { return 1; } else { snd_seq_set_client_name(hdl, "svmidi"); if ((midiport = snd_seq_c...
--- +++ @@ -24,7 +24,7 @@ /* send message */ void -_midisend(unsigned char message[], size_t count) +midisend(unsigned char message[], size_t count) { snd_seq_event_t ev;
Fix undefined reference to "midisend" when using ALSA Signed-off-by: Henrique N. Lengler <6cdc851d94ddec54baafad133c2f9a87abb571af@openmailbox.org>
isc
henriqueleng/svmidi
b814282dc2db635d31fbe219e99a423337aa2dbf
/* 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.
mit
damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot
ff7a33c4f1e341dbdd4775307e3f52c004c21444
// // FileSystemObject.h // arc // // Created by Jerome Cheng on 1/4/13. // Copyright (c) 2013 nus.cs3217. All rights reserved. // #import <Foundation/Foundation.h> @protocol FileSystemObject <NSObject> @required // The name of this object. @property (strong, nonatomic) NSString *name; // This should be able t...
// // FileSystemObject.h // arc // // Created by Jerome Cheng on 1/4/13. // Copyright (c) 2013 nus.cs3217. All rights reserved. // #import <Foundation/Foundation.h> @protocol FileSystemObject <NSObject> @required // The name of this object. @property (strong, nonatomic) NSString *name; // This should be able t...
--- +++ @@ -29,15 +29,16 @@ // within, Files their size in bytes. @property float size; -// Initialises this object with the given name, path, and parent. -- (id)initWithName:(NSString *)name path:(NSString *)path parent:(id<FileSystemObject>)parent; - // Returns the contents of this object. - (id<NSObject>)con...
Make remove and initWithName:path:parent optional.
mit
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
f5920cfe85c21bb1c928d4550c33a1bedf543913
// PARAM: --enable sem.unknown_function.spawn #include <goblint.h> #include <stddef.h> int magic(void* (f (void *))); void *t_fun(void *arg) { __goblint_check(1); // reachable return NULL; } int main() { magic(t_fun); // unknown function return 0; }
// PARAM: --enable sem.unknown_function.spawn #include <goblint.h> #include <stddef.h> int magic(void* (f (void *))); void *t_fun(void *arg) { // __goblint_check(1); // reachable return NULL; } int main() { magic(t_fun); // unknown function return 0; }
--- +++ @@ -5,7 +5,7 @@ int magic(void* (f (void *))); void *t_fun(void *arg) { - // __goblint_check(1); // reachable + __goblint_check(1); // reachable return NULL; }
Undo commenting out of __goblint_check
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
70e0426892b6df38ce023b41ea86526e55a43c11
// Copyright 2016, Jeffrey E. Bedard #include "xstatus.h" #include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> static const char helptext[] = "DESCRIPTION: Simple X toolbar for minimalistic" " window managers.\n" "USAGE: xstatus [-d DELAY][-f FILE][-h]\n" "\t-d DELAY Set delay between ...
// Copyright 2016, Jeffrey E. Bedard #include "xstatus.h" #include "config.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> static const char * helptext = "DESCRIPTION: Simple X toolbar for minimalistic" " window managers.\n" "USAGE: xstatus [-d DELAY][-f FILE][-h]\n" "\t-d DELAY Set delay between ...
--- +++ @@ -7,7 +7,7 @@ #include <stdlib.h> #include <unistd.h> -static const char * helptext = +static const char helptext[] = "DESCRIPTION: Simple X toolbar for minimalistic" " window managers.\n" "USAGE: xstatus [-d DELAY][-f FILE][-h]\n" @@ -34,7 +34,7 @@ break; case 'h': default: - fprintf(st...
Use write(2) to display helptext.
mit
jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus
6ffac22050217acb02c85c9f199c2bb18131b484
#define _XOPEN_SOURCE 4 #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 #ifdef CRYPT_USE_XPG6 # define _XPG6 /* Some Solaris versions require this, some break with this */ #endif #include <unistd.h> #include "mycrypt.h" char *mycrypt(const char *key, const char *salt)...
#define _XOPEN_SOURCE 4 #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 #include <unistd.h> #include "mycrypt.h" char *mycrypt(const char *key, const char *salt) { return crypt(key, salt); }
--- +++ @@ -2,6 +2,9 @@ #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 +#ifdef CRYPT_USE_XPG6 +# define _XPG6 /* Some Solaris versions require this, some break with this */ +#endif #include <unistd.h> #include "mycrypt.h"
Add _XPG6 macro if needed..
mit
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
fc7e29bc154d67f627274c657b4157132a1503e8
#import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @class FacilitiesLocation; @interface FacilitiesRoom : NSManagedObject { @private } @property (nonatomic, retain) NSString * floor; @property (nonatomic, retain) NSString * number; @property (nonatomic, retain) NSString * building; - (NSString*)displayS...
// // FacilitiesRoom.h // MIT Mobile // // Created by Blake Skinner on 5/11/11. // Copyright (c) 2011 MIT. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @class FacilitiesLocation; @interface FacilitiesRoom : NSManagedObject { @private } @property (nonatomic, retain) NSSt...
--- +++ @@ -1,11 +1,3 @@ -// -// FacilitiesRoom.h -// MIT Mobile -// -// Created by Blake Skinner on 5/11/11. -// Copyright (c) 2011 MIT. All rights reserved. -// - #import <Foundation/Foundation.h> #import <CoreData/CoreData.h>
Remove the templated copyright statement
lgpl-2.1
MIT-Mobile/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS,MIT-Mobile/MIT-Mobile-for-iOS,xNUTs/MIT-Mobile-for-iOS,smartcop/MIT-Mobile-for-iOS
9d7dfc15495bd6f005b8ede5b33aa10dfa0a8fce
// Test if PGO sample use passes are invoked. // // Ensure Pass PGOInstrumentationGenPass is invoked. // RUN: %clang_cc1 -O2 -fno-experimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=LEGACY // RUN: %clang_cc1 -O2 ...
// Test if PGO sample use passes are invoked. // // Ensure Pass PGOInstrumentationGenPass is invoked. // RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s // CHECK: Remove unused exception handling info // CHECK: Sample profile pass
--- +++ @@ -1,6 +1,13 @@ // Test if PGO sample use passes are invoked. // // Ensure Pass PGOInstrumentationGenPass is invoked. -// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s -// CHECK: Remove unused exception handling info ...
[clang][NewPM] Remove exception handling before loading pgo sample profile data This patch ensures that SimplifyCFGPass comes before SampleProfileLoaderPass on PGO runs in the new PM and fixes clang/test/CodeGen/pgo-sample.c. Differential Revision: https://reviews.llvm.org/D63626 git-svn-id: ffe668792ed300d6c2daa1f6...
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
557d3de09e89c71aa82403b113bd9b863ae3fb0d
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-...
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. Apparently, not much actual tracking // needs to be done in this example. void pr34373() { int *a = 0; // expected-...
--- +++ @@ -1,8 +1,7 @@ // RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins -// of the null pointer for path notes. Apparently, not much actual tracking -// needs to be done in this example. +// of the n...
[analyzer] Fix an outdated comment in a test. NFC. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@314298 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit a0d7ea7ad167665974775befd200847e5d84dd02)
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
ca910100761ba025d9b7156d1030184a42bdd486
// // SQRLShipItLauncher.h // Squirrel // // Created by Justin Spahr-Summers on 2013-08-12. // Copyright (c) 2013 GitHub. All rights reserved. // #import <Foundation/Foundation.h> // The domain for errors originating within SQRLShipItLauncher. extern NSString * const SQRLShipItLauncherErrorDomain; // The ShipIt ...
// // SQRLShipItLauncher.h // Squirrel // // Created by Justin Spahr-Summers on 2013-08-12. // Copyright (c) 2013 GitHub. All rights reserved. // #import <Foundation/Foundation.h> // The domain for errors originating within SQRLShipItLauncher. extern NSString * const SQRLShipItLauncherErrorDomain; // The ShipIt ...
--- +++ @@ -21,9 +21,9 @@ // // error - If not NULL, set to any error that occurs. // -// Returns the XPC connection established, or NULL if an error occurs. If an -// error occurs in the connection, it will be automatically released. Retain it -// if you'll still need it after that point. +// Returns the XPC conn...
Clarify XPC connection lifecycle for -launch:
mit
emiscience/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,EdZava/Squirrel.Mac,Squirrel/Squirrel.Mac,emiscience/Squirrel.Mac,EdZava/Squirrel.Mac,emiscience/Squirrel.Mac,Squirrel/Squirrel.Mac
b6d178b4dcb894180356c445b8cde644e7dc4327
#ifndef PERL_MONGO #define PERL_MONGO #include <mongo/client/dbclient.h> extern "C" { #define PERL_GCC_BRACE_GROUPS_FORBIDDEN #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #define PERL_MONGO_CALL_BOOT(name) perl_mongo_call_xs (aTHX_ name, cv, mark) void perl_mongo_call_xs (pTHX_ void (*subaddr) (pTHX_ ...
#ifndef PERL_MONGO #define PERL_MONGO #include <mongo/client/dbclient.h> extern "C" { #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #define PERL_MONGO_CALL_BOOT(name) perl_mongo_call_xs (aTHX_ name, cv, mark) void perl_mongo_call_xs (pTHX_ void (*subaddr) (pTHX_ CV *cv), CV *cv, SV **mark); SV *perl_mon...
--- +++ @@ -4,6 +4,8 @@ #include <mongo/client/dbclient.h> extern "C" { + +#define PERL_GCC_BRACE_GROUPS_FORBIDDEN #include "EXTERN.h" #include "perl.h"
Stop the headers of debugging perls to generate gcc brace groups. Those don't work with g++ easily.
apache-2.0
xdg/mongo-perl-driver,kainwinterheart/mongo-perl-driver,kainwinterheart/mongo-perl-driver,rahuldhodapkar/mongo-perl-driver,kainwinterheart/mongo-perl-driver,gormanb/mongo-perl-driver,dagolden/mongo-perl-driver,gormanb/mongo-perl-driver,jorol/mongo-perl-driver,mongodb/mongo-perl-driver,mongodb/mongo-perl-driver,gormanb/...
fcdccff46beacec0b37271d75f1ced3093a773e2
#ifndef GVKILL_DEBUG_H #define GVKILL_DEBUG_H #include <cstdlib> #include <iostream> // FIXME: These need to be made Windows comptabile #define DEBUG(X) if (getenv("GVKI_DEBUG") != NULL) X #define DEBUG_MSG(X) DEBUG( std::cerr << "\033[32m***GVKI:" << X << "***\033[0m" << std::endl) // FIXME: This belongs in its own...
#ifndef GVKILL_DEBUG_H #define GVKILL_DEBUG_H #include <cstdlib> #include <iostream> // FIXME: These need to be made Windows comptabile #define DEBUG(X) if (getenv("GVKI_DEBUG") != NULL) X #define DEBUG_MSG(X) DEBUG( std::cerr << "\033[32m***GVKILL:" << X << "***\033[0m" << std::endl) // FIXME: This belongs in its o...
--- +++ @@ -5,9 +5,9 @@ // FIXME: These need to be made Windows comptabile #define DEBUG(X) if (getenv("GVKI_DEBUG") != NULL) X -#define DEBUG_MSG(X) DEBUG( std::cerr << "\033[32m***GVKILL:" << X << "***\033[0m" << std::endl) +#define DEBUG_MSG(X) DEBUG( std::cerr << "\033[32m***GVKI:" << X << "***\033[0m" << s...
Fix typos in DEBUG_MSG and ERROR_MSG macros
bsd-3-clause
mc-imperial/gvki,mc-imperial/gvki,giuliojiang/gvki,giuliojiang/gvki,mc-imperial/gvki,giuliojiang/gvki
8d0c966cb3b23c9383c76d7bd919fff09702cc31
#ifndef MLPACK_IO_OPTION_IMPL_H #define MLPACK_IO_OPTION_IMPL_H #include "io.h" namespace mlpack { /* * @brief Registers a parameter with IO. * This allows the registration of parameters at program start. */ template<typename N> Option<N>::Option(bool ignoreTemplate, N defaultValue, ...
#ifndef MLPACK_IO_OPTION_IMPL_H #define MLPACK_IO_OPTION_IMPL_H #include "io.h" namespace mlpack { /* * @brief Registers a parameter with IO. * This allows the registration of parameters at program start. */ template<typename N> Option<N>::Option(bool ignoreTemplate, N defaultValue, ...
--- +++ @@ -21,7 +21,7 @@ else { IO::Add<N>(identifier, description, parent, required); - //Create the full pathname. + // Create the full pathname to set the default value. std::string pathname = IO::SanitizeString(parent) + std::string(identifier); IO::GetParam<N>(pathname.c_str()) = defau...
Set a default value for boolean options (false).
bsd-3-clause
minhpqn/mlpack,palashahuja/mlpack,Azizou/mlpack,ajjl/mlpack,minhpqn/mlpack,ranjan1990/mlpack,bmswgnp/mlpack,lezorich/mlpack,ranjan1990/mlpack,theranger/mlpack,thirdwing/mlpack,trungda/mlpack,stereomatchingkiss/mlpack,chenmoshushi/mlpack,BookChan/mlpack,darcyliu/mlpack,ersanliqiao/mlpack,stereomatchingkiss/mlpack,datach...
44dfccfeb025f4eb61c9f31af287c00a46a37a0d
#include <time.h> #include <stdio.h> #define NANO 10000000000 int multiples_three_five(int limit) { long total = 0; for (int i=1; i < limit; i++) total += i % 3 == 0 || i % 5 == 0 ? i : 0; return total; } int main(void) { struct timespec start; clock_gettime(CLOCK_REALTIME, &start); ...
#include <stdio.h> #include <time.h> int multiples_three_five(int limit) { long total = 0; int i; for (i=1; i < limit; i++) total += i % 3 == 0 || i % 5 == 0 ? i : 0; return total; } int main(void) { clock_t start, stop; start = clock(); long ans = multiples_three_five(1000); ...
--- +++ @@ -1,28 +1,33 @@ +#include <time.h> #include <stdio.h> -#include <time.h> + +#define NANO 10000000000 int multiples_three_five(int limit) { long total = 0; - int i; - for (i=1; i < limit; i++) + for (int i=1; i < limit; i++) total += i % 3 == 0 || i % 5 == 0 ? i : 0; + r...
Use WALL time for timer
mit
tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler
4cc26f6ae19b096bae1ec8309671bb415997786c
int asserter_is_false(int); int set_empty(void); int set_size(int); int set_add(int, int); int main(void) { // set_empty tests if (asserter_is_false(set_empty() == 0)) return __LINE__; // set_add tests if (asserter_is_false(set_add(set_empty(), 0) != set_empty())) return __LINE__; if (asserter_is_false(set_add(...
int asserter_is_false(int); int set_empty(void); int set_size(int); int set_add(int, int); int main(void) { // set_empty tests if (asserter_is_false(set_empty() == 0)) return __LINE__; // set_add tests if (asserter_is_false(set_add(set_empty(), 0) != set_empty())) return __LINE__; if (asserter_is_false(set_add(...
--- +++ @@ -14,11 +14,13 @@ if (asserter_is_false(set_add(set_empty(), 1) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 2) != set_add(set_empty(), 2))) return __LINE__; if (asserter_is_false(set_add(set_add(set_empty(), 1), 1) == set_add(set_empty(), 1))) r...
[SET] REFACTOR: Add TODOs for future work
mit
w3ln4/open
c4dc456cdfc6fe4a67f41d2aa02f30bde9968d4c
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ // $Id$ // $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $ /// \ingroup basic /// \enum AliMpStationType /// Enumeration for refering to a MUON stati...
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ // $Id$ // $MpId: AliMpStationType.h,v 1.5 2005/10/28 15:05:04 ivana Exp $ /// \ingroup basic /// \enum AliMpStationType /// Enumeration for refering to a MUON stati...
--- +++ @@ -42,9 +42,10 @@ break; case kStationInvalid: default: - return "unknown"; + return "invalid"; break; } + return "unknown"; } #endif //ALI_MP_STATION_TYPE_H
Fix warning from gcc4 (Laurent)
bsd-3-clause
ALICEHLT/AliRoot,shahor02/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,alisw/AliRoot,ecalvovi/AliRoot,mkrzewic/AliRoot,ALICEHLT/AliRoot,miranov25/AliRoot,miranov25/AliRoot,mkrzewic/AliRoot,ecalvovi/AliRoot,jgrosseo/AliRoot,jgrosseo/AliRoot,sebaleh/AliRoot,ecalvovi/AliRoot,ALICEHLT/AliRoot,ALICEHLT/AliRoot,mkrzewic/AliRoot,...
a882990c9d05497540efca385ebb55c200e01e76
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_bitmap_t cpu_set; /* Ju...
#include <hwloc.h> #include <stdio.h> /* The body of the test is in a separate .c file and a separate library, just to ensure that hwloc didn't force compilation with visibility flags enabled. */ int do_test(void) { mytest_hwloc_topology_t topology; unsigned depth; hwloc_cpuset_t cpu_set; /* Ju...
--- +++ @@ -9,12 +9,12 @@ { mytest_hwloc_topology_t topology; unsigned depth; - hwloc_cpuset_t cpu_set; + hwloc_bitmap_t cpu_set; /* Just call a bunch of functions to see if we can link and run */ - printf("*** Test 1: cpuset alloc\n"); - cpu_set = mytest_hwloc_cpuset_alloc(); + pri...
Convert the embedded test to the bitmap API git-svn-id: bb34cd5123d2f821b9f934b050c449c8bfd5d5c1@2512 4b44e086-7f34-40ce-a3bd-00e031736276
bsd-3-clause
BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc
f55af7c049c00c39aecc38572ab18b7f11d88d40
// @(#)root/treeplayer:$Id$ // Author: Philippe Canal 01/06/2004 /************************************************************************* * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al. * * All rights reserved. * * ...
// @(#)root/treeplayer:$Id$ // Author: Philippe Canal 01/06/2004 /************************************************************************* * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers and al. * * All rights reserved. * * ...
--- +++ @@ -28,6 +28,8 @@ TFriendProxy(); TFriendProxy(TBranchProxyDirector *director, TTree *main, Int_t index); + TBranchProxyDirector *GetDirector() { return &fDirector; } + Long64_t GetReadEntry() const; void ResetReadEntry(); void Update(TTree *newmain);
Add accessor to Director of a FriendProxy
lgpl-2.1
root-mirror/root,olifre/root,olifre/root,olifre/root,root-mirror/root,karies/root,olifre/root,root-mirror/root,olifre/root,karies/root,karies/root,karies/root,olifre/root,root-mirror/root,olifre/root,karies/root,root-mirror/root,karies/root,olifre/root,karies/root,karies/root,root-mirror/root,root-mirror/root,olifre/ro...
9710c394fb7c54d91aa9929f9530a9fa78cab8de
int puts(const char *); int noop(void); int foo(char *list[5]) { puts(list[0]); puts(list[1]); return sizeof(list[6]); } int prints(int n, ...) { return n; } char s1[] = "Hello"; char *s2 = "World"; int main() { int size = 0; char *words[2]; words[0] = s1; words[1] = s2; size = foo(words); size = size +...
int puts(const char *); int noop(void); int foo(char *list[5]) { puts(list[0]); puts(list[1]); return sizeof(list); } int prints(int n, ...) { return n; } char s1[] = "Hello"; char *s2 = "World"; int main() { int size = 0; char *words[2]; words[0] = s1; words[1] = s2; size = foo(words); size = size + si...
--- +++ @@ -5,7 +5,7 @@ int foo(char *list[5]) { puts(list[0]); puts(list[1]); - return sizeof(list); + return sizeof(list[6]); } int prints(int n, ...) {
Change test to get rid of gcc warning
mit
larmel/lacc,larmel/c-compiler,larmel/c-compiler,larmel/lacc,larmel/c-compiler
1560265b11bb4b4d20d5f566330060f5f8504b04
#ifndef ZOMBIE_STATE_H #define ZOMBIE_STATE_H #include "box2ddef.h" namespace zombie { struct State { Position position_; Velocity velocity_; float angle_; float anglularVelocity_; }; } #endif
#ifndef ZOMBIE_STATE_H #define ZOMBIE_STATE_H #include "box2ddef.h" namespace zombie { struct State { Position position_{0, 0}; Velocity velocity_{0, 0}; float angle_{0.f}; float anglularVelocity_{0.f}; }; } #endif
--- +++ @@ -6,10 +6,10 @@ namespace zombie { struct State { - Position position_{0, 0}; - Velocity velocity_{0, 0}; - float angle_{0.f}; - float anglularVelocity_{0.f}; + Position position_; + Velocity velocity_; + float angle_; + float anglularVelocity_; }; }
Make State struct a clean POD strcut
mit
mwthinker/Zombie
530e6a93a7a953a460502a28a6733d889a245da0
#ifndef __LWP_CONFIG_H #define __LWP_CONFIG_H #include <stdint.h> #include <stdbool.h> typedef enum{ CFLAG_NWKSKEY = (1<<0), CFLAG_APPSKEY = (1<<1), CFLAG_APPKEY = (1<<2), CFLAG_JOINR = (1<<3), CFLAG_JOINA = (1<<4), }config_flag_t; typedef struct message{ uint8_t *buf; ...
#ifndef __LWP_CONFIG_H #define __LWP_CONFIG_H #include <stdint.h> #include <stdbool.h> typedef enum{ CFLAG_NWKSKEY = (1<<0), CFLAG_APPSKEY = (1<<1), CFLAG_APPKEY = (1<<2), CFLAG_JOINR = (1<<3), CFLAG_JOINA = (1<<4), }config_flag_t; typedef struct message{ uint8_t *buf; ...
--- +++ @@ -17,6 +17,22 @@ int16_t len; struct message *next; }message_t; + +typedef struct motes_abp{ + uint8_t band; + uint8_t devaddr[4]; + uint8_t nwkskey[16]; + uint8_t appskey[16]; + struct message *next; +}motes_abp_t; + +typedef struct motes_abp{ + uint8_t band; + uint8_t devad...
Add motes_abp and motes_otaa link list structure definition.
mit
JiapengLi/lorawan-parser,JiapengLi/lorawan-parser
3ea520fdbc396ba8d1b859b669d8c16ee34820ad
/* 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...
#ifndef TOPVIEWSETTINGS_H #define TOPVIEWSETTINGS_H #include "smyrnadefs.h" _BB void on_settingsOKBtn_clicked (GtkWidget *widget,gpointer user_data); _BB void on_settingsCancelBtn_clicked (GtkWidget *widget,gpointer user_data); int load_settings_from_graph(Agraph_t *g); int update_graph_from_settings(Agraph_t *g); ...
--- +++ @@ -1,17 +1,28 @@ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* ...
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
epl-1.0
pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,ellson/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,Mj...
7283c0eb982a87ac5afe2897a78f470e078c1e24