commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
6e95c0157afc35662e73b9caafe0d1d8bcf11f77 | tests/shared_libs_toc/srcs/main.c | tests/shared_libs_toc/srcs/main.c | #include <stdio.h>
const char* output_hash(void);
int getValue(void);
int main(int argc, char **argv) {
printf("%s%d\n", output_hash(), getValue());
return 0;
}
| #include <stdio.h>
const char* output_hash(void);
int getValue(void);
int main(void) {
printf("%s%d\n", output_hash(), getValue());
return 0;
}
| Fix shared_lib_toc test on Android | Fix shared_lib_toc test on Android
In the shared_libs_toc test, the compiler complains about unused
arguments to main(), so just declare it with a void parameter list.
Change-Id: I5c5074c1012fec7c84d11fa1d8e5b7a0b74959b4
Signed-off-by: David Kilroy <[email protected]>
| C | apache-2.0 | ARM-software/bob-build,ARM-software/bob-build,ARM-software/bob-build,ARM-software/bob-build,ARM-software/bob-build |
7e85e7cb3ad4816b2ee4285aea3d9b724bc05945 | deps/rapidcheck-catch.h | deps/rapidcheck-catch.h | #pragma once
#include <sstream>
#include <rapidcheck.h>
#include <catch.hpp>
namespace rc {
/// For use with `catch.hpp`. Use this function wherever you would use a
/// `SECTION` for convenient checking of properties.
///
/// @param description A description of the property.
/// @param testable The object that implements the property.
template <typename Testable>
void prop(const std::string &description, Testable &&testable) {
using namespace detail;
#ifdef CATCH_CONFIG_PREFIX_ALL
CATCH_SECTION(description) {
#else
SECTION(description) {
#endif
const auto result = checkTestable(std::forward<Testable>(testable));
if (result.template is<SuccessResult>()) {
const auto success = result.template get<SuccessResult>();
if (!success.distribution.empty()) {
std::cout << "- " << description << std::endl;
printResultMessage(result, std::cout);
std::cout << std::endl;
}
} else {
std::ostringstream ss;
printResultMessage(result, ss);
#ifdef CATCH_CONFIG_PREFIX_ALL
CATCH_INFO(ss.str() << "\n");
CATCH_FAIL();
#else
INFO(ss.str() << "\n");
FAIL();
#endif
}
}
}
} // namespace rc
| Include the rapidcheck header at top-level | Include the rapidcheck header at top-level
| C | mit | tm604/cps-future,tm604/cps-future |
|
b9b196846a4dc420c261d40788a1de8eb4eb2979 | chapter27/chapter27_trythis.c | chapter27/chapter27_trythis.c | /* Chapter 27, Try This: test cat(), find and remove performance error, add
comments */
#include<stdlib.h>
#include<string.h>
#include<stdio.h>
struct A {
int x;
};
char* cat(const char* id, const char* addr)
{
int len_id = strlen(id); /* so it has to be calculated only once */
int sz = len_id + strlen(addr) + 2; /* add extra space for terminating 0 */
char* res = (char*) malloc(sz);
strcpy(res,id);
res[len_id] = '@'; /* and not len_id + 1 */
strcpy(res+len_id+1,addr); /* and not len_id + 2 */
res[sz-1] = 0; /* terminate string */
return res;
}
int main()
{
A a;
char* id = "scott.meyers";
char* addr = "aristeia.com";
char* s = cat(id,addr);
printf("%s\n",s);
} | Add Chapter 27, Try This | Add Chapter 27, Try This
| C | mit | bewuethr/stroustrup_ppp,bewuethr/stroustrup_ppp |
|
f71ce7795e9204d7b8db08f46ec50c2ec56b5c31 | loader.c | loader.c | // This will load a lorito bytecode file into a lorito codeseg
| // This will load a lorito bytecode file into a lorito codeseg
// Since this is temporary, and we'll end up throwing it away in favor of
// integrating with parrot's packfile format, this will be real simple.
//
// Integer: segment type (0 = code, 1 = data)
// Integer: Size of segement name
// String: segment name, null terminated
// Integer: Count (in 8 bytes, so a count of 1 == 8 bytes)
// Data
| Document the mini pack format. | Document the mini pack format.
Sadly, I mangled some nomenclature and called something a segment that
isn't in the parrot world. Will need to fix that sometime. Sorry.
| C | artistic-2.0 | atrodo/lorito,atrodo/lorito |
4b53f8e967de8a0123cc029adc024e8b3cb16eeb | tests/regression/29-svcomp/14_addition_in_comparision_bot.c | tests/regression/29-svcomp/14_addition_in_comparision_bot.c |
int main()
{
unsigned int top;
unsigned int start = 0;
unsigned int count = 0;
if(start + count > top) {
return 1;
}
return 0;
}
| // PARAM: --enable ana.int.interval
int main()
{
unsigned int top;
unsigned int start = 0;
unsigned int count = 0;
if(start + count > top) {
return 1;
}
return 0;
}
| Enable interval analysis for test | Enable interval analysis for test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
9f8a92329efad8a14294e0006f7a279087e994bd | cbits/siphash.h | cbits/siphash.h | #ifndef _hashable_siphash_h
#define _hashable_siphash_h
#include <stdint.h>
typedef uint64_t u64;
typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
#define SIPHASH_ROUNDS 2
#define SIPHASH_FINALROUNDS 4
u64 hashable_siphash(int, int, u64, u64, const u8 *, size_t);
u64 hashable_siphash24(u64, u64, const u8 *, size_t);
#if defined(__i386)
u64 hashable_siphash24_sse2(u64, u64, const u8 *, size_t);
u64 hashable_siphash24_sse41(u64, u64, const u8 *, size_t);
#endif
#endif /* _hashable_siphash_h */
| #ifndef _hashable_siphash_h
#define _hashable_siphash_h
#include <stdint.h>
typedef uint64_t u64;
typedef uint32_t u32;
typedef uint16_t u16;
typedef uint8_t u8;
#define SIPHASH_ROUNDS 2
#define SIPHASH_FINALROUNDS 4
u64 hashable_siphash(int, int, u64, u64, const u8 *, size_t);
u64 hashable_siphash24(u64, u64, const u8 *, size_t);
#if defined(__i386) || defined(__x86_64)
/* To use SSE instructions on Windows, we have to adjust the stack
from its default of 4-byte alignment to use 16-byte alignment. */
# if defined(_WIN32)
# define ALIGNED_STACK __attribute__((force_align_arg_pointer))
# else
# define ALIGNED_STACK
# endif
u64 hashable_siphash24_sse2(u64, u64, const u8 *, size_t) ALIGNED_STACK;
u64 hashable_siphash24_sse41(u64, u64, const u8 *, size_t) ALIGNED_STACK;
#endif
#endif /* _hashable_siphash_h */
| Use 16-byte stack alignment on Windows, if using SSE | Use 16-byte stack alignment on Windows, if using SSE
| C | bsd-3-clause | ekmett/hashable |
40d6218a4da5c87723142bc7015bd6a85c52b590 | src/CPlusPlusMangle.h | src/CPlusPlusMangle.h | #ifndef HALIDE_CPLUSPLUS_MANGLE_H
#define HALIDE_CPLUSPLUS_MANGLE_H
/** \file
*
* A simple function to get a C++ mangled function name for a function.
*/
#include <string>
#include "IR.h"
#include "Target.h"
namespace Halide {
namespace Internal {
/** Return the mangled C++ name for a function.
* The target parameter is used to decide on the C++
* ABI/mangling style to use.
*/
std::string cplusplus_function_mangled_name(const std::string &name, const std::vector<std::string> &namespaces,
Type return_type, const std::vector<ExternFuncArgument> &args,
const Target &target);
void cplusplus_mangle_test();
}
}
#endif
| #ifndef HALIDE_CPLUSPLUS_MANGLE_H
#define HALIDE_CPLUSPLUS_MANGLE_H
/** \file
*
* A simple function to get a C++ mangled function name for a function.
*/
#include <string>
#include "IR.h"
#include "Target.h"
namespace Halide {
namespace Internal {
/** Return the mangled C++ name for a function.
* The target parameter is used to decide on the C++
* ABI/mangling style to use.
*/
EXPORT std::string cplusplus_function_mangled_name(const std::string &name, const std::vector<std::string> &namespaces,
Type return_type, const std::vector<ExternFuncArgument> &args,
const Target &target);
EXPORT void cplusplus_mangle_test();
}
}
#endif
| Add some EXPORT qualifiers for msvc | Add some EXPORT qualifiers for msvc
Former-commit-id: d0593d880573052e6ae2790328a336a6a9865cc3 | C | mit | Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,darkbuck/Halide,Trass3r/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide,darkbuck/Halide,Trass3r/Halide |
9a20a37ba17ec6f37086acab58d1a12cf5eced37 | C/APUE/1-5-read-and-exec-from-stdin.c | C/APUE/1-5-read-and-exec-from-stdin.c | #include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#define MAXLINE 4096
int main(int argc, char *argv[]) {
char buf[MAXLINE];
pid_t pid;
int status;
printf("%% ");
while (fgets(buf, MAXLINE, stdin) != NULL) {
buf[strlen(buf) - 1] = 0;
if ((pid = fork()) < 0) {
printf("fork error");
} else if (pid == 0) { /* child */
execlp(buf, buf, (char*)0);
printf("couldn't execute: %s\n", buf);
return -1;
}
if ((pid = waitpid(pid, &status, 0)) < 0) {
printf("waitpid error");
}
printf("%% ");
}
return 0;
}
| Add read and execute command from stdin demo | Add read and execute command from stdin demo
| C | mit | mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets,mzlogin/snippets |
|
940a0d5b67b005f1fda448a4549a468745be827d | include/VolViz/src/GeometryDescriptor.h | include/VolViz/src/GeometryDescriptor.h | #ifndef VolViz_Geometry_h
#define VolViz_Geometry_h
#include "Types.h"
namespace VolViz {
enum MoveMask : uint8_t {
None = 0x00,
X = 0x01,
Y = 0x02,
Z = 0x04,
All = 0x07
};
struct GeometryDescriptor {
bool movable{true};
Color color{Colors::White()};
};
struct AxisAlignedPlaneDescriptor : public GeometryDescriptor {
Length intercept{0 * meter};
Axis axis{Axis::X};
};
} // namespace VolViz
#endif // VolViz_Geometry_h
| #ifndef VolViz_Geometry_h
#define VolViz_Geometry_h
#include "Types.h"
namespace VolViz {
enum MoveMask : uint8_t {
None = 0x00,
X = 0x01,
Y = 0x02,
Z = 0x04,
All = 0x07
};
inline Vector3f maskToUnitVector(MoveMask mask) noexcept {
Vector3f v = Vector3f::Zero();
auto maskRep = static_cast<uint8_t>(mask);
Expects(maskRep <= 0x07);
int idx{0};
while (maskRep != 0) {
if (maskRep & 0x01) v(idx) = 1.f;
maskRep >>= 1;
++idx;
}
return v;
}
struct GeometryDescriptor {
bool movable{true};
Color color{Colors::White()};
};
struct AxisAlignedPlaneDescriptor : public GeometryDescriptor {
Length intercept{0 * meter};
Axis axis{Axis::X};
};
} // namespace VolViz
#endif // VolViz_Geometry_h
| Add function to convert MoveMak to mask vector | Add function to convert MoveMak to mask vector
| C | mit | ithron/VolViz,ithron/VolViz,ithron/VolViz |
6114da642991db0da3122e5d129e5050a449605a | fmacros.h | fmacros.h | #ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#endif
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#else
#if !(defined(__APPLE__) && defined(__MACH__))
#define _XOPEN_SOURCE 600
#endif
#endif
#if defined(__APPLE__) && defined(__MACH__)
#define _OSX
#endif
#endif
| #ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#endif
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#else
#if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__))
#define _XOPEN_SOURCE 600
#endif
#endif
#if defined(__APPLE__) && defined(__MACH__)
#define _OSX
#endif
#endif
| Fix compilation on FreeBSD 10.3 with default compiler | Fix compilation on FreeBSD 10.3 with default compiler
| C | bsd-3-clause | jinguoli/hiredis,jinguoli/hiredis,thomaslee/hiredis,jinguoli/hiredis,thomaslee/hiredis,redis/hiredis,charsyam/hiredis,charsyam/hiredis,redis/hiredis,redis/hiredis |
b8eb3a0a62af429ccd34fc43d1a74260733ce9c8 | TDTChocolate/TDTFoundationAdditions.h | TDTChocolate/TDTFoundationAdditions.h | #import "FoundationAdditions/TDTLog.h"
#import "FoundationAdditions/TDTAssert.h"
#import "FoundationAdditions/TDTSuppressPerformSelectorLeakWarning.h"
#import "FoundationAdditions/NSArray+TDTFunctionalAdditions.h"
#import "FoundationAdditions/NSSet+TDTFunctionalAdditions.h"
#import "FoundationAdditions/TDTObjectOrDefault.h"
#import "FoundationAdditions/NSArray+TDTAdditions.h"
#import "FoundationAdditions/NSString+TDTAdditions.h"
#import "FoundationAdditions/NSData+TDTStringEncoding.h"
#import "FoundationAdditions/NSDate+TDTAdditions.h"
#import "FoundationAdditions/NSDate+TDTComparisons.h"
#import "FoundationAdditions/NSDateFormatter+TDTISO8601Formatting.h"
#import "FoundationAdditions/NSFileManager+TDTAdditions.h"
#import "FoundationAdditions/NSProcessInfo+TDTEnvironmentAdditions.h"
#import "FoundationAdditions/TDTBlockAdditions.h"
#import "FoundationAdditions/TDTKeychain.h"
| #import "FoundationAdditions/TDTLog.h"
#import "FoundationAdditions/TDTAssert.h"
#import "FoundationAdditions/TDTSuppressPerformSelectorLeakWarning.h"
#import "FoundationAdditions/NSArray+TDTFunctionalAdditions.h"
#import "FoundationAdditions/NSSet+TDTFunctionalAdditions.h"
#import "FoundationAdditions/TDTObjectOrDefault.h"
#import "FoundationAdditions/NSArray+TDTAdditions.h"
#import "FoundationAdditions/NSString+TDTAdditions.h"
#import "FoundationAdditions/NSData+TDTStringEncoding.h"
#import "FoundationAdditions/NSDate+TDTAdditions.h"
#import "FoundationAdditions/NSDate+TDTComparisons.h"
#import "FoundationAdditions/NSDateFormatter+TDTISO8601Formatting.h"
#import "FoundationAdditions/NSFileManager+TDTAdditions.h"
#import "FoundationAdditions/NSProcessInfo+TDTEnvironmentDetection.h"
#import "FoundationAdditions/TDTBlockAdditions.h"
| Fix header paths in FoundationAdditions umbrella header | Fix header paths in FoundationAdditions umbrella header
| C | bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate |
d27b6dbfdf02311c3b3a0182f835661512c07f6a | control.c | control.c | #include "hardware/packet.h"
#include "serial.h"
void btoa(int num, char *buf, int digits) {
int shift = digits - 1;
int current = pow(2, shift);
char digit[2];
while (current > 0) {
sprintf(digit, "%d", ((num & current) >> shift) & 1);
strncat(buf, digit, 1);
shift--;
current /= 2;
}
strcat(buf, "\0");
}
int main(int argc, char *argv[]) {
// 0: device
// 1: group
// 2: plug
// 3: status
char device[] = "\\\\.\\\\COM5";
if (serial_connect(device) == SERIAL_ERROR) {
printf("Failed to connect to serial device \"%s\"\n", device);
return 1;
}
struct Packet packet = { 0, 0, 0 };
if (serial_transmit(packet) == SERIAL_ERROR) {
printf("Failed to send data to serial device \"%s\"\n", device);
return 1;
}
serial_close(device);
return 0;
}
| #include "hardware/packet.h"
#include "serial.h"
void btoa(int num, char *buf, int digits) {
int shift = digits - 1;
int current = pow(2, shift);
char digit[2];
while (current > 0) {
sprintf(digit, "%d", ((num & current) >> shift) & 1);
strncat(buf, digit, 1);
shift--;
current /= 2;
}
strcat(buf, "\0");
}
int main(int argc, char *argv[]) {
// 0: device
// 1: group
// 2: plug
// 3: status
char device[] = "\\\\.\\\\COM5";
if (serial_connect(device) == SERIAL_ERROR) {
printf("Failed to connect to serial device \"%s\"\n", device);
return 1;
}
struct Packet packet = { 1, 0, 3 };
if (serial_transmit(packet) == SERIAL_ERROR) {
printf("Failed to send data to serial device \"%s\"\n", device);
return 1;
}
serial_close();
return 0;
}
| Add test packet data and fix invalid serial_close call | Add test packet data and fix invalid serial_close call
| C | agpl-3.0 | jackwilsdon/lightcontrol,jackwilsdon/lightcontrol |
ae8c31438bd884d1fe477fa5cb913895325e30bf | src/include/fs/dvfs.h | src/include/fs/dvfs.h | /* @author Denis Deryugin
* @date 17 Mar 2015
*
* Dumb VFS
*/
#ifndef _DVFS_H_
#define _DVFS_H_
#include <fs/file_system.h>
#include <util/dlist.h>
/*****************
New VFS prototype
*****************/
#define DENTRY_NAME_LEN 16
#define FS_NAME_LEN 16
struct super_block;
struct inode;
struct dentry;
struct dumb_fs_driver;
struct super_block {
struct dumb_fs_driver *fs_drv; /* Assume that all FS have single driver */
struct block_dev *bdev;
struct dentry *root;
struct dlist_head *inode_list;
struct super_block_operations *sb_ops;
void *sb_data;
};
struct super_block_operations {
struct inode *(*inode_alloc)(struct super_block *sb);
int (*destroy_inode)(struct inode *inode);
int (*write_inode)(struct inode *inode);
int (*umount_begin)(struct super_block *sb);
};
struct inode {
int i_no;
int start_pos; /* location on disk */
size_t length;
struct inode_operations *i_ops;
void *i_data;
};
struct inode_operations {
struct inode *(*create)(struct dentry *d_new, struct dentry *d_dir, int mode);
struct inode *(*lookup)(char *name, struct dentry *dir);
int (*mkdir)(struct dentry *d_new, struct dentry *d_parent);
int (*rmdir)(struct dentry *dir);
int (*truncate)(struct inode *inode, size_t len);
int (*pathname)(struct inode *inode, char *buf);
};
struct dentry {
char name[DENTRY_NAME_LEN];
struct inode *inode;
struct dentry *parent;
struct dlist_head *next; /* Next element in this directory */
struct dlist_head *children; /* Subelemtnts of directory */
};
struct file {
struct dentry *f_dentry;
off_t pos;
struct file_operations *f_ops;
};
struct file_operations {
int (*open)(struct node *node, struct file *file_desc, int flags);
int (*close)(struct file *desc);
size_t (*read)(struct file *desc, void *buf, size_t size);
size_t (*write)(struct file *desc, void *buf, size_t size);
int (*ioctl)(struct file *desc, int request, ...);
};
struct dumb_fs_driver {
const char name[FS_NAME_LEN];
};
#endif
| Add initial implementation of new VFS header | Add initial implementation of new VFS header | C | bsd-2-clause | abusalimov/embox,Kakadu/embox,vrxfile/embox-trik,mike2390/embox,gzoom13/embox,Kefir0192/embox,abusalimov/embox,gzoom13/embox,mike2390/embox,Kefir0192/embox,embox/embox,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,gzoom13/embox,embox/embox,gzoom13/embox,Kakadu/embox,vrxfile/embox-trik,mike2390/embox,abusalimov/embox,embox/embox,vrxfile/embox-trik,mike2390/embox,Kakadu/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,embox/embox,mike2390/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,mike2390/embox,Kefir0192/embox,abusalimov/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,embox/embox,abusalimov/embox,Kefir0192/embox,vrxfile/embox-trik,Kakadu/embox,Kakadu/embox,gzoom13/embox |
|
ee12537a18f3f9792f8379454affba5ad13030ad | hardware/main.c | hardware/main.c | #include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include "deps/util.h"
#include "deps/rcswitch.h"
#define PIN_RC PB2
#include "deps/softuart.h"
#include "packet.h"
int main(void) {
// initialize serial
softuart_init();
// enable interrupts
sei();
delay_ms(1000);
softuart_puts("Starting...\r\n");
// enable the rc switch
rcswitch_enable(PIN_RC);
while (1) {
// if there is some data waiting for us
if (softuart_kbhit()) {
// parse the data
struct Packet packet;
binary_to_packet(&packet, softuart_getchar());
// handle the packet
if (packet.status) {
rcswitch_switch_on(packet.group + 1, packet.plug + 1);
} else {
rcswitch_switch_off(packet.group + 1, packet.plug + 1);
}
}
}
return 0;
}
| #include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include "deps/util.h"
#include "deps/rcswitch.h"
#define PIN_RC PB2
#include "deps/softuart.h"
#include "packet.h"
int main(void) {
// initialize serial
softuart_init();
// enable interrupts
sei();
// enable the rc switch
rcswitch_enable(PIN_RC);
while (1) {
// if there is some data waiting for us
if (softuart_kbhit()) {
// parse the data
struct Packet packet;
binary_to_packet(&packet, softuart_getchar());
// handle the packet
if (packet.status) {
rcswitch_switch_on(packet.group + 1, packet.plug + 1);
} else {
rcswitch_switch_off(packet.group + 1, packet.plug + 1);
}
}
}
return 0;
}
| Remove startup delay and messages | Remove startup delay and messages
| C | agpl-3.0 | jackwilsdon/lightcontrol,jackwilsdon/lightcontrol |
d58d2404f23d48e2e399348e735133db912b5f60 | messaging/qtmessaging.h | messaging/qtmessaging.h | /****************************************************************************
**
** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions
** contained in the Technology Preview License Agreement accompanying
** this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain
** additional rights. These rights are described in the Nokia Qt LGPL
** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** If you have questions regarding the use of this file, please
** contact Nokia at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTMESSAGING_H
#define QTMESSAGING_H
#include "qmessageglobal.h"
#include "qmessageaccount.h"
#include "qmessageaccountfilterkey.h"
#include "qmessageaccountid.h"
#include "qmessageaccountsortkey.h"
#include "qmessagefolder.h"
#include "qmessagefolderfilterkey.h"
#include "qmessagefolderid.h"
#include "qmessagefoldersortkey.h"
#include "qmessage.h"
#include "qmessagefilterkey.h"
#include "qmessageid.h"
#include "qmessagesortkey.h"
#include "qmessagecontentcontainer.h"
#include "qmessagecontentcontainerid.h"
#include "qmessageaddress.h"
#include "qmessageserviceaction.h"
#include "qmessagestore.h"
#endif
| Add header for including messaging module. | Add header for including messaging module.
| C | lgpl-2.1 | qtproject/qt-mobility,kaltsi/qt-mobility,kaltsi/qt-mobility,tmcguire/qt-mobility,enthought/qt-mobility,kaltsi/qt-mobility,KDE/android-qt-mobility,KDE/android-qt-mobility,qtproject/qt-mobility,qtproject/qt-mobility,tmcguire/qt-mobility,tmcguire/qt-mobility,enthought/qt-mobility,KDE/android-qt-mobility,kaltsi/qt-mobility,tmcguire/qt-mobility,kaltsi/qt-mobility,enthought/qt-mobility,tmcguire/qt-mobility,enthought/qt-mobility,qtproject/qt-mobility,kaltsi/qt-mobility,enthought/qt-mobility,KDE/android-qt-mobility,enthought/qt-mobility,qtproject/qt-mobility,qtproject/qt-mobility |
|
f7f41d9301d514a93c03a9cbcfeaf5be88906707 | include/flags.h | include/flags.h | /*
* Copyright 2015-2016 Yury Gribov
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
#ifndef FLAGS_H
#define FLAGS_H
enum CheckFlags {
CHECK_BASIC = 1 << 0,
CHECK_REFLEXIVITY = 1 << 1,
CHECK_SYMMETRY = 1 << 2,
CHECK_TRANSITIVITY = 1 << 3,
CHECK_SORTED = 1 << 4,
CHECK_GOOD_BSEARCH = 1 << 5,
CHECK_UNIQUE = 1 << 6,
// Do not check reflexivity because it's normally not important (CHECK_REFLEXIVITY).
// Do not assume bsearch is commutative (CHECK_GOOD_BSEARCH).
CHECK_DEFAULT = CHECK_BASIC | CHECK_SYMMETRY
| CHECK_TRANSITIVITY | CHECK_SORTED,
CHECK_ALL = 0xffffffff,
};
typedef struct {
char debug : 1;
char report_error : 1;
char print_to_syslog : 1;
char raise : 1;
unsigned max_errors;
unsigned sleep;
unsigned checks;
const char *out_filename;
} Flags;
int parse_flags(char *opts, Flags *flags);
#endif
| /*
* Copyright 2015-2016 Yury Gribov
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
#ifndef FLAGS_H
#define FLAGS_H
enum CheckFlags {
CHECK_BASIC = 1 << 0,
CHECK_REFLEXIVITY = 1 << 1,
CHECK_SYMMETRY = 1 << 2,
CHECK_TRANSITIVITY = 1 << 3,
CHECK_SORTED = 1 << 4,
CHECK_GOOD_BSEARCH = 1 << 5,
CHECK_UNIQUE = 1 << 6,
// Do not check reflexivity because it's normally not important (CHECK_REFLEXIVITY).
// Do not assume bsearch is commutative (CHECK_GOOD_BSEARCH).
CHECK_DEFAULT = CHECK_BASIC | CHECK_SYMMETRY
| CHECK_TRANSITIVITY | CHECK_SORTED,
CHECK_ALL = 0xffffffff,
};
typedef struct {
unsigned char debug : 1;
unsigned char report_error : 1;
unsigned char print_to_syslog : 1;
unsigned char raise : 1;
unsigned max_errors;
unsigned sleep;
unsigned checks;
const char *out_filename;
} Flags;
int parse_flags(char *opts, Flags *flags);
#endif
| Make bitfield signs explicitly signed (detected by Semmle). | Make bitfield signs explicitly signed (detected by Semmle).
| C | mit | yugr/sortcheck,yugr/sortcheck |
e5ec294490ecb1fb0d609026b01dfd28a84538f9 | tests/regression/36-apron/49-assert-refine.c | tests/regression/36-apron/49-assert-refine.c | // SKIP PARAM: --sets ana.activated[+] apron
#include <assert.h>
void main() {
int x, y, z;
// TODO: make these asserts after distinction
__goblint_commit(x < y); // U NKNOWN! (refines)
__goblint_commit(y < z); // U NKNOWN! (refines)
__goblint_commit(3 <= x); // U NKNOWN! (refines)
__goblint_commit(z <= 5); // U NKNOWN! (refines)
assert(x == 3);
assert(y == 4);
assert(z == 5);
}
| Add test where octApron assert should refine | Add test where octApron assert should refine
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
b7e1c268a1f1d242fe44703438fc41ef5bbe4c82 | testing/unittest/special_types.h | testing/unittest/special_types.h | #pragma once
template <typename T, unsigned int N>
struct FixedVector
{
T data[N];
__host__ __device__
FixedVector() { }
__host__ __device__
FixedVector(T init)
{
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
__host__ __device__
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
}
__host__ __device__
bool operator<(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
return true;
else if(bs.data[i] < data[i])
return false;
}
return false;
}
__host__ __device__
bool operator==(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))
return false;
}
return true;
}
};
| #pragma once
template <typename T, unsigned int N>
struct FixedVector
{
T data[N];
__host__ __device__
FixedVector() : data() { }
__host__ __device__
FixedVector(T init)
{
for(unsigned int i = 0; i < N; i++)
data[i] = init;
}
__host__ __device__
FixedVector operator+(const FixedVector& bs) const
{
FixedVector output;
for(unsigned int i = 0; i < N; i++)
output.data[i] = data[i] + bs.data[i];
return output;
}
__host__ __device__
bool operator<(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(data[i] < bs.data[i])
return true;
else if(bs.data[i] < data[i])
return false;
}
return false;
}
__host__ __device__
bool operator==(const FixedVector& bs) const
{
for(unsigned int i = 0; i < N; i++)
{
if(!(data[i] == bs.data[i]))
return false;
}
return true;
}
};
| Initialize FixedVector's member in its null constructor to eliminate a Wall warning. | Initialize FixedVector's member in its null constructor to eliminate a Wall warning.
| C | apache-2.0 | zeryx/thrust,xiongzhanblake/thrust,jaredhoberock/thrust,thrust/thrust,egaburov/thrust,raygit/thrust,arnabgho/thrust,Ricardo666666/thrust,sarvex/thrust,jaredhoberock/thrust,thvasilo/thrust,dachziegel/thrust,Ricardo666666/thrust,xiongzhanblake/thrust_src,dachziegel/thrust,thrust/thrust,xiongzhanblake/thrust,xiongzhanblake/thrust_src,zeryx/thrust,jaredhoberock/thrust,thrust/thrust,raygit/thrust,mohamed-ali/thrust,marksantos/thrust,mohamed-ali/thrust,sdalton1/thrust,zhenglaizhang/thrust,marksantos/thrust,sarvex/thrust,xiongzhanblake/thrust_src,mohamed-ali/thrust,thvasilo/thrust,sdalton1/thrust,andrewcorrigan/thrust-multi-permutation-iterator,GrimDerp/thrust,sdalton1/thrust,marksantos/thrust,andrewcorrigan/thrust-multi-permutation-iterator,sarvex/thrust,andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,thrust/thrust,egaburov/thrust,arnabgho/thrust,jaredhoberock/thrust,GrimDerp/thrust,zhenglaizhang/thrust,GrimDerp/thrust,zhenglaizhang/thrust,dachziegel/thrust,zeryx/thrust,arnabgho/thrust,thvasilo/thrust,xiongzhanblake/thrust,thrust/thrust,egaburov/thrust,raygit/thrust,Ricardo666666/thrust |
e88a8f74d643ad6636683ff5304645fb203db34e | testmud/mud/home/Account/initd.c | testmud/mud/home/Account/initd.c | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <kotaka/log.h>
#include <kotaka/paths.h>
inherit LIB_INITD;
inherit UTILITY_COMPILE;
static void create()
{
KERNELD->set_global_access("Account", 1);
load_dir("sys");
LOGD->post_message("account", LOG_DEBUG, "Hello world from the account subsystem");
}
| /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2012 Raymond Jennings
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <kotaka/log.h>
#include <kotaka/paths.h>
inherit LIB_INITD;
inherit UTILITY_COMPILE;
static void create()
{
KERNELD->set_global_access("Account", 1);
load_dir("sys");
}
| Remove spammy hello world from account system | Remove spammy hello world from account system
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
bec95322a9361d3a0458e2ccae647dfb59821f0a | include/utilities/utilities.h | include/utilities/utilities.h | /** \file
*
* \brief Inclusion of all utility function headers
*
* \date Created: Jul 12, 2014
* \date Modified: $Date$
*
* \authors mauro <[email protected]>
*
* \version $Revision$
*/
#ifndef LINALG_UTILITIES_UTILITIES_H_
#define LINALG_UTILITIES_UTILITIES_H_
// Keep this in alphabetical order
#include "buffer.h"
#include "checks.h"
#include "copy_array.h"
#include "CSR.h"
#include "format_convert.h"
#include "IJV.h"
#include "memory_allocation.h"
#include "misc.h"
#include "stringformat.h"
#include "timer.h"
#endif /* LINALG_UTILITIES_UTILITIES_H_ */
| /** \file
*
* \brief Inclusion of all utility function headers
*
* \date Created: Jul 12, 2014
* \date Modified: $Date$
*
* \authors mauro <[email protected]>
*
* \version $Revision$
*/
#ifndef LINALG_UTILITIES_UTILITIES_H_
#define LINALG_UTILITIES_UTILITIES_H_
// Keep this in alphabetical order
#include "buffer_helper.h"
#include "checks.h"
#include "copy_array.h"
#include "CSR.h"
#include "format_convert.h"
#include "IJV.h"
#include "memory_allocation.h"
#include "misc.h"
#include "stringformat.h"
#include "timer.h"
#endif /* LINALG_UTILITIES_UTILITIES_H_ */
| Rename buffer.h to buffer_helper.h, part II | Rename buffer.h to buffer_helper.h, part II
| C | bsd-3-clause | MauroCalderara/LinAlg,MauroCalderara/LinAlg,MauroCalderara/LinAlg |
b13325f74d96d7e0a24c6f62b0910d6739835d47 | src/plugins/crypto/compile_openssl.c | src/plugins/crypto/compile_openssl.c | /**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <openssl/evp.h>
int main (void)
{
EVP_CIPHER_CTX * opensslSpecificType;
return 0;
}
| /**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <openssl/evp.h>
EVP_CIPHER_CTX * nothing (void)
{
return NULL;
}
int main (void)
{
nothing ();
return 0;
}
| Fix detection of lib if we use `-Werror` | OpenSSL: Fix detection of lib if we use `-Werror`
Before this update detecting OpenSSL would fail, if we treated warnings
as errors (`-Werror`). The cause of this problem was that compiling
`compile_openssl.cpp` produced a warning about an unused variable.
| C | bsd-3-clause | petermax2/libelektra,e1528532/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,BernhardDenner/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,e1528532/libelektra,mpranj/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,e1528532/libelektra,mpranj/libelektra,e1528532/libelektra,e1528532/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,e1528532/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra |
c102f62a41137d6a75500d46e272bc95a63cfae9 | src/kernel/time/time_manager.c | src/kernel/time/time_manager.c | /*
*
* SOS Source Code
* __________________
*
* [2009] - [2013] Samuel Steven Truscott
* All Rights Reserved.
*/
#include "time_manager.h"
#include "kernel/kernel_assert.h"
#include "time.h"
static int64_t __time_system_time_ns;
static __clock_device_t * __time_system_clock;
void __time_initialise(void)
{
__time_system_time_ns = 0;
__time_system_clock = NULL;
}
void __time_set_system_clock(__clock_device_t * const device)
{
__time_system_clock = device;
}
sos_time_t __time_get_system_time(void)
{
sos_time_t time = SOS_ZERO_TIME;
if (__time_system_clock)
{
__time_system_time_ns = (int64_t)__time_system_clock->get_time();
time.seconds = (int32_t)__time_system_time_ns / ONE_SECOND_AS_NANOSECONDS;
time.nanoseconds = (int64_t)(__time_system_time_ns - ((int64_t)time.seconds * ONE_SECOND_AS_NANOSECONDS));
}
return time;
}
| /*
*
* SOS Source Code
* __________________
*
* [2009] - [2013] Samuel Steven Truscott
* All Rights Reserved.
*/
#include "time_manager.h"
#include "kernel/kernel_assert.h"
#include "time.h"
static uint64_t __time_system_time_ns;
static __clock_device_t * __time_system_clock;
void __time_initialise(void)
{
__time_system_time_ns = 0;
__time_system_clock = NULL;
}
void __time_set_system_clock(__clock_device_t * const device)
{
__time_system_clock = device;
}
sos_time_t __time_get_system_time(void)
{
sos_time_t time = SOS_ZERO_TIME;
if (__time_system_clock)
{
__time_system_time_ns = __time_system_clock->get_time();
time.seconds = __time_system_time_ns / ONE_SECOND_AS_NANOSECONDS;
time.nanoseconds = (int64_t)(__time_system_time_ns - ((int64_t)time.seconds * ONE_SECOND_AS_NANOSECONDS));
}
return time;
}
| Fix the powerpc clock from the tbr. | Fix the powerpc clock from the tbr. | C | mit | sam-truscott/tinker-kernel,sam-truscott/tinker-kernel |
c74ad610ca9a3078295910bd9c3ee91a19cc773c | tests/regression/31-ikind-aware-ints/06-unsigned-negate.c | tests/regression/31-ikind-aware-ints/06-unsigned-negate.c | #include <assert.h>
#include <stdio.h>
int main(){
unsigned int x = 1;
unsigned int y = -x;
assert(y == 4294967295);
printf("y: %u\n", y);
return 0;
}
| Add testcase: retain precision when negating unsigned value | Add testcase: retain precision when negating unsigned value
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
6772c4ea857328134e20eb6164d64b9ba2e038fd | You-DataStore/internal/internal_transaction.h | You-DataStore/internal/internal_transaction.h | #pragma once
#ifndef YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
#define YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
#include <memory>
#include <boost/ptr_container/ptr_deque.hpp>
#include "operation.h"
namespace You {
namespace DataStore {
namespace UnitTests { class DataStoreApiTest; }
namespace Internal {
/// The actual class that contains the logic for managing transactions.
class Transaction {
friend class DataStore;
friend class UnitTests::DataStoreApiTest;
public:
/// Default constructor. This is meant to be called by \ref DataStore.
Transaction() = default;
/// Commits the set of operations made.
void commit();
/// Rolls back all the operations made.
void rollback();
/// Pushes a transaction onto the stack. This is meant to be called by
/// \ref DataStore.
///
/// \param[in] operation The operation to push.
void push(std::unique_ptr<IOperation> operation);
private:
/// The set of operations that need to be executed when the transaction is
/// committed.
boost::ptr_deque<IOperation> operationsQueue;
};
} // namespace Internal
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
| #pragma once
#ifndef YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
#define YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
#include <memory>
#include <boost/ptr_container/ptr_deque.hpp>
#include "operation.h"
namespace You {
namespace DataStore {
namespace UnitTests { class DataStoreApiTest; }
namespace Internal {
/// The actual class that contains the logic for managing transactions.
class Transaction {
friend class DataStore;
friend class UnitTests::DataStoreApiTest;
public:
/// Default constructor. This is meant to be called by \ref DataStore.
Transaction() = default;
/// Commits the set of operations made.
void commit();
/// Rolls back all the operations made.
void rollback();
/// Pushes a transaction onto the stack. This is meant to be called by
/// \ref DataStore.
///
/// \param[in] operation The operation to push.
void push(std::unique_ptr<IOperation> operation);
/// Merges the operationsQueue of the next transaction that is committed
/// earlier.
///
/// \param[in] queue The operations queue
void mergeQueue(boost::ptr_deque<IOperation>& queue);
private:
/// The set of operations that need to be executed when the transaction is
/// committed.
boost::ptr_deque<IOperation> operationsQueue;
boost::ptr_deque<IOperation> mergedOperationsQueue;
};
} // namespace Internal
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_INTERNAL_INTERNAL_TRANSACTION_H_
| Add mergedOperationsQueue and mergeQueue to ensure correctness of file being modified | Add mergedOperationsQueue and mergeQueue to ensure correctness of file being modified
| C | mit | cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main |
03a6bc7bedc52d6173436f789cc0329086447927 | include/swift/Syntax/TokenKinds.h | include/swift/Syntax/TokenKinds.h | //===--- TokenKinds.h - Token Kinds Interface -------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines the Token kinds.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_TOKENKINDS_H
#define SWIFT_TOKENKINDS_H
namespace swift {
enum class tok {
#define TOKEN(X) X,
#include "swift/Syntax/TokenKinds.def"
NUM_TOKENS
};
/// Check whether a token kind is known to have any specific text content.
/// e.g., tol::l_paren has determined text however tok::identifier doesn't.
bool isTokenTextDetermined(tok kind);
/// If a token kind has determined text, return the text; otherwise assert.
StringRef getTokenText(tok kind);
void dumpTokenKind(llvm::raw_ostream &os, tok kind);
} // end namespace swift
#endif // SWIFT_TOKENKINDS_H
| //===--- TokenKinds.h - Token Kinds Interface -------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines the Token kinds.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_TOKENKINDS_H
#define SWIFT_TOKENKINDS_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/raw_ostream.h"
namespace swift {
enum class tok {
#define TOKEN(X) X,
#include "swift/Syntax/TokenKinds.def"
NUM_TOKENS
};
/// Check whether a token kind is known to have any specific text content.
/// e.g., tol::l_paren has determined text however tok::identifier doesn't.
bool isTokenTextDetermined(tok kind);
/// If a token kind has determined text, return the text; otherwise assert.
StringRef getTokenText(tok kind);
void dumpTokenKind(llvm::raw_ostream &os, tok kind);
} // end namespace swift
#endif // SWIFT_TOKENKINDS_H
| Prepare the header for stand-alone usage. | Prepare the header for stand-alone usage.
| C | apache-2.0 | roambotics/swift,rudkx/swift,ahoppen/swift,ahoppen/swift,JGiola/swift,atrick/swift,apple/swift,apple/swift,tkremenek/swift,benlangmuir/swift,roambotics/swift,tkremenek/swift,xwu/swift,rudkx/swift,atrick/swift,tkremenek/swift,JGiola/swift,xwu/swift,atrick/swift,glessard/swift,roambotics/swift,glessard/swift,hooman/swift,parkera/swift,roambotics/swift,apple/swift,ahoppen/swift,parkera/swift,glessard/swift,ahoppen/swift,gregomni/swift,xwu/swift,gregomni/swift,JGiola/swift,JGiola/swift,gregomni/swift,JGiola/swift,benlangmuir/swift,roambotics/swift,JGiola/swift,tkremenek/swift,parkera/swift,tkremenek/swift,rudkx/swift,benlangmuir/swift,xwu/swift,glessard/swift,benlangmuir/swift,hooman/swift,xwu/swift,hooman/swift,xwu/swift,apple/swift,tkremenek/swift,ahoppen/swift,hooman/swift,apple/swift,rudkx/swift,parkera/swift,hooman/swift,hooman/swift,xwu/swift,hooman/swift,parkera/swift,parkera/swift,parkera/swift,roambotics/swift,rudkx/swift,tkremenek/swift,gregomni/swift,gregomni/swift,atrick/swift,benlangmuir/swift,apple/swift,benlangmuir/swift,atrick/swift,glessard/swift,ahoppen/swift,rudkx/swift,atrick/swift,parkera/swift,glessard/swift,gregomni/swift |
79162ce8caaf6d1f66666cdd52f677de812af47a | test/Preprocessor/macro_paste_bcpl_comment.c | test/Preprocessor/macro_paste_bcpl_comment.c | // RUN: clang-cc %s -Eonly 2>&1 | grep error
#define COMM1 / ## /
COMM1
| // RUN: clang-cc %s -Eonly -fms-extensions=0 2>&1 | grep error
#define COMM1 / ## /
COMM1
| Disable Microsoft extensions to fix failure on Windows. | Disable Microsoft extensions to fix failure on Windows.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@84893 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang |
c8e8ac42abb9225c3abfac036340548cfaaa0e92 | common/opthelpers.h | common/opthelpers.h | #ifndef OPTHELPERS_H
#define OPTHELPERS_H
#ifdef __has_builtin
#define HAS_BUILTIN __has_builtin
#else
#define HAS_BUILTIN(x) (0)
#endif
#ifdef __GNUC__
/* LIKELY optimizes the case where the condition is true. The condition is not
* required to be true, but it can result in more optimal code for the true
* path at the expense of a less optimal false path.
*/
#define LIKELY(x) __builtin_expect(!!(x), !0)
/* The opposite of LIKELY, optimizing the case where the condition is false. */
#define UNLIKELY(x) __builtin_expect(!!(x), 0)
/* Unlike LIKELY, ASSUME requires the condition to be true or else it invokes
* undefined behavior. It's essentially an assert without actually checking the
* condition at run-time, allowing for stronger optimizations than LIKELY.
*/
#if HAS_BUILTIN(__builtin_assume)
#define ASSUME __builtin_assume
#else
#define ASSUME(x) do { if(!(x)) __builtin_unreachable(); } while(0)
#endif
#else /* __GNUC__ */
#define LIKELY(x) (!!(x))
#define UNLIKELY(x) (!!(x))
#ifdef _MSC_VER
#define ASSUME __assume
#else
#define ASSUME(x) ((void)0)
#endif /* _MSC_VER */
#endif /* __GNUC__ */
#endif /* OPTHELPERS_H */
| #ifndef OPTHELPERS_H
#define OPTHELPERS_H
#ifdef __has_builtin
#define HAS_BUILTIN __has_builtin
#else
#define HAS_BUILTIN(x) (0)
#endif
#ifdef __GNUC__
/* LIKELY optimizes the case where the condition is true. The condition is not
* required to be true, but it can result in more optimal code for the true
* path at the expense of a less optimal false path.
*/
#define LIKELY(x) __builtin_expect(!!(x), !false)
/* The opposite of LIKELY, optimizing the case where the condition is false. */
#define UNLIKELY(x) __builtin_expect(!!(x), false)
/* Unlike LIKELY, ASSUME requires the condition to be true or else it invokes
* undefined behavior. It's essentially an assert without actually checking the
* condition at run-time, allowing for stronger optimizations than LIKELY.
*/
#if HAS_BUILTIN(__builtin_assume)
#define ASSUME __builtin_assume
#else
#define ASSUME(x) do { if(!(x)) __builtin_unreachable(); } while(0)
#endif
#else /* __GNUC__ */
#define LIKELY(x) (!!(x))
#define UNLIKELY(x) (!!(x))
#ifdef _MSC_VER
#define ASSUME __assume
#else
#define ASSUME(x) ((void)0)
#endif /* _MSC_VER */
#endif /* __GNUC__ */
#endif /* OPTHELPERS_H */
| Use false instead of 0 for a boolean | Use false instead of 0 for a boolean
| C | lgpl-2.1 | aaronmjacobs/openal-soft,aaronmjacobs/openal-soft |
a2af1d8bff1b3729048f95c8c266ef8f2fb4c861 | ps4/histogram_omp.c | ps4/histogram_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bmp.h"
const int image_width = 512;
const int image_height = 512;
const int image_size = 512*512;
const int color_depth = 255;
int main(int argc, char** argv){
if(argc != 3){
printf("Useage: %s image n_threads\n", argv[0]);
exit(-1);
}
int n_threads = atoi(argv[2]);
unsigned char* image = read_bmp(argv[1]);
unsigned char* output_image = malloc(sizeof(unsigned char) * image_size);
int* histogram = (int*)calloc(sizeof(int), color_depth);
for(int i = 0; i < image_size; i++){
histogram[image[i]]++;
}
float* transfer_function = (float*)calloc(sizeof(float), color_depth);
for(int i = 0; i < color_depth; i++){
for(int j = 0; j < i+1; j++){
transfer_function[i] += color_depth*((float)histogram[j])/(image_size);
}
}
for(int i = 0; i < image_size; i++){
output_image[i] = transfer_function[image[i]];
}
write_bmp(output_image, image_width, image_height);
}
| #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bmp.h"
const int image_width = 512;
const int image_height = 512;
const int image_size = 512*512;
const int color_depth = 255;
int main(int argc, char** argv){
if(argc != 3){
printf("Useage: %s image n_threads\n", argv[0]);
exit(-1);
}
int n_threads = atoi(argv[2]);
unsigned char* image = read_bmp(argv[1]);
unsigned char* output_image = malloc(sizeof(unsigned char) * image_size);
int* histogram = (int*)calloc(sizeof(int), color_depth);
#pragma omp parallel for
for(int i = 0; i < image_size; i++){
histogram[image[i]]++;
}
float* transfer_function = (float*)calloc(sizeof(float), color_depth);
#pragma omp parallel for
for(int i = 0; i < color_depth; i++){
for(int j = 0; j < i+1; j++){
transfer_function[i] += color_depth*((float)histogram[j])/(image_size);
}
}
for(int i = 0; i < image_size; i++){
output_image[i] = transfer_function[image[i]];
}
write_bmp(output_image, image_width, image_height);
}
| Add paralellism with race conditions to omp | Add paralellism with race conditions to omp
| C | apache-2.0 | Raane/Parallel-Computing,Raane/Parallel-Computing |
3caf8297799b2b227501404925cf8f1389cf0065 | libc/include/time.h | libc/include/time.h | /******************************************************************************
* Copyright (c) 2004, 2008 IBM Corporation
* All rights reserved.
* This program and the accompanying materials
* are made available under the terms of the BSD License
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php
*
* Contributors:
* IBM Corporation - initial implementation
*****************************************************************************/
#ifndef _TIME_H
#define _TIME_H
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
/* unused in skiboot */
int tm_wday;
int tm_yday;
int tm_isdst;
};
typedef long time_t;
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
struct tm *gmtime_r(const time_t *timep, struct tm *result);
time_t mktime(struct tm *tm);
/* Not implemented by libc but by hosting environment, however
* this is where the prototype is expected
*/
int nanosleep(const struct timespec *req, struct timespec *rem);
#endif /* _TIME_H */
| /******************************************************************************
* Copyright (c) 2004, 2008 IBM Corporation
* All rights reserved.
* This program and the accompanying materials
* are made available under the terms of the BSD License
* which accompanies this distribution, and is available at
* http://www.opensource.org/licenses/bsd-license.php
*
* Contributors:
* IBM Corporation - initial implementation
*****************************************************************************/
#ifndef _TIME_H
#define _TIME_H
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
};
typedef long time_t;
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
};
struct tm *gmtime_r(const time_t *timep, struct tm *result);
time_t mktime(struct tm *tm);
/* Not implemented by libc but by hosting environment, however
* this is where the prototype is expected
*/
int nanosleep(const struct timespec *req, struct timespec *rem);
#endif /* _TIME_H */
| Remove unused struct tm elements | Remove unused struct tm elements
Better to error out than suddenly have places use uninitalized data.
Signed-off-by: Stewart Smith <[email protected]>
| C | apache-2.0 | stewart-ibm/skiboot,legoater/skiboot,csmart/skiboot,legoater/skiboot,apopple/skiboot,open-power/skiboot,legoater/skiboot,stewart-ibm/skiboot,qemu/skiboot,qemu/skiboot,apopple/skiboot,qemu/skiboot,ddstreet/skiboot,shenki/skiboot,shenki/skiboot,mikey/skiboot,qemu/skiboot,legoater/skiboot,open-power/skiboot,ddstreet/skiboot,shenki/skiboot,csmart/skiboot,stewart-ibm/skiboot,legoater/skiboot,mikey/skiboot,csmart/skiboot,qemu/skiboot,ddstreet/skiboot,open-power/skiboot,open-power/skiboot,shenki/skiboot,shenki/skiboot,apopple/skiboot,mikey/skiboot,open-power/skiboot |
f89548fb28969bff4aa298013090037bb45484c5 | media/tx/audio-tx.h | media/tx/audio-tx.h | #ifndef __AUDIO_TX_H__
#define __AUDIO_TX_H__
#include <stdint.h>
init_audio_tx(const char* outfile, int codec_id,
int sample_rate, int bit_rate, int payload_type);
int put_audio_samples_tx(int16_t* samples, int n_samples);
int finish_audio_tx();
#endif /* __AUDIO_TX_H__ */ | #ifndef __AUDIO_TX_H__
#define __AUDIO_TX_H__
#include <stdint.h>
int init_audio_tx(const char* outfile, int codec_id,
int sample_rate, int bit_rate, int payload_type);
int put_audio_samples_tx(int16_t* samples, int n_samples);
int finish_audio_tx();
#endif /* __AUDIO_TX_H__ */ | Add return type in definition of init_audio_tx function. | Add return type in definition of init_audio_tx function.
| C | lgpl-2.1 | Kurento/kc-media-native,Kurento/kc-media-native,shelsonjava/kc-media-native,shelsonjava/kc-media-native |
e9b465ccf6e9ef2294487ea43caa669e94661e97 | digest/DigestOOP.h | digest/DigestOOP.h | #pragma once
#include <memory>
#include <string>
#ifdef __cpp_lib_string_view
#include <string_view>
#endif
namespace oop
{
class Digest
{
public:
virtual ~Digest() {}
virtual void update(const void* data, int len) = 0;
#ifdef __cpp_lib_string_view
void update(std::string_view str) { update(str.data(), str.length());
#endif
virtual std::string digest() = 0;
virtual int length() const = 0;
enum Type
{
SHA1 = 1,
SHA256 = 2,
MD5 = 5,
};
static std::unique_ptr<Digest> create(Type t);
protected:
Digest() {}
private:
Digest(const Digest&) = delete;
void operator=(const Digest&) = delete;
};
}
| #pragma once
#include <memory>
#include <string>
#ifdef __cpp_lib_string_view
#include <string_view>
#endif
namespace oop
{
class Digest
{
public:
virtual ~Digest() {}
virtual void update(const void* data, int len) = 0;
#ifdef __cpp_lib_string_view
void update(std::string_view str)
{
update(str.data(), str.length());
}
#endif
virtual std::string digest() = 0;
virtual int length() const = 0;
enum Type
{
SHA1 = 1,
SHA256 = 2,
MD5 = 5,
};
static std::unique_ptr<Digest> create(Type t);
protected:
Digest() {}
private:
Digest(const Digest&) = delete;
void operator=(const Digest&) = delete;
};
}
| Fix digest oop for C++17. | Fix digest oop for C++17.
| C | bsd-3-clause | chenshuo/recipes,chenshuo/recipes,chenshuo/recipes,chenshuo/recipes,chenshuo/recipes,chenshuo/recipes |
60ababaf9ca888c2e74b840ad69188d84883623b | quic/platform/api/quic_test.h | quic/platform/api/quic_test.h | // Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/quic/platform/impl/quic_test_impl.h"
using QuicFlagSaver = QuicFlagSaverImpl;
// Defines the base classes to be used in QUIC tests.
using QuicTest = QuicTestImpl;
template <class T>
using QuicTestWithParam = QuicTestWithParamImpl<T>;
// Class which needs to be instantiated in tests which use threads.
using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl;
#define QUIC_TEST_DISABLED_IN_CHROME(name) \
QUIC_TEST_DISABLED_IN_CHROME_IMPL(name)
inline std::string QuicGetTestMemoryCachePath() {
return QuicGetTestMemoryCachePathImpl();
#define EXPECT_QUIC_DEBUG_DEATH(condition, message) \
EXPECT_QUIC_DEBUG_DEATH_IMPL(condition, message)
}
#define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test)
#endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
| // Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#include "net/third_party/quiche/src/quic/platform/api/quic_logging.h"
#include "net/quic/platform/impl/quic_test_impl.h"
using QuicFlagSaver = QuicFlagSaverImpl;
// Defines the base classes to be used in QUIC tests.
using QuicTest = QuicTestImpl;
template <class T>
using QuicTestWithParam = QuicTestWithParamImpl<T>;
// Class which needs to be instantiated in tests which use threads.
using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl;
#define QUIC_TEST_DISABLED_IN_CHROME(name) \
QUIC_TEST_DISABLED_IN_CHROME_IMPL(name)
inline std::string QuicGetTestMemoryCachePath() {
return QuicGetTestMemoryCachePathImpl();
}
#define EXPECT_QUIC_DEBUG_DEATH(condition, message) \
EXPECT_QUIC_DEBUG_DEATH_IMPL(condition, message)
#define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test)
#endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
| Fix one curly brace placement in test code | Fix one curly brace placement in test code
gfe-relnote: n/a, test-only
PiperOrigin-RevId: 303203726
Change-Id: I26a7ad68cc83ecd85fe59c5af5998b318302c9a7
| C | bsd-3-clause | google/quiche,google/quiche,google/quiche,google/quiche |
19c6935dad2d04738b1d4289ac2e2791cf7e2569 | rr_impl.c | rr_impl.c | /**
* rr_impl.c
*
* Implementation of functionality specific to round-robin scheduling.
*/
#include "rr_impl.h"
void rr_wake_worker(thread_info_t *info) {
// TODO
}
void rr_wait_for_worker(sched_queue_t *queue) {
// TODO
}
| /**
* rr_impl.c
*
* Implementation of functionality specific to round-robin scheduling.
*/
#include "rr_impl.h"
void rr_wake_worker(thread_info_t *info) {
// TODO
}
void rr_wait(sched_queue_t *queue) {
// TODO
}
| Revert change to rr_wait name | Revert change to rr_wait name
| C | unlicense | nealian/cse325_project4 |
72db37d52802027c30b38181de09413d7ceb8f17 | Source/Objects/GTLBatchQuery.h | Source/Objects/GTLBatchQuery.h | /* Copyright (c) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// GTLBatchQuery.h
//
#import "GTLQuery.h"
@interface GTLBatchQuery : NSObject <GTLQueryProtocol> {
@private
NSMutableArray *queries_;
NSMutableDictionary *requestIDMap_;
BOOL skipAuthorization_;
}
// Queries included in this batch. Each query should have a unique requestID.
@property (retain) NSArray *queries;
// Clients may set this to NO to disallow authorization. Defaults to YES.
@property (assign) BOOL shouldSkipAuthorization;
+ (id)batchQuery;
+ (id)batchQueryWithQueries:(NSArray *)array;
- (void)addQuery:(GTLQuery *)query;
- (GTLQuery *)queryForRequestID:(NSString *)requestID;
@end
| /* Copyright (c) 2011 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//
// GTLBatchQuery.h
//
#import "GTLQuery.h"
@interface GTLBatchQuery : NSObject <GTLQueryProtocol> {
@private
NSMutableArray *queries_;
NSMutableDictionary *requestIDMap_;
BOOL skipAuthorization_;
}
// Queries included in this batch. Each query should have a unique requestID.
@property (retain) NSArray *queries;
// Clients may set this to YES to disallow authorization. Defaults to NO.
@property (assign) BOOL shouldSkipAuthorization;
+ (id)batchQuery;
+ (id)batchQueryWithQueries:(NSArray *)array;
- (void)addQuery:(GTLQuery *)query;
- (GTLQuery *)queryForRequestID:(NSString *)requestID;
@end
| Fix comment on shouldSkipAuthorization property | Fix comment on shouldSkipAuthorization property | C | apache-2.0 | justinhouse/google-api-objectivec-client,nanthi1990/google-api-objectivec-client,CarlosTrejo/google-api-objectivec-client,JonasGessner/google-api-objectivec-client,creationst/google-api-objectivec-client,daffodilistic/google-api-objectivec-client,clody/google-api-objectivec-client,JonasGessner/google-api-objectivec-client,johndpope/google-api-objectivec-client,TigrilloInc/google-api-objectivec-client,alimills/google-api-swift-client,SheltonWan/google-api-objectivec-client |
3d69da22fd2a3aef7f34bdaddd379b8c8a57442a | include/cling/Interpreter/CIFactory.h | include/cling/Interpreter/CIFactory.h | //--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author: Axel Naumann <[email protected]>
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
#ifndef CLING_CIFACTORY_H
#define CLING_CIFACTORY_H
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/ADT/StringRef.h"
namespace llvm {
class LLVMContext;
class MemoryBuffer;
}
namespace clang {
class DiagnosticsEngine;
}
namespace cling {
class DeclCollector;
class CIFactory {
public:
// TODO: Add overload that takes file not MemoryBuffer
static clang::CompilerInstance* createCI(llvm::StringRef code,
int argc,
const char* const *argv,
const char* llvmdir);
static clang::CompilerInstance* createCI(llvm::MemoryBuffer* buffer,
int argc,
const char* const *argv,
const char* llvmdir,
DeclCollector* stateCollector);
private:
//---------------------------------------------------------------------
//! Constructor
//---------------------------------------------------------------------
CIFactory() {}
~CIFactory() {}
static void SetClingCustomLangOpts(clang::LangOptions& Opts);
static void SetClingTargetLangOpts(clang::LangOptions& Opts,
const clang::TargetInfo& Target);
};
} // namespace cling
#endif // CLING_CIFACTORY_H
| //--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author: Axel Naumann <[email protected]>
//
// This file is dual-licensed: you can choose to license it under the University
// of Illinois Open Source License or the GNU Lesser General Public License. See
// LICENSE.TXT for details.
//------------------------------------------------------------------------------
#ifndef CLING_CIFACTORY_H
#define CLING_CIFACTORY_H
#include "clang/Frontend/CompilerInstance.h"
#include "llvm/ADT/StringRef.h"
namespace llvm {
class LLVMContext;
class MemoryBuffer;
}
namespace clang {
class DiagnosticsEngine;
}
namespace cling {
class DeclCollector;
class CIFactory {
public:
// TODO: Add overload that takes file not MemoryBuffer
static clang::CompilerInstance* createCI(llvm::StringRef code,
int argc,
const char* const *argv,
const char* llvmdir);
static clang::CompilerInstance* createCI(llvm::MemoryBuffer* buffer,
int argc,
const char* const *argv,
const char* llvmdir,
DeclCollector* stateCollector);
private:
//---------------------------------------------------------------------
//! Constructor
//---------------------------------------------------------------------
CIFactory() = delete;
~CIFactory() = delete;
};
} // namespace cling
#endif // CLING_CIFACTORY_H
| Remove unneeded static member decls; mark c'tor, d'tor as deleted. | Remove unneeded static member decls; mark c'tor, d'tor as deleted.
| C | lgpl-2.1 | root-mirror/cling,karies/cling,perovic/cling,perovic/cling,marsupial/cling,root-mirror/cling,root-mirror/cling,root-mirror/cling,marsupial/cling,root-mirror/cling,marsupial/cling,marsupial/cling,karies/cling,perovic/cling,marsupial/cling,perovic/cling,marsupial/cling,karies/cling,karies/cling,perovic/cling,karies/cling,karies/cling,root-mirror/cling |
dbd6b3e85542d816e7d912a817fc430353c73068 | tests/regression/15-deadlock/19-fail_deadlock.c | tests/regression/15-deadlock/19-fail_deadlock.c | // PARAM: --set ana.activated[+] deadlock --enable sem.lock.fail
#include <pthread.h>
#include <stdio.h>
int g1, g2;
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER;
void *t1(void *arg) {
pthread_mutex_lock(&mutex1);
pthread_mutex_lock(&mutex2); // DEADLOCK
g1 = g2 + 1;
pthread_mutex_unlock(&mutex2);
pthread_mutex_unlock(&mutex1);
return NULL;
}
void *t2(void *arg) {
pthread_mutex_lock(&mutex2);
pthread_mutex_lock(&mutex1); // DEADLOCK
g2 = g1 + 1;
pthread_mutex_unlock(&mutex1);
pthread_mutex_unlock(&mutex2);
return NULL;
}
int main(void) {
pthread_t id1, id2;
int i;
for (i = 0; i < 10000; i++) {
pthread_create(&id1, NULL, t1, NULL);
pthread_create(&id2, NULL, t2, NULL);
pthread_join (id1, NULL);
pthread_join (id2, NULL);
printf("%d: g1 = %d, g2 = %d.\n", i, g1, g2);
}
return 0;
}
| Test mutexEvents based deadlock with failing locks | Test mutexEvents based deadlock with failing locks
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
c37054eec60c9424923ec895d7dc23d744cd0b53 | Expecta/Expecta.h | Expecta/Expecta.h | #import <Foundation/Foundation.h>
//! Project version number for Expecta.
FOUNDATION_EXPORT double ExpectaVersionNumber;
//! Project version string for Expecta.
FOUNDATION_EXPORT const unsigned char ExpectaVersionString[];
#import <Expecta/ExpectaObject.h>
#import <Expecta/ExpectaSupport.h>
#import <Expecta/EXPMatchers.h>
// Enable shorthand by default
#define expect(...) EXP_expect((__VA_ARGS__))
#define failure(...) EXP_failure((__VA_ARGS__)) | #import <Foundation/Foundation.h>
//! Project version number for Expecta.
FOUNDATION_EXPORT double ExpectaVersionNumber;
//! Project version string for Expecta.
FOUNDATION_EXPORT const unsigned char ExpectaVersionString[];
#import <Expecta/ExpectaObject.h>
#import <Expecta/ExpectaSupport.h>
#import <Expecta/EXPMatchers.h>
// Enable shorthand by default
#define expect(...) EXP_expect((__VA_ARGS__))
#define failure(...) EXP_failure((__VA_ARGS__))
| Add newline to the end of the umbrella header | Add newline to the end of the umbrella header
| C | mit | tonyarnold/expecta,Lightricks/expecta,modocache/expecta,modocache/expecta,suxinde2009/expecta,iosdev-republicofapps/expecta,tonyarnold/expecta,udemy/expecta,suxinde2009/expecta,PatrykKaczmarek/expecta,wessmith/expecta,modocache/expecta,iosdev-republicofapps/expecta,specta/expecta,Bogon/expecta,jmburges/expecta,jmoody/expecta,PatrykKaczmarek/expecta,Lightricks/expecta,jmoody/expecta,iguchunhui/expecta,wessmith/expecta,iosdev-republicofapps/expecta,PatrykKaczmarek/expecta,iosdev-republicofapps/expecta,PatrykKaczmarek/expecta,udemy/expecta,jmburges/expecta,tonyarnold/expecta,jmoody/expecta,Bogon/expecta,jmburges/expecta,jmoody/expecta,modocache/expecta,iguchunhui/expecta,tonyarnold/expecta,jmburges/expecta |
40b4170a0ccd05ae95589f55d989f0727f060367 | ios/template/GMPExample/AppDelegate.h | ios/template/GMPExample/AppDelegate.h | //
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
| //
// Copyright (c) 2015 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
| Fix order of property attributes | Fix order of property attributes
Change-Id: I7a313d25a6707bada03328b0799300f07a26ba3b
| C | apache-2.0 | martijndebruijn/google-services,martijndebruijn/google-services,martijndebruijn/google-services,martijndebruijn/google-services |
3cc1b3d340ecf3a2b742ce6d32fa4a47f457af0f | src/log.c | src/log.c |
#include <imageloader.h>
#include "context.h"
#include <stdio.h>
#include <stdarg.h>
void print_to_log(ImgloadContext ctx, ImgloadLogLevel level, const char* format, ...)
{
if (!ctx->log.handler)
{
return;
}
if (level < ctx->log.minLevel)
{
return;
}
char buffer[1024];
va_list args;
va_start(args, format);
vsnprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), format, args);
ctx->log.handler(ctx->log.ud, level, buffer);
va_end(args);
} |
#include <imageloader.h>
#include "log.h"
#include "context.h"
#include <stdio.h>
#include <stdarg.h>
void print_to_log(ImgloadContext ctx, ImgloadLogLevel level, const char* format, ...)
{
if (!ctx->log.handler)
{
return;
}
if (level < ctx->log.minLevel)
{
return;
}
char buffer[1024];
va_list args;
va_start(args, format);
vsnprintf(buffer, sizeof(buffer) / sizeof(buffer[0]), format, args);
ctx->log.handler(ctx->log.ud, level, buffer);
va_end(args);
} | Include the header in the source file | Include the header in the source file
| C | mit | asarium/imageloader,asarium/imageloader,asarium/imageloader |
85f93b1bcff3ae1eb6b65bb932a982f29eb456cf | problem_007.c | problem_007.c | #include <stdio.h>
#include "euler.h"
#define PROBLEM 7
#define ANSWER 104743
int
is_prime(int num)
{
if(num < 2) {
return 0;
} else if(num == 2) {
return 1;
}
for(int y = 2; y < num; y++) {
if(num % y == 0) {
return 0;
}
}
return 1;
}
int
main(int argc, char **argv)
{
int number = 0, found = 0;
do {
number++;
if(is_prime(number)) {
found++;
}
} while(found < 10001);
return check(PROBLEM, ANSWER, number);
}
| Add solution for problem 7 | Add solution for problem 7
| C | bsd-2-clause | skreuzer/euler |
|
d952cdee083b9b4a5af4f6d58cbda03add196ceb | src/net/instaweb/util/public/re2.h | src/net/instaweb/util/public/re2.h | /*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: [email protected] (Gagan Singh)
#ifndef NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
#define NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
#include "net/instaweb/util/public/string_util.h"
#include "third_party/re2/src/re2/re2.h"
using re2::RE2;
// Converts a Google StringPiece into an RE2 StringPiece. These are of course
// the same basic thing but are declared in distinct namespaces and as far as
// C++ type-checking is concerned they are incompatible.
//
// TODO(jmarantz): In the re2 code itself there are no references to
// re2::StringPiece, always just plain StringPiece, so if we can
// arrange to get the right definition #included we should be all set.
// We could somehow rewrite '#include "re2/stringpiece.h"' to
// #include Chromium's stringpiece then everything would just work.
inline re2::StringPiece StringPieceToRe2(StringPiece sp) {
return re2::StringPiece(sp.data(), sp.size());
}
#endif // NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
| /*
* Copyright 2012 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Author: [email protected] (Gagan Singh)
#ifndef NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
#define NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
// TODO(morlovich): Remove this forwarding header and change all references.
#include "pagespeed/kernel/util/re2.h"
#endif // NET_INSTAWEB_UTIL_PUBLIC_RE2_H_
| Make this a proper forwarding header rather than a duplication what's under pagespeed/util/ | Make this a proper forwarding header rather than
a duplication what's under pagespeed/util/
| C | apache-2.0 | patricmutwiri/mod_pagespeed,pagespeed/mod_pagespeed,patricmutwiri/mod_pagespeed,webhost/mod_pagespeed,patricmutwiri/mod_pagespeed,ajayanandgit/mod_pagespeed,webscale-networks/mod_pagespeed,patricmutwiri/mod_pagespeed,hashashin/src,VersoBit/mod_pagespeed,patricmutwiri/mod_pagespeed,webscale-networks/mod_pagespeed,webhost/mod_pagespeed,jalonsoa/mod_pagespeed,jalonsoa/mod_pagespeed,jalonsoa/mod_pagespeed,ajayanandgit/mod_pagespeed,VersoBit/mod_pagespeed,webscale-networks/mod_pagespeed,hashashin/src,VersoBit/mod_pagespeed,wanrui/mod_pagespeed,webhost/mod_pagespeed,webscale-networks/mod_pagespeed,webscale-networks/mod_pagespeed,ajayanandgit/mod_pagespeed,wanrui/mod_pagespeed,VersoBit/mod_pagespeed,wanrui/mod_pagespeed,patricmutwiri/mod_pagespeed,hashashin/src,pagespeed/mod_pagespeed,webhost/mod_pagespeed,hashashin/src,ajayanandgit/mod_pagespeed,patricmutwiri/mod_pagespeed,webhost/mod_pagespeed,webscale-networks/mod_pagespeed,pagespeed/mod_pagespeed,wanrui/mod_pagespeed,webhost/mod_pagespeed,webhost/mod_pagespeed,webscale-networks/mod_pagespeed,wanrui/mod_pagespeed,VersoBit/mod_pagespeed,pagespeed/mod_pagespeed,hashashin/src,pagespeed/mod_pagespeed,jalonsoa/mod_pagespeed,hashashin/src,webscale-networks/mod_pagespeed,jalonsoa/mod_pagespeed,patricmutwiri/mod_pagespeed,pagespeed/mod_pagespeed,jalonsoa/mod_pagespeed,hashashin/src,VersoBit/mod_pagespeed,VersoBit/mod_pagespeed,ajayanandgit/mod_pagespeed,jalonsoa/mod_pagespeed,ajayanandgit/mod_pagespeed,wanrui/mod_pagespeed,hashashin/src,ajayanandgit/mod_pagespeed,wanrui/mod_pagespeed,pagespeed/mod_pagespeed,ajayanandgit/mod_pagespeed,wanrui/mod_pagespeed,webhost/mod_pagespeed,jalonsoa/mod_pagespeed |
2c23625aeeb91c496f68abd812eab53b6d87bae5 | arch/loongson/include/vmparam.h | arch/loongson/include/vmparam.h | /* $OpenBSD: vmparam.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 2 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| /* $OpenBSD: vmparam.h,v 1.4 2014/03/27 21:58:13 miod Exp $ */
/* public domain */
#ifndef _MACHINE_VMPARAM_H_
#define _MACHINE_VMPARAM_H_
#define VM_PHYSSEG_MAX 3 /* Max number of physical memory segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
#include <mips64/vmparam.h>
#endif /* _MACHINE_VMPARAM_H_ */
| Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memory (such as 2E and 3A systems). | Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memory
(such as 2E and 3A systems).
| C | isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars |
b191b25f364aa679173756114884231b4314eb24 | tests/file_utils_tests.c | tests/file_utils_tests.c | #include "minunit.h"
#include <terror/file_utils.h>
#include <assert.h>
char *test_getlines()
{
bstring str = bfromcstr("one\ntwo\nthree\nfour\nfive\n");
struct bstrList *file = bsplit(str, '\n');
DArray *lines = getlines(file, 2, 4);
mu_assert(DArray_count(lines) == 3, "Wrong number of lines.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 0), bfromcstr("two")) == 0, "First line is wrong.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 1), bfromcstr("three")) == 0, "Second line is wrong.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 2), bfromcstr("four")) == 0, "Third line is wrong.");
return NULL;
}
char *all_tests() {
mu_suite_start();
mu_run_test(test_getlines);
return NULL;
}
RUN_TESTS(all_tests);
| #include "minunit.h"
#include <terror/file_utils.h>
#include <assert.h>
char *test_getlines()
{
bstring str = bfromcstr("one\ntwo\nthree\nfour\nfive\n");
struct bstrList *file = bsplit(str, '\n');
DArray *lines = getlines(file, 2, 4);
bstring two = bfromcstr("two");
bstring three = bfromcstr("three");
bstring four = bfromcstr("four");
mu_assert(DArray_count(lines) == 3, "Wrong number of lines.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 0), two) == 0, "First line is wrong.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 1), three) == 0, "Second line is wrong.");
mu_assert(bstrcmp((bstring)DArray_at(lines, 2), four) == 0, "Third line is wrong.");
bstrListDestroy(file);
bdestroy(str);
bdestroy(two);
bdestroy(three);
bdestroy(four);
DArray_destroy(lines);
return NULL;
}
char *all_tests() {
mu_suite_start();
mu_run_test(test_getlines);
return NULL;
}
RUN_TESTS(all_tests);
| Make file utils tests valgrind-kosher | Make file utils tests valgrind-kosher
| C | mit | txus/terrorvm,txus/terrorvm,txus/terrorvm,txus/terrorvm |
8a27a0ecdcdb99fbeedd793be114a9f99a84491d | tests/regression/36-apron/97-no-loc.c | tests/regression/36-apron/97-no-loc.c | // SKIP PARAM: --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.activated[+] threadJoins --sets ana.apron.privatization mutex-meet-tid --disable ana.thread.include-loc
#include <pthread.h>
#include <assert.h>
int g = 10;
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
void *t_benign(void *arg) {
pthread_mutex_lock(&A);
g = 20;
pthread_mutex_unlock(&A);
return NULL;
}
int main(void) {
int t;
// Force multi-threaded handling
pthread_t id2;
if(t) {
pthread_create(&id2, NULL, t_benign, NULL);
} else {
pthread_create(&id2, NULL, t_benign, NULL);
}
pthread_join(id2, NULL);
pthread_mutex_lock(&A);
g = 12;
pthread_mutex_unlock(&A);
pthread_mutex_lock(&A);
assert(g == 12);
pthread_mutex_unlock(&A);
return 0;
}
| Add example that gets more precise when the location is not part of the TID | Add example that gets more precise when the location is not part of the TID
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
f992b8ba5b714f65f607237ff8b4c77dd4856206 | malaria_instruments.h | malaria_instruments.h | #include <MozziGuts.h>
#include <Oscil.h>
#include <ADSR.h>
#include <mozzi_midi.h>
#include <tables/sin2048_int8.h>
#define applyGain(v, g) ((v * g) >> 8)
class MalariaInstrument {
public:
MalariaInstrument() {};
virtual void noteOn(byte note, byte velocity);
virtual void noteOff(byte note, byte velocity);
virtual void updateControl();
virtual int updateAudio();
virtual bool isPlaying();
protected:
};
class FMBell : public MalariaInstrument {
public:
FMBell() {
aCarrier.setTable(SIN2048_DATA);
aModulator.setTable(SIN2048_DATA);
aCarrier.setFreq(0);
aModulator.setFreq(0);
modEnv.setIdleLevel(0);
modEnv.setLevels(255, 0, 0, 0);
modEnv.setTimes(20, 2000, 0, 0);
carEnv.setIdleLevel(0);
carEnv.setLevels(255, 0, 0, 0);
carEnv.setTimes(20, 2000, 0, 0);
gate = false;
gain = 0;
}
void noteOn(byte note, byte velocity) {
float fundamentalHz = mtof(float(note));
carrierFreq = float_to_Q16n16(fundamentalHz * 5.f);
modulatorFreq = float_to_Q16n16(fundamentalHz * 7.f);
deviation = (modulatorFreq>>16) * mod_index;
aModulator.setFreq_Q16n16(modulatorFreq);
aCarrier.setFreq_Q16n16(carrierFreq);
modEnv.noteOn();
carEnv.noteOn();
gate = true;
gain = velocity;
}
void noteOff(byte note, byte velocity) {
gate = false;
}
void updateControl() {
modEnv.update();
carEnv.update();
}
int updateAudio() {
if (gate) {
Q15n16 modulation = applyGain(deviation, applyGain(aModulator.next(), modEnv.next()));
return applyGain(applyGain(aCarrier.phMod(modulation), carEnv.next()), gain);
} else {
return 0;
}
}
bool isPlaying() {
return gate;
}
private:
const Q8n8 mod_index = float_to_Q8n8(1.0f);
Oscil<SIN2048_NUM_CELLS, AUDIO_RATE> aCarrier;
Oscil<SIN2048_NUM_CELLS, AUDIO_RATE> aModulator;
ADSR <CONTROL_RATE, AUDIO_RATE> modEnv;
ADSR <CONTROL_RATE, AUDIO_RATE> carEnv;
Q16n16 carrierFreq, modulatorFreq, deviation;
byte gain;
bool gate;
};
| Add header for standard instruments. | Add header for standard instruments.
| C | mit | anarkiwi/Malaria |
|
4d2173704ae6884eaab3e9f702fb910bfb84c30d | base/scoped_handle.h | base/scoped_handle.h | // Copyright (c) 2006-2008 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 BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base/scoped_handle_win.h"
#endif
class ScopedStdioHandle {
public:
ScopedStdioHandle()
: handle_(NULL) { }
explicit ScopedStdioHandle(FILE* handle)
: handle_(handle) { }
~ScopedStdioHandle() {
Close();
}
void Close() {
if (handle_) {
fclose(handle_);
handle_ = NULL;
}
}
FILE* get() const { return handle_; }
FILE* Take() {
FILE* temp = handle_;
handle_ = NULL;
return temp;
}
void Set(FILE* newhandle) {
Close();
handle_ = newhandle;
}
private:
FILE* handle_;
DISALLOW_EVIL_CONSTRUCTORS(ScopedStdioHandle);
};
#endif // BASE_SCOPED_HANDLE_H_
| // Copyright (c) 2006-2008 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 BASE_SCOPED_HANDLE_H_
#define BASE_SCOPED_HANDLE_H_
#include <stdio.h>
#include "base/basictypes.h"
#if defined(OS_WIN)
#include "base/scoped_handle_win.h"
#endif
class ScopedStdioHandle {
public:
ScopedStdioHandle()
: handle_(NULL) { }
explicit ScopedStdioHandle(FILE* handle)
: handle_(handle) { }
~ScopedStdioHandle() {
Close();
}
void Close() {
if (handle_) {
fclose(handle_);
handle_ = NULL;
}
}
FILE* get() const { return handle_; }
FILE* Take() {
FILE* temp = handle_;
handle_ = NULL;
return temp;
}
void Set(FILE* newhandle) {
Close();
handle_ = newhandle;
}
private:
FILE* handle_;
DISALLOW_EVIL_CONSTRUCTORS(ScopedStdioHandle);
};
#endif // BASE_SCOPED_HANDLE_H_
| Add stdio to this file becasue we use FILE. | Add stdio to this file becasue we use FILE.
It starts failing with FILE, identifier not found, when
you remove the include for logging.h, which is included
in scoped_handle_win.h
Review URL: http://codereview.chromium.org/16461
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@7441 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium |
118fccc561b32dd8d7396786402b9035bd667b32 | libpolyml/basicio.h | libpolyml/basicio.h | /*
Title: Basic IO.
Copyright (c) 2000 David C. J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef BASICIO_H
#define BASICIO_H
class SaveVecEntry;
typedef SaveVecEntry *Handle;
class TaskData;
extern Handle IO_dispatch_c(TaskData *mdTaskData, Handle args, Handle strm, Handle code);
extern Handle change_dirc(TaskData *mdTaskData, Handle name);
#ifndef WINDOWS_PC
extern void process_may_block(TaskData *taskData, int fd, int ioCall);
#endif
#endif /* BASICIO_H */
| /*
Title: Basic IO.
Copyright (c) 2000 David C. J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef BASICIO_H
#define BASICIO_H
class SaveVecEntry;
typedef SaveVecEntry *Handle;
class TaskData;
extern Handle IO_dispatch_c(TaskData *mdTaskData, Handle args, Handle strm, Handle code);
extern Handle change_dirc(TaskData *mdTaskData, Handle name);
#endif /* BASICIO_H */
| Remove process_may_block since it's no longer used except in xwindows.cpp. | Remove process_may_block since it's no longer used except in xwindows.cpp.
git-svn-id: 98787b36aaefbae4b30fa755be920954cd25e1e4@548 ae7d391e-3f74-4a2b-a0db-a8776840fd2a
| C | lgpl-2.1 | mn200/polyml,mn200/polyml,dcjm/polyml,dcjm/polyml,polyml/polyml,polyml/polyml,dcjm/polyml,mn200/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,mn200/polyml |
0090ec7cb0d38cc29bf18b31c31a142e8f199f33 | include/effects/SkStippleMaskFilter.h | include/effects/SkStippleMaskFilter.h | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkStippleMaskFilter_DEFINED
#define SkStippleMaskFilter_DEFINED
#include "SkMaskFilter.h"
/**
* Simple MaskFilter that creates a screen door stipple pattern
*/
class SkStippleMaskFilter : public SkMaskFilter {
public:
SkStippleMaskFilter() : INHERITED() {
}
virtual bool filterMask(SkMask* dst, const SkMask& src,
const SkMatrix& matrix,
SkIPoint* margin) SK_OVERRIDE;
// getFormat is from SkMaskFilter
virtual SkMask::Format getFormat() SK_OVERRIDE {
return SkMask::kA8_Format;
}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter);
protected:
SkStippleMaskFilter::SkStippleMaskFilter(SkFlattenableReadBuffer& buffer)
: SkMaskFilter(buffer) {
}
private:
typedef SkMaskFilter INHERITED;
};
#endif // SkStippleMaskFilter_DEFINED | /*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkStippleMaskFilter_DEFINED
#define SkStippleMaskFilter_DEFINED
#include "SkMaskFilter.h"
/**
* Simple MaskFilter that creates a screen door stipple pattern
*/
class SkStippleMaskFilter : public SkMaskFilter {
public:
SkStippleMaskFilter() : INHERITED() {
}
virtual bool filterMask(SkMask* dst, const SkMask& src,
const SkMatrix& matrix,
SkIPoint* margin) SK_OVERRIDE;
// getFormat is from SkMaskFilter
virtual SkMask::Format getFormat() SK_OVERRIDE {
return SkMask::kA8_Format;
}
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkStippleMaskFilter);
protected:
SkStippleMaskFilter(SkFlattenableReadBuffer& buffer)
: SkMaskFilter(buffer) {
}
private:
typedef SkMaskFilter INHERITED;
};
#endif // SkStippleMaskFilter_DEFINED
| Fix for compiler error in r4154 | Fix for compiler error in r4154
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@4155 2bbb7eff-a529-9590-31e7-b0007b416f81
| C | bsd-3-clause | geekboxzone/mmallow_external_skia,geekboxzone/lollipop_external_skia,Igalia/skia,CyanogenMod/android_external_chromium_org_third_party_skia,android-ia/platform_external_chromium_org_third_party_skia,Fusion-Rom/external_chromium_org_third_party_skia,MIPS/external-chromium_org-third_party-skia,android-ia/platform_external_chromium_org_third_party_skia,xin3liang/platform_external_chromium_org_third_party_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,nox/skia,AOSPA-L/android_external_skia,TeamBliss-LP/android_external_skia,Pure-Aosp/android_external_skia,akiss77/skia,MinimalOS/android_external_chromium_org_third_party_skia,w3nd1go/android_external_skia,mozilla-b2g/external_skia,Hybrid-Rom/external_skia,HalCanary/skia-hc,DesolationStaging/android_external_skia,RadonX-ROM/external_skia,DesolationStaging/android_external_skia,Android-AOSP/external_skia,aospo/platform_external_skia,Omegaphora/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,DiamondLovesYou/skia-sys,Igalia/skia,google/skia,TeamTwisted/external_skia,MinimalOS/external_skia,MyAOSP/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,MinimalOS-AOSP/platform_external_skia,byterom/android_external_skia,Fusion-Rom/android_external_skia,vvuk/skia,AOSPB/external_skia,spezi77/android_external_skia,shahrzadmn/skia,AOSPU/external_chromium_org_third_party_skia,todotodoo/skia,OneRom/external_skia,mydongistiny/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,shahrzadmn/skia,Euphoria-OS-Legacy/android_external_skia,OptiPop/external_chromium_org_third_party_skia,OneRom/external_skia,UBERMALLOW/external_skia,TeamExodus/external_skia,aospo/platform_external_skia,noselhq/skia,codeaurora-unoffical/platform-external-skia,MinimalOS/android_external_skia,Infinitive-OS/platform_external_skia,pcwalton/skia,TeslaProject/external_skia,pcwalton/skia,Infusion-OS/android_external_skia,rubenvb/skia,sombree/android_external_skia,Plain-Andy/android_platform_external_skia,Samsung/skia,RadonX-ROM/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,chenlian2015/skia_from_google,wildermason/external_skia,suyouxin/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSP-YU/platform_external_skia,chenlian2015/skia_from_google,ctiao/platform-external-skia,BrokenROM/external_skia,pacerom/external_skia,ominux/skia,TeamExodus/external_skia,scroggo/skia,TeamTwisted/external_skia,fire855/android_external_skia,HealthyHoney/temasek_SKIA,amyvmiwei/skia,Asteroid-Project/android_external_skia,geekboxzone/lollipop_external_skia,sombree/android_external_skia,AOSPU/external_chromium_org_third_party_skia,NamelessRom/android_external_skia,GladeRom/android_external_skia,suyouxin/android_external_skia,TeamBliss-LP/android_external_skia,DARKPOP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,Fusion-Rom/android_external_skia,ominux/skia,mmatyas/skia,OptiPop/external_skia,nvoron23/skia,aosp-mirror/platform_external_skia,AOSP-YU/platform_external_skia,mydongistiny/android_external_skia,FusionSP/external_chromium_org_third_party_skia,akiss77/skia,samuelig/skia,boulzordev/android_external_skia,jtg-gg/skia,NamelessRom/android_external_skia,pacerom/external_skia,AndroidOpenDevelopment/android_external_skia,Hikari-no-Tenshi/android_external_skia,DiamondLovesYou/skia-sys,invisiblek/android_external_skia,vvuk/skia,VRToxin-AOSP/android_external_skia,AOSPU/external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,mmatyas/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,ominux/skia,TeslaProject/external_skia,DARKPOP/external_chromium_org_third_party_skia,wildermason/external_skia,sudosurootdev/external_skia,akiss77/skia,w3nd1go/android_external_skia,geekboxzone/mmallow_external_skia,MonkeyZZZZ/platform_external_skia,samuelig/skia,AOSPB/external_skia,RadonX-ROM/external_skia,Asteroid-Project/android_external_skia,OneRom/external_skia,codeaurora-unoffical/platform-external-skia,w3nd1go/android_external_skia,larsbergstrom/skia,sudosurootdev/external_skia,YUPlayGodDev/platform_external_skia,TeamExodus/external_skia,MarshedOut/android_external_skia,nox/skia,AsteroidOS/android_external_skia,geekboxzone/lollipop_external_skia,HalCanary/skia-hc,fire855/android_external_skia,FusionSP/android_external_skia,TeslaOS/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,OneRom/external_skia,vanish87/skia,Purity-Lollipop/platform_external_skia,Pure-Aosp/android_external_skia,sigysmund/platform_external_skia,DesolationStaging/android_external_skia,Hikari-no-Tenshi/android_external_skia,amyvmiwei/skia,MonkeyZZZZ/platform_external_skia,mmatyas/skia,invisiblek/android_external_skia,ench0/external_chromium_org_third_party_skia,codeaurora-unoffical/platform-external-skia,MyAOSP/external_chromium_org_third_party_skia,Hikari-no-Tenshi/android_external_skia,scroggo/skia,DesolationStaging/android_external_skia,pacerom/external_skia,timduru/platform-external-skia,Infinitive-OS/platform_external_skia,temasek/android_external_skia,Android-AOSP/external_skia,pcwalton/skia,larsbergstrom/skia,Khaon/android_external_skia,rubenvb/skia,mydongistiny/android_external_skia,Pure-Aosp/android_external_skia,Samsung/skia,MarshedOut/android_external_skia,Omegaphora/external_skia,VentureROM-L/android_external_skia,HealthyHoney/temasek_SKIA,spezi77/android_external_skia,AndroidOpenDevelopment/android_external_skia,Tesla-Redux/android_external_skia,Euphoria-OS-Legacy/android_external_skia,Infinitive-OS/platform_external_skia,jtg-gg/skia,invisiblek/android_external_skia,Purity-Lollipop/platform_external_skia,todotodoo/skia,Jichao/skia,Igalia/skia,TeamEOS/external_skia,FusionSP/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,AndroidOpenDevelopment/android_external_skia,mozilla-b2g/external_skia,larsbergstrom/skia,mmatyas/skia,DARKPOP/external_chromium_org_third_party_skia,google/skia,HealthyHoney/temasek_SKIA,todotodoo/skia,UBERMALLOW/external_skia,Euphoria-OS-Legacy/android_external_skia,wildermason/external_skia,TeamExodus/external_skia,VentureROM-L/android_external_skia,DiamondLovesYou/skia-sys,MinimalOS/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,VentureROM-L/android_external_skia,temasek/android_external_skia,F-AOSP/platform_external_skia,google/skia,wildermason/external_skia,shahrzadmn/skia,HealthyHoney/temasek_SKIA,vanish87/skia,AOSPA-L/android_external_skia,ench0/external_skia,jtg-gg/skia,google/skia,vanish87/skia,TeslaOS/android_external_skia,amyvmiwei/skia,DARKPOP/external_chromium_org_third_party_skia,MinimalOS/android_external_skia,sigysmund/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,vvuk/skia,todotodoo/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,AOSPB/external_skia,UBERMALLOW/external_skia,F-AOSP/platform_external_skia,pcwalton/skia,MinimalOS/external_skia,samuelig/skia,ominux/skia,Igalia/skia,ench0/external_chromium_org_third_party_skia,ominux/skia,HalCanary/skia-hc,Euphoria-OS-Legacy/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,SlimSaber/android_external_skia,SlimSaber/android_external_skia,pcwalton/skia,NamelessRom/android_external_skia,Jichao/skia,TeamEOS/external_chromium_org_third_party_skia,geekboxzone/lollipop_external_skia,Fusion-Rom/android_external_skia,fire855/android_external_skia,wildermason/external_skia,shahrzadmn/skia,akiss77/skia,mozilla-b2g/external_skia,InfinitiveOS/external_skia,AndroidOpenDevelopment/android_external_skia,nox/skia,MarshedOut/android_external_skia,DesolationStaging/android_external_skia,vanish87/skia,houst0nn/external_skia,geekboxzone/lollipop_external_skia,nfxosp/platform_external_skia,DesolationStaging/android_external_skia,sudosurootdev/external_skia,Infusion-OS/android_external_skia,qrealka/skia-hc,noselhq/skia,ominux/skia,samuelig/skia,RadonX-ROM/external_skia,Omegaphora/external_skia,noselhq/skia,qrealka/skia-hc,TeslaOS/android_external_skia,Infinitive-OS/platform_external_skia,TeamEOS/external_chromium_org_third_party_skia,Asteroid-Project/android_external_skia,noselhq/skia,YUPlayGodDev/platform_external_skia,Hikari-no-Tenshi/android_external_skia,sombree/android_external_skia,scroggo/skia,VentureROM-L/android_external_skia,byterom/android_external_skia,Tesla-Redux/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,nvoron23/skia,amyvmiwei/skia,Khaon/android_external_skia,byterom/android_external_skia,nvoron23/skia,AOSPA-L/android_external_skia,MinimalOS-AOSP/platform_external_skia,suyouxin/android_external_skia,AOSPB/external_skia,Omegaphora/external_chromium_org_third_party_skia,mozilla-b2g/external_skia,AOSPA-L/android_external_skia,fire855/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,geekboxzone/mmallow_external_skia,PAC-ROM/android_external_skia,PAC-ROM/android_external_skia,Pure-Aosp/android_external_skia,aosp-mirror/platform_external_skia,NamelessRom/android_external_skia,noselhq/skia,Plain-Andy/android_platform_external_skia,AOSPU/external_chromium_org_third_party_skia,TeamBliss-LP/android_external_skia,PAC-ROM/android_external_skia,Fusion-Rom/android_external_skia,Infusion-OS/android_external_skia,VentureROM-L/android_external_skia,xzzz9097/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,mozilla-b2g/external_skia,sombree/android_external_skia,nox/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,GladeRom/android_external_skia,vvuk/skia,temasek/android_external_skia,geekboxzone/mmallow_external_skia,pacerom/external_skia,RadonX-ROM/external_skia,Omegaphora/external_chromium_org_third_party_skia,shahrzadmn/skia,Tesla-Redux/android_external_skia,PAC-ROM/android_external_skia,BrokenROM/external_skia,MIPS/external-chromium_org-third_party-skia,nox/skia,YUPlayGodDev/platform_external_skia,qrealka/skia-hc,Hikari-no-Tenshi/android_external_skia,w3nd1go/android_external_skia,TeslaProject/external_skia,YUPlayGodDev/platform_external_skia,Purity-Lollipop/platform_external_skia,AOSPB/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,MinimalOS-AOSP/platform_external_skia,TeslaProject/external_skia,AOSPA-L/android_external_skia,vvuk/skia,DiamondLovesYou/skia-sys,mydongistiny/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,google/skia,Tesla-Redux/android_external_skia,vvuk/skia,rubenvb/skia,Hybrid-Rom/external_skia,geekboxzone/mmallow_external_skia,AndroidOpenDevelopment/android_external_skia,TeamEOS/external_skia,pacerom/external_skia,AOSPB/external_skia,Pure-Aosp/android_external_skia,sigysmund/platform_external_skia,Android-AOSP/external_skia,xzzz9097/android_external_skia,TeamEOS/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,OneRom/external_skia,YUPlayGodDev/platform_external_skia,HealthyHoney/temasek_SKIA,todotodoo/skia,F-AOSP/platform_external_skia,YUPlayGodDev/platform_external_skia,Samsung/skia,TeamExodus/external_skia,rubenvb/skia,TeamExodus/external_skia,google/skia,PAC-ROM/android_external_skia,temasek/android_external_skia,NamelessRom/android_external_skia,temasek/android_external_skia,todotodoo/skia,Infusion-OS/android_external_skia,tmpvar/skia.cc,AsteroidOS/android_external_skia,Infusion-OS/android_external_skia,Plain-Andy/android_platform_external_skia,Plain-Andy/android_platform_external_skia,DiamondLovesYou/skia-sys,Euphoria-OS-Legacy/android_external_skia,larsbergstrom/skia,android-ia/platform_external_chromium_org_third_party_skia,FusionSP/android_external_skia,MinimalOS/external_skia,AOSP-YU/platform_external_skia,fire855/android_external_skia,DiamondLovesYou/skia-sys,geekboxzone/lollipop_external_skia,w3nd1go/android_external_skia,MIPS/external-chromium_org-third_party-skia,F-AOSP/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,TeamTwisted/external_skia,mydongistiny/external_chromium_org_third_party_skia,samuelig/skia,akiss77/skia,android-ia/platform_external_skia,MarshedOut/android_external_skia,w3nd1go/android_external_skia,MinimalOS/external_skia,TeamBliss-LP/android_external_skia,AOSP-YU/platform_external_skia,NamelessRom/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,codeaurora-unoffical/platform-external-skia,TeslaProject/external_skia,byterom/android_external_skia,SlimSaber/android_external_skia,Omegaphora/external_chromium_org_third_party_skia,SlimSaber/android_external_skia,VRToxin-AOSP/android_external_skia,NamelessRom/android_external_skia,AOSP-YU/platform_external_skia,DesolationStaging/android_external_skia,nox/skia,fire855/android_external_skia,android-ia/platform_external_skia,MinimalOS-AOSP/platform_external_skia,timduru/platform-external-skia,TeamEOS/external_skia,Hybrid-Rom/external_skia,Android-AOSP/external_skia,Omegaphora/external_skia,F-AOSP/platform_external_skia,geekboxzone/mmallow_external_skia,TeamTwisted/external_skia,HalCanary/skia-hc,TeamTwisted/external_skia,Android-AOSP/external_skia,Jichao/skia,Tesla-Redux/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,shahrzadmn/skia,suyouxin/android_external_skia,AOSP-YU/platform_external_skia,HalCanary/skia-hc,Plain-Andy/android_platform_external_skia,vvuk/skia,invisiblek/android_external_skia,qrealka/skia-hc,TeamExodus/external_skia,shahrzadmn/skia,DARKPOP/external_chromium_org_third_party_skia,aospo/platform_external_skia,xin3liang/platform_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,mmatyas/skia,Euphoria-OS-Legacy/android_external_skia,Khaon/android_external_skia,aospo/platform_external_skia,mydongistiny/android_external_skia,MonkeyZZZZ/platform_external_skia,vanish87/skia,AndroidOpenDevelopment/android_external_skia,mmatyas/skia,OneRom/external_skia,MinimalOS/android_external_skia,boulzordev/android_external_skia,invisiblek/android_external_skia,fire855/android_external_skia,ctiao/platform-external-skia,BrokenROM/external_skia,MonkeyZZZZ/platform_external_skia,Tesla-Redux/android_external_skia,Khaon/android_external_skia,boulzordev/android_external_skia,AOSPU/external_chromium_org_third_party_skia,sombree/android_external_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,tmpvar/skia.cc,GladeRom/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,SlimSaber/android_external_skia,fire855/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,jtg-gg/skia,ench0/external_skia,DARKPOP/external_chromium_org_third_party_skia,Infinitive-OS/platform_external_skia,UBERMALLOW/external_skia,timduru/platform-external-skia,OptiPop/external_chromium_org_third_party_skia,akiss77/skia,Infinitive-OS/platform_external_skia,HealthyHoney/temasek_SKIA,zhaochengw/platform_external_skia,mmatyas/skia,MinimalOS-AOSP/platform_external_skia,mmatyas/skia,F-AOSP/platform_external_skia,GladeRom/android_external_skia,Hybrid-Rom/external_skia,YUPlayGodDev/platform_external_skia,Android-AOSP/external_skia,Samsung/skia,Fusion-Rom/external_chromium_org_third_party_skia,android-ia/platform_external_skia,Hybrid-Rom/external_skia,OptiPop/external_chromium_org_third_party_skia,TeamEOS/external_skia,Fusion-Rom/external_chromium_org_third_party_skia,aosp-mirror/platform_external_skia,TeamTwisted/external_skia,google/skia,OptiPop/external_skia,TeamEOS/external_chromium_org_third_party_skia,android-ia/platform_external_skia,RadonX-ROM/external_skia,xin3liang/platform_external_chromium_org_third_party_skia,Omegaphora/external_skia,AsteroidOS/android_external_skia,todotodoo/skia,geekboxzone/mmallow_external_skia,boulzordev/android_external_skia,Infusion-OS/android_external_skia,MyAOSP/external_chromium_org_third_party_skia,TeslaProject/external_skia,InfinitiveOS/external_skia,AOSPA-L/android_external_skia,TeamExodus/external_skia,Jichao/skia,sigysmund/platform_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,vvuk/skia,Asteroid-Project/android_external_skia,geekboxzone/mmallow_external_skia,Fusion-Rom/android_external_skia,Igalia/skia,Hikari-no-Tenshi/android_external_skia,TeamBliss-LP/android_external_skia,FusionSP/external_chromium_org_third_party_skia,android-ia/platform_external_skia,MIPS/external-chromium_org-third_party-skia,ench0/external_skia,TeamEOS/external_chromium_org_third_party_skia,scroggo/skia,DesolationStaging/android_external_skia,OptiPop/external_chromium_org_third_party_skia,spezi77/android_external_skia,tmpvar/skia.cc,VentureROM-L/android_external_skia,mydongistiny/android_external_skia,zhaochengw/platform_external_skia,TeamEOS/external_chromium_org_third_party_skia,larsbergstrom/skia,FusionSP/android_external_skia,nfxosp/platform_external_skia,jtg-gg/skia,suyouxin/android_external_skia,android-ia/platform_external_chromium_org_third_party_skia,VentureROM-L/android_external_skia,codeaurora-unoffical/platform-external-skia,MinimalOS-AOSP/platform_external_skia,MinimalOS/external_skia,ctiao/platform-external-skia,mozilla-b2g/external_skia,nox/skia,timduru/platform-external-skia,MonkeyZZZZ/platform_external_skia,HalCanary/skia-hc,BrokenROM/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,MinimalOS/android_external_skia,ench0/external_skia,VRToxin-AOSP/android_external_skia,MonkeyZZZZ/platform_external_skia,xzzz9097/android_external_skia,aosp-mirror/platform_external_skia,Pure-Aosp/android_external_skia,larsbergstrom/skia,geekboxzone/mmallow_external_skia,Fusion-Rom/android_external_skia,nox/skia,Jichao/skia,aosp-mirror/platform_external_skia,AOSPU/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,xzzz9097/android_external_skia,sudosurootdev/external_skia,qrealka/skia-hc,Asteroid-Project/android_external_skia,Purity-Lollipop/platform_external_skia,BrokenROM/external_skia,InfinitiveOS/external_skia,codeaurora-unoffical/platform-external-skia,zhaochengw/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,temasek/android_external_skia,invisiblek/android_external_skia,mydongistiny/external_chromium_org_third_party_skia,Plain-Andy/android_platform_external_skia,houst0nn/external_skia,OptiPop/external_chromium_org_third_party_skia,houst0nn/external_skia,AsteroidOS/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,rubenvb/skia,timduru/platform-external-skia,nvoron23/skia,mydongistiny/external_chromium_org_third_party_skia,VRToxin-AOSP/android_external_skia,FusionSP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Omegaphora/external_chromium_org_third_party_skia,tmpvar/skia.cc,AOSPB/external_skia,timduru/platform-external-skia,xin3liang/platform_external_chromium_org_third_party_skia,GladeRom/android_external_skia,Igalia/skia,F-AOSP/platform_external_skia,AsteroidOS/android_external_skia,houst0nn/external_skia,nfxosp/platform_external_skia,TeslaOS/android_external_skia,OptiPop/external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSPU/external_chromium_org_third_party_skia,pacerom/external_skia,BrokenROM/external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,Khaon/android_external_skia,MinimalOS-AOSP/platform_external_skia,MarshedOut/android_external_skia,larsbergstrom/skia,rubenvb/skia,vanish87/skia,InfinitiveOS/external_skia,UBERMALLOW/external_skia,byterom/android_external_skia,TeslaOS/android_external_skia,TeamEOS/external_skia,UBERMALLOW/external_skia,AOSP-YU/platform_external_skia,AOSP-YU/platform_external_skia,SlimSaber/android_external_skia,Pure-Aosp/android_external_skia,MinimalOS-AOSP/platform_external_skia,larsbergstrom/skia,google/skia,Asteroid-Project/android_external_skia,AndroidOpenDevelopment/android_external_skia,AsteroidOS/android_external_skia,Euphoria-OS-Legacy/android_external_skia,HalCanary/skia-hc,F-AOSP/platform_external_skia,UBERMALLOW/external_skia,MarshedOut/android_external_skia,ominux/skia,codeaurora-unoffical/platform-external-skia,xzzz9097/android_external_skia,FusionSP/android_external_skia,OptiPop/external_skia,mydongistiny/android_external_skia,TeslaProject/external_skia,houst0nn/external_skia,sombree/android_external_skia,rubenvb/skia,geekboxzone/lollipop_external_skia,MIPS/external-chromium_org-third_party-skia,jtg-gg/skia,sudosurootdev/external_skia,ench0/external_skia,aosp-mirror/platform_external_skia,Omegaphora/external_skia,YUPlayGodDev/platform_external_skia,mydongistiny/android_external_skia,VentureROM-L/android_external_skia,TeamTwisted/external_skia,UBERMALLOW/external_skia,NamelessRom/android_external_skia,xzzz9097/android_external_skia,boulzordev/android_external_skia,rubenvb/skia,MinimalOS/android_external_skia,codeaurora-unoffical/platform-external-skia,OptiPop/external_skia,OneRom/external_skia,temasek/android_external_skia,TeamTwisted/external_skia,qrealka/skia-hc,FusionSP/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Fusion-Rom/android_external_skia,mmatyas/skia,zhaochengw/platform_external_skia,nfxosp/platform_external_skia,mozilla-b2g/external_skia,Khaon/android_external_skia,Khaon/android_external_skia,ominux/skia,rubenvb/skia,amyvmiwei/skia,UBERMALLOW/external_skia,OptiPop/external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,AsteroidOS/android_external_skia,AOSPB/external_skia,MarshedOut/android_external_skia,spezi77/android_external_skia,todotodoo/skia,GladeRom/android_external_skia,pcwalton/skia,OneRom/external_skia,nvoron23/skia,nfxosp/platform_external_skia,Purity-Lollipop/platform_external_skia,ctiao/platform-external-skia,spezi77/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,qrealka/skia-hc,tmpvar/skia.cc,tmpvar/skia.cc,noselhq/skia,akiss77/skia,jtg-gg/skia,w3nd1go/android_external_skia,houst0nn/external_skia,w3nd1go/android_external_skia,MinimalOS/android_external_skia,wildermason/external_skia,VRToxin-AOSP/android_external_skia,MIPS/external-chromium_org-third_party-skia,zhaochengw/platform_external_skia,Tesla-Redux/android_external_skia,MIPS/external-chromium_org-third_party-skia,shahrzadmn/skia,OptiPop/external_skia,MinimalOS/android_external_skia,Jichao/skia,pacerom/external_skia,spezi77/android_external_skia,chenlian2015/skia_from_google,pcwalton/skia,vanish87/skia,TeamExodus/external_skia,Omegaphora/external_skia,TeslaProject/external_skia,AOSPA-L/android_external_skia,RadonX-ROM/external_skia,todotodoo/skia,nvoron23/skia,ench0/external_skia,aosp-mirror/platform_external_skia,OptiPop/external_skia,MinimalOS/external_skia,Jichao/skia,DiamondLovesYou/skia-sys,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,xzzz9097/android_external_skia,AsteroidOS/android_external_skia,aospo/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,PAC-ROM/android_external_skia,Hybrid-Rom/external_skia,Fusion-Rom/android_external_skia,Jichao/skia,nvoron23/skia,Euphoria-OS-Legacy/android_external_skia,ench0/external_chromium_org_third_party_skia,InfinitiveOS/external_skia,vvuk/skia,aospo/platform_external_skia,houst0nn/external_skia,Plain-Andy/android_platform_external_skia,MinimalOS/android_external_skia,TeamEOS/external_chromium_org_third_party_skia,AOSPB/external_skia,OptiPop/external_skia,OneRom/external_skia,MyAOSP/external_chromium_org_third_party_skia,samuelig/skia,TeamBliss-LP/android_external_skia,scroggo/skia,sombree/android_external_skia,aospo/platform_external_skia,akiss77/skia,Samsung/skia,tmpvar/skia.cc,Android-AOSP/external_skia,MinimalOS/android_external_chromium_org_third_party_skia,chenlian2015/skia_from_google,DARKPOP/external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,nfxosp/platform_external_skia,RadonX-ROM/external_skia,SlimSaber/android_external_skia,Samsung/skia,TeslaOS/android_external_skia,MinimalOS/android_external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,samuelig/skia,noselhq/skia,xin3liang/platform_external_chromium_org_third_party_skia,sudosurootdev/external_skia,android-ia/platform_external_skia,Tesla-Redux/android_external_skia,zhaochengw/platform_external_skia,OptiPop/external_chromium_org_third_party_skia,samuelig/skia,mydongistiny/external_chromium_org_third_party_skia,MonkeyZZZZ/platform_external_skia,invisiblek/android_external_skia,vanish87/skia,sudosurootdev/external_skia,MarshedOut/android_external_skia,MonkeyZZZZ/platform_external_skia,ench0/external_chromium_org_third_party_skia,DARKPOP/external_chromium_org_third_party_skia,FusionSP/external_chromium_org_third_party_skia,boulzordev/android_external_skia,scroggo/skia,Omegaphora/external_chromium_org_third_party_skia,google/skia,nfxosp/platform_external_skia,boulzordev/android_external_skia,Infinitive-OS/platform_external_skia,sigysmund/platform_external_skia,mydongistiny/external_chromium_org_third_party_skia,amyvmiwei/skia,aosp-mirror/platform_external_skia,byterom/android_external_skia,wildermason/external_skia,Omegaphora/external_skia,sigysmund/platform_external_skia,TeslaOS/android_external_skia,nfxosp/platform_external_skia,Purity-Lollipop/platform_external_skia,tmpvar/skia.cc,temasek/android_external_skia,sudosurootdev/external_skia,sigysmund/platform_external_skia,byterom/android_external_skia,amyvmiwei/skia,timduru/platform-external-skia,HalCanary/skia-hc,suyouxin/android_external_skia,ench0/external_chromium_org_third_party_skia,MinimalOS/external_chromium_org_third_party_skia,Hybrid-Rom/external_skia,Jichao/skia,wildermason/external_skia,Khaon/android_external_skia,FusionSP/android_external_skia,scroggo/skia,OptiPop/external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,ench0/external_chromium_org_third_party_skia,Igalia/skia,geekboxzone/lollipop_external_skia,AOSPA-L/android_external_skia,Samsung/skia,nvoron23/skia,TeamEOS/external_skia,suyouxin/android_external_skia,MinimalOS/external_chromium_org_third_party_skia,aospo/platform_external_skia,SlimSaber/android_external_skia,Pure-Aosp/android_external_skia,mydongistiny/android_external_skia,MinimalOS/external_skia,HealthyHoney/temasek_SKIA,aosp-mirror/platform_external_skia,xzzz9097/android_external_skia,Fusion-Rom/external_chromium_org_third_party_skia,pcwalton/skia,TeamBliss-LP/android_external_skia,CyanogenMod/android_external_chromium_org_third_party_skia,geekboxzone/lollipop_external_chromium_org_third_party_skia,zhaochengw/platform_external_skia,MyAOSP/external_chromium_org_third_party_skia,ctiao/platform-external-skia,MinimalOS/external_skia,MinimalOS-AOSP/platform_external_skia,GladeRom/android_external_skia,MonkeyZZZZ/platform_external_skia,android-ia/platform_external_chromium_org_third_party_skia,mydongistiny/external_chromium_org_third_party_skia,ominux/skia,VRToxin-AOSP/android_external_skia,Asteroid-Project/android_external_skia,w3nd1go/android_external_skia,MarshedOut/android_external_skia,MIPS/external-chromium_org-third_party-skia,mozilla-b2g/external_skia,ench0/external_skia,AOSP-YU/platform_external_skia,rubenvb/skia,ctiao/platform-external-skia,larsbergstrom/skia,sigysmund/platform_external_skia,PAC-ROM/android_external_skia,HalCanary/skia-hc,nox/skia,TeamTwisted/external_skia,akiss77/skia,android-ia/platform_external_skia,vanish87/skia,nvoron23/skia,MyAOSP/external_chromium_org_third_party_skia,scroggo/skia,YUPlayGodDev/platform_external_skia,chenlian2015/skia_from_google,qrealka/skia-hc,xin3liang/platform_external_chromium_org_third_party_skia,TeslaOS/android_external_skia,Infusion-OS/android_external_skia,android-ia/platform_external_skia,chenlian2015/skia_from_google,Infinitive-OS/platform_external_skia,GladeRom/android_external_skia,VRToxin-AOSP/android_external_skia,HealthyHoney/temasek_SKIA,tmpvar/skia.cc,invisiblek/android_external_skia,shahrzadmn/skia,noselhq/skia,amyvmiwei/skia,Asteroid-Project/android_external_skia,Infusion-OS/android_external_skia,ctiao/platform-external-skia,sombree/android_external_skia,zhaochengw/platform_external_skia,boulzordev/android_external_skia,ench0/external_skia,pcwalton/skia,Samsung/skia,chenlian2015/skia_from_google,HalCanary/skia-hc,noselhq/skia,Purity-Lollipop/platform_external_skia,byterom/android_external_skia |
349ac725570cd5913fcc967e7f9abdc3a81ee6e9 | priv/qcmainthreadrunner.h | priv/qcmainthreadrunner.h | #ifndef QCMAINTHREADRUNNER_H
#define QCMAINTHREADRUNNER_H
#include <QObject>
#include <QVariant>
#include <QEVent>
#include <QCoreApplication>
class QCMainThreadRunner
{
public:
/// Run a function on main thread. If it is already in main thread, it will be executed in next tick.
template <typename F>
static void start(F func) {
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(func), Qt::QueuedConnection);
}
/// Run a function with custom data on main thread. If it is already in main thread, it will be executed in next tick.
template <typename F,typename P1>
static void start(F func,P1 p1) {
auto wrapper = [=]() -> void{
func(p1);
};
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(wrapper), Qt::QueuedConnection);
}
template <typename F,typename P1, typename P2>
static void start(F func,P1 p1, P2 p2) {
auto wrapper = [=]() -> void{
func(p1, p2);
};
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(wrapper), Qt::QueuedConnection);
}
};
#endif // QCMAINTHREADRUNNER_H
| #ifndef QCMAINTHREADRUNNER_H
#define QCMAINTHREADRUNNER_H
#include <QObject>
#include <QCoreApplication>
class QCMainThreadRunner
{
public:
/// Run a function on main thread. If it is already in main thread, it will be executed in next tick.
template <typename F>
static void start(F func) {
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(func), Qt::QueuedConnection);
}
/// Run a function with custom data on main thread. If it is already in main thread, it will be executed in next tick.
template <typename F,typename P1>
static void start(F func,P1 p1) {
auto wrapper = [=]() -> void{
func(p1);
};
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(wrapper), Qt::QueuedConnection);
}
template <typename F,typename P1, typename P2>
static void start(F func,P1 p1, P2 p2) {
auto wrapper = [=]() -> void{
func(p1, p2);
};
QObject tmp;
QObject::connect(&tmp, &QObject::destroyed, QCoreApplication::instance(), std::move(wrapper), Qt::QueuedConnection);
}
};
#endif // QCMAINTHREADRUNNER_H
| Fix build issue for Linux | Fix build issue for Linux
| C | apache-2.0 | benlau/quickcross,benlau/quickcross,benlau/quickcross |
ad7d535ac60d0d3a2e43c72a5c9c41efd62fedb1 | tests/test_collisions.h | tests/test_collisions.h | #ifndef TEST_COLLISIONS_H
#define TEST_COLLISIONS_H
#include <kaztest/kaztest.h>
#include "spindash/spindash.h"
#include "spindash/collision/collide.h"
#include "spindash/collision/ray_box.h"
const SDVec2 box_points[] = {
{ -5, -5 },
{ 5, -5 },
{ 5, 0 },
{ -5, 0 }
};
class CollisionGeomTest : public TestCase {
public:
void test_ray_box_floor_sensors() {
RayBox ray_box(nullptr, 0.5f, 1.0f);
ray_box.set_position(0, 0.5);
Box floor(nullptr, 10.0f, 1.0f);
floor.set_position(0, -0.5);
std::vector<Collision> collisions = collide(&ray_box, &floor);
assert_equal(2, collisions.size());
assert_equal('A', collisions[0].a_ray);
assert_equal('B', collisions[1].a_ray);
assert_equal(0.0, collisions[0].point.y);
assert_equal(0.0, collisions[1].point.y);
}
private:
};
#endif // TEST_COLLISIONS_H
| #ifndef TEST_COLLISIONS_H
#define TEST_COLLISIONS_H
#include <kaztest/kaztest.h>
#include "spindash/spindash.h"
#include "spindash/collision/collide.h"
#include "spindash/collision/ray_box.h"
#include "spindash/collision/box.h"
const SDVec2 box_points[] = {
{ -5, -5 },
{ 5, -5 },
{ 5, 0 },
{ -5, 0 }
};
class CollisionGeomTest : public TestCase {
public:
void test_ray_box_floor_sensors() {
RayBox ray_box(nullptr, 0.5f, 1.0f);
ray_box.set_position(0, 0.5);
Box floor(nullptr, 10.0f, 1.0f);
floor.set_position(0, -0.5);
std::vector<Collision> collisions = collide(&ray_box, &floor);
assert_equal(2, collisions.size());
assert_equal('A', collisions[0].a_ray);
assert_equal('B', collisions[1].a_ray);
assert_equal(0.0, collisions[0].point.y);
assert_equal(0.0, collisions[1].point.y);
}
private:
};
#endif // TEST_COLLISIONS_H
| Add a missing header from one of the tests | Add a missing header from one of the tests
| C | bsd-2-clause | Kazade/Spindash |
235b1753f48c8a22cb79e3115b637f179c3e1e8b | src/initiation/transport/sipauthentication.h | src/initiation/transport/sipauthentication.h | #pragma once
#include "initiation/sipmessageprocessor.h"
#include "initiation/siptypes.h"
/* This class handles the authentication for this connection
* should we receive a challenge */
class SIPAuthentication : public SIPMessageProcessor
{
Q_OBJECT
public:
SIPAuthentication();
public slots:
// add credentials to request, if we have them
virtual void processOutgoingRequest(SIPRequest& request, QVariant& content);
// take challenge if they require authentication
virtual void processIncomingResponse(SIPResponse& response, QVariant& content);
private:
DigestResponse generateAuthResponse(DigestChallenge& challenge, QString username,
SIP_URI& requestURI, SIPRequestMethod method,
QVariant& content);
void updateNonceCount(DigestChallenge& challenge, DigestResponse& response);
// TODO: Test if these need to be separate
QList<DigestChallenge> wwwChallenges_;
QList<DigestChallenge> proxyChallenges_;
QList<DigestResponse> authorizations_;
QList<DigestResponse> proxyAuthorizations_;
// key is realm and value current nonce
std::map<QString, QString> realmToNonce_;
std::map<QString, uint32_t> realmToNonceCount_;
QByteArray a1_;
};
| #pragma once
#include "initiation/sipmessageprocessor.h"
#include "initiation/siptypes.h"
/* This class handles the authentication for this connection
* should we receive a challenge */
class SIPAuthentication : public SIPMessageProcessor
{
Q_OBJECT
public:
SIPAuthentication();
public slots:
// add credentials to request, if we have them
virtual void processOutgoingRequest(SIPRequest& request, QVariant& content);
// take challenge if they require authentication
virtual void processIncomingResponse(SIPResponse& response, QVariant& content);
private:
DigestResponse generateAuthResponse(DigestChallenge& challenge, QString username,
SIP_URI& requestURI, SIPRequestMethod method,
QVariant& content);
void updateNonceCount(DigestChallenge& challenge, DigestResponse& response);
QList<DigestChallenge> wwwChallenges_;
QList<DigestChallenge> proxyChallenges_;
QList<DigestResponse> authorizations_;
QList<DigestResponse> proxyAuthorizations_;
// key is realm and value current nonce
std::map<QString, QString> realmToNonce_;
std::map<QString, uint32_t> realmToNonceCount_;
QByteArray a1_;
};
| Remove TODO. Tested common credentials, didn't work. | cosmetic(Transport): Remove TODO. Tested common credentials, didn't work.
| C | isc | ultravideo/kvazzup,ultravideo/kvazzup |
553faa1fcfc6a119959a66371ea355899dd8efd8 | src/compat/deinompi.h | src/compat/deinompi.h | #ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
/* ---------------------------------------------------------------- */
static int PyMPI_DEINOMPI_argc = 0;
static char **PyMPI_DEINOMPI_argv = 0;
static char *PyMPI_DEINOMPI_args[2] = {0, 0};
static void PyMPI_DEINOMPI_FixArgs(int **argc, char ****argv)
{
if ((argc[0]==(int *)0) || (argv[0]==(char ***)0)) {
#ifdef Py_PYTHON_H
#if PY_MAJOR_VERSION >= 3
PyMPI_DEINOMPI_args[0] = (char *) "python";
#else
PyMPI_DEINOMPI_args[0] = Py_GetProgramName();
#endif
PyMPI_DEINOMPI_argc = 1;
#endif
PyMPI_DEINOMPI_argv = PyMPI_DEINOMPI_args;
argc[0] = &PyMPI_DEINOMPI_argc;
argv[0] = &PyMPI_DEINOMPI_argv;
}
}
static int PyMPI_DEINOMPI_MPI_Init(int *argc, char ***argv)
{
PyMPI_DEINOMPI_FixArgs(&argc, &argv);
return MPI_Init(argc, argv);
}
#undef MPI_Init
#define MPI_Init PyMPI_DEINOMPI_MPI_Init
static int PyMPI_DEINOMPI_MPI_Init_thread(int *argc, char ***argv,
int required, int *provided)
{
PyMPI_DEINOMPI_FixArgs(&argc, &argv);
return MPI_Init_thread(argc, argv, required, provided);
}
#undef MPI_Init_thread
#define MPI_Init_thread PyMPI_DEINOMPI_MPI_Init_thread
/* ---------------------------------------------------------------- */
#endif /* !PyMPI_COMPAT_DEINOMPI_H */
| #ifndef PyMPI_COMPAT_DEINOMPI_H
#define PyMPI_COMPAT_DEINOMPI_H
#endif /* !PyMPI_COMPAT_DEINOMPI_H */
| Remove hackery for DeinoMPI, release 1.1.0 seems to work just fine | Remove hackery for DeinoMPI, release 1.1.0 seems to work just fine | C | bsd-2-clause | pressel/mpi4py,mpi4py/mpi4py,pressel/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py,pressel/mpi4py,pressel/mpi4py |
e1d06bc471406e8e4e63cd9cba33c50cce7db8c7 | src/rocket/rocket.c | src/rocket/rocket.c | /*
* ASXSoft Nuke - Operating System
* Copyright (C) 2009 Patrick Pokatilo
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdint.h"
#include "stddef.h"
#include "gdt.h"
extern gdt_pointer_t gdt_pointer;
void start_rocket_engine()
{
gdt_initialize();
gdt_load();
gdt_flush_registers(0x08, 0x18, 0x18, 0x00, 0x00, 0x18);
while(1);
}
| Set up GDT and load 32-Bit Segments | Rocket: Set up GDT and load 32-Bit Segments
Signed-off-by: Patrick Pokatilo <[email protected]>
| C | agpl-3.0 | SHyx0rmZ/kernel4,SHyx0rmZ/kernel4,SHyx0rmZ/kernel4 |
|
778fbd48981675b0a10383efe169e397153e81d6 | tests/regression/01-cpa/72-library-function-pointer.c | tests/regression/01-cpa/72-library-function-pointer.c | #include <fcntl.h>
#include <unistd.h>
typedef void (*fnct_ptr)(void);
typedef int (*open_t)(const char*,int,int);
typedef int (*ftruncate_t)(int,off_t);
// Goblint used to crash on this example because the number of supplied arguments for myopen is bigger than
// than the expected number of arguments for the library function descriptior of ftruncate.
// -- "open" expects 3 arguments, while "ftruncate" expects only 2.
int main(){
fnct_ptr ptr;
int top;
if (top){
ptr = &open;
} else {
ptr = &ftruncate;
}
if (top) {
// Some (nonsensical, but compiling) call to open
open_t myopen;
myopen = (open_t) ptr;
myopen("some/path", O_CREAT, 0);
} else {
// Some (nonsensical, but compiling) call to ftruncate
ftruncate_t myftruncate;
myftruncate = (ftruncate_t) ptr;
myftruncate(0, 100);
}
return 0;
}
| #include <fcntl.h>
#include <unistd.h>
typedef void (*fnct_ptr)(void);
typedef int (*open_t)(const char*,int,...);
typedef int (*ftruncate_t)(int,off_t);
// Goblint used to crash on this example because the number of supplied arguments for myopen is bigger than
// than the expected number of arguments for the library function descriptior of ftruncate.
// -- "open" expects 3 arguments, while "ftruncate" expects only 2.
int main(){
fnct_ptr ptr;
int top, top2, top3;
if (top){
ptr = (fnct_ptr) &open;
ftruncate_t myftruncate;
myftruncate = (ftruncate_t) ptr;
myftruncate(0, 100); //NOWARN
} else {
ptr = (fnct_ptr) &ftruncate;
}
if (top2) {
open_t myopen;
myopen = (open_t) ptr;
// Warn about possible call to ftruncate with wrong number of arguments
myopen("some/path", 0, 0); // WARN
} else if(top3) {
ftruncate_t myftruncate2;
myftruncate2 = (ftruncate_t) ptr;
off_t v = 100;
// We (currently) only warn about wrong number of args, not wrong type
// So no warning is emitted here about possibly calling the vararg function open.
myftruncate2(0, v);
} else {
// Warn about potential calls to open and ftruncate with too few arguments,
// and warn that none of the possible targets of the pointer fit as call targets.
ptr(); // WARN
}
return 0;
}
| Add WARN annotations and explanations to test, expand it with one case. | Add WARN annotations and explanations to test, expand it with one case.
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
92a488818e157ed14631b9b0467e102556b64242 | src/Console.h | src/Console.h | #ifndef CONSOLE_H
#define CONSOLE_H
#include <Cart.h>
#include <Controller.h>
#include <CPU.h>
#include <PPU.h>
#include <APU.h>
class Divider {
public:
void setInterval(int interval) {
this->interval = interval;
clockCounter = interval - 1;
}
void tick() {
clockCounter++;
if (clockCounter == interval) {
clockCounter = 0;
}
}
bool hasClocked() {
return clockCounter == 0;
}
private:
int interval;
int clockCounter;
};
class Console {
public:
~Console();
void boot();
void runForOneFrame();
uint32_t *getFrameBuffer();
Cart cart;
Controller controller1;
private:
void tick();
CPU *cpu;
PPU *ppu;
APU apu;
Divider cpuDivider;
};
#endif
| #ifndef CONSOLE_H
#define CONSOLE_H
#include <Cart.h>
#include <Controller.h>
#include <CPU.h>
#include <PPU.h>
#include <APU.h>
class Divider {
public:
Divider(int interval = 1) {
setInterval(interval);
}
void setInterval(int interval) {
this->interval = interval;
clockCounter = interval - 1;
}
void tick() {
clockCounter++;
if (clockCounter == interval) {
clockCounter = 0;
}
}
bool hasClocked() {
return clockCounter == 0;
}
private:
int interval;
int clockCounter;
};
class Console {
public:
~Console();
void boot();
void runForOneFrame();
uint32_t *getFrameBuffer();
Cart cart;
Controller controller1;
private:
void tick();
CPU *cpu;
PPU *ppu;
APU apu;
Divider cpuDivider;
};
#endif
| Add divider constructor with interval default argument | Add divider constructor with interval default argument
| C | mit | scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES |
76086d7eeb3e13f384c6b9bf84d3c30a3de246f9 | src/utils.h | src/utils.h | /**
* @file utils.h
* @brief Storj utilities.
*
* Helper utilities
*/
#ifndef STORJ_UTILS_H
#define STORJ_UTILS_H
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#endif
int hex2str(unsigned length, uint8_t *data, char *buffer);
void print_int_array(uint8_t *array, unsigned length);
int str2hex(unsigned length, char *data, uint8_t *buffer);
void random_buffer(uint8_t *buf, size_t len);
uint64_t shard_size(int hops);
uint64_t get_time_milliseconds();
void memset_zero(void *v, size_t n);
#endif /* STORJ_UTILS_H */
| /**
* @file utils.h
* @brief Storj utilities.
*
* Helper utilities
*/
#ifndef STORJ_UTILS_H
#define STORJ_UTILS_H
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#ifdef _WIN32
#include <windows.h>
#include <time.h>
#else
#include <sys/time.h>
#endif
int hex2str(unsigned length, uint8_t *data, char *buffer);
void print_int_array(uint8_t *array, unsigned length);
int str2hex(unsigned length, char *data, uint8_t *buffer);
void random_buffer(uint8_t *buf, size_t len);
uint64_t shard_size(int hops);
uint64_t get_time_milliseconds();
void memset_zero(void *v, size_t n);
#endif /* STORJ_UTILS_H */
| Fix implicit declaration of function ‘time’ | Fix implicit declaration of function ‘time’
| C | lgpl-2.1 | braydonf/libstorj,Storj/libstorj-c,aleitner/libstorj-c,braydonf/libstorj-c,aleitner/libstorj-c,Storj/libstorj-c,braydonf/libstorj-c,braydonf/libstorj |
bfff95e5e5b548a976340ca405991c61662c104f | src/bitwise.h | src/bitwise.h | #pragma once
#include "definitions.h"
#include "util/log.h"
inline u16 compose_bytes(const u8 high, const u8 low) {
return (high << 8) + low;
}
inline bool check_bit(const u8 value, const int bit) {
return (value & (1 << bit)) != 0;
}
inline u8 set_bit(const u8 value, const int bit) {
return value | (1 << bit);
}
inline u8 clear_bit(const u8 value, const int bit) {
return value & ~(1 << bit);
}
inline u8 set_bit_to(const u8 value, const int bit, bool bit_on) {
if (bit_on) {
return set_bit(value, bit);
} else {
return clear_bit(value, bit);
}
}
| #pragma once
#include "definitions.h"
#include "util/log.h"
inline u16 compose_bytes(const u8 high, const u8 low) {
return static_cast<u16>((high << 8) + low);
}
inline bool check_bit(const u8 value, const u8 bit) {
return (value & (1 << bit)) != 0;
}
inline u8 set_bit(const u8 value, const u8 bit) {
auto value_set = value | (1 << bit);
return static_cast<u8>(value_set);
}
inline u8 clear_bit(const u8 value, const u8 bit) {
auto value_cleared = value & ~(1 << bit);
return static_cast<u8>(value_cleared);
}
inline u8 set_bit_to(const u8 value, const u8 bit, bool bit_on) {
if (bit_on) {
return set_bit(value, bit);
} else {
return clear_bit(value, bit);
}
}
| Make conversions between integer sizes explicit | Make conversions between integer sizes explicit
| C | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
cf4ff469b193f6972cad1b6821ef99d51091e05a | test/Driver/hello.c | test/Driver/hello.c | // RUN: %clang -ccc-echo -o %t %s 2> %t.log
// Make sure we used clang.
// RUN: grep 'clang" -cc1 .*hello.c' %t.log
// RUN: %t > %t.out
// RUN: grep "I'm a little driver, short and stout." %t.out
// FIXME: We don't have a usable assembler on Windows, so we can't build real
// apps yet.
// XFAIL: win32
#include <stdio.h>
int main() {
printf("I'm a little driver, short and stout.");
return 0;
}
| // RUN: %clang -ccc-echo -o %t %s 2> %t.log
// Make sure we used clang.
// RUN: grep 'clang\(-[0-9.]\+\)\?" -cc1 .*hello.c' %t.log
// RUN: %t > %t.out
// RUN: grep "I'm a little driver, short and stout." %t.out
// FIXME: We don't have a usable assembler on Windows, so we can't build real
// apps yet.
// XFAIL: win32
#include <stdio.h>
int main() {
printf("I'm a little driver, short and stout.");
return 0;
}
| Fix this test case for CMake builds after r126502, which sneakily changed the actual executable name to clang-<version>. | Fix this test case for CMake builds after r126502, which sneakily changed the actual executable name to clang-<version>.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@126560 91177308-0d34-0410-b5e6-96231b3b80d8
| C | 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
452bc34d386c7158c042e2059b6a020ddd4a7e7f | include/kiste/kiste.h | include/kiste/kiste.h | #ifndef KISS_TEMPLATES_KISTE_H
#define KISS_TEMPLATES_KISTE_H
#include <kiste/terminal.h>
#include <kiste/raw.h>
namespace kiste
{
struct terminal_t
{
};
constexpr auto terminal = terminal_t{};
struct raw
{
std::ostream& _os;
template <typename T>
auto operator()(T&& t) const -> void
{
_os << std::forward<T>(t);
}
};
}
#endif
| #ifndef KISS_TEMPLATES_KISTE_H
#define KISS_TEMPLATES_KISTE_H
#include <kiste/terminal.h>
#include <kiste/raw.h>
#endif
| Remove types left over from header split | Remove types left over from header split | C | bsd-2-clause | rbock/kiss-templates,AndiDog/kiss-templates,rbock/kiss-templates,AndiDog/kiss-templates,AndiDog/kiss-templates,rbock/kiss-templates |
21b8bddea55ff726108990263ee30072fcaa9d19 | include/llvm/CodeGen/MachineFunctionAnalysis.h | include/llvm/CodeGen/MachineFunctionAnalysis.h | //===-- MachineFunctionAnalysis.h - Owner of MachineFunctions ----*-C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the MachineFunctionAnalysis class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_MACHINE_FUNCTION_ANALYSIS_H
#define LLVM_CODEGEN_MACHINE_FUNCTION_ANALYSIS_H
#include "llvm/Pass.h"
namespace llvm {
class MachineFunction;
class TargetMachine;
/// MachineFunctionAnalysis - This class is a Pass that manages a
/// MachineFunction object.
struct MachineFunctionAnalysis : public FunctionPass {
private:
const TargetMachine &TM;
CodeGenOpt::Level OptLevel;
MachineFunction *MF;
public:
static char ID;
explicit MachineFunctionAnalysis(const TargetMachine &tm,
CodeGenOpt::Level OL = CodeGenOpt::Default);
~MachineFunctionAnalysis();
MachineFunction &getMF() const { return *MF; }
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
private:
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
};
} // End llvm namespace
#endif
| //===-- MachineFunctionAnalysis.h - Owner of MachineFunctions ----*-C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the MachineFunctionAnalysis class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_MACHINE_FUNCTION_ANALYSIS_H
#define LLVM_CODEGEN_MACHINE_FUNCTION_ANALYSIS_H
#include "llvm/Pass.h"
#include "llvm/Target/TargetMachine.h"
namespace llvm {
class MachineFunction;
/// MachineFunctionAnalysis - This class is a Pass that manages a
/// MachineFunction object.
struct MachineFunctionAnalysis : public FunctionPass {
private:
const TargetMachine &TM;
CodeGenOpt::Level OptLevel;
MachineFunction *MF;
public:
static char ID;
explicit MachineFunctionAnalysis(const TargetMachine &tm,
CodeGenOpt::Level OL = CodeGenOpt::Default);
~MachineFunctionAnalysis();
MachineFunction &getMF() const { return *MF; }
CodeGenOpt::Level getOptLevel() const { return OptLevel; }
private:
virtual bool runOnFunction(Function &F);
virtual void releaseMemory();
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
};
} // End llvm namespace
#endif
| Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h. | Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@88959 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm |
272fd3b28f5ebbf20ccf39c511744cb682056434 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.04.00-k0"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.04.00-k1"
| Update driver version to 5.04.00-k1 | [SCSI] qla4xxx: Update driver version to 5.04.00-k1
Signed-off-by: Vikas Chaudhary <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs |
1f0d489fdca7b9cd511ce4e4060389a6e4b41e43 | include/problems/0001-0050/Problem15.h | include/problems/0001-0050/Problem15.h | //===-- problems/Problem15.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 15: Lattice paths
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM15_H
#define PROBLEMS_PROBLEM15_H
#include <string>
#include <gmpxx.h>
#include "../Problem.h"
namespace problems {
class Problem15 : public Problem {
public:
Problem15() : value(0), solved(false) {}
~Problem15() = default;
std::string answer();
std::string description() const;
void solve();
// Simple brute force solution
unsigned long long bruteForce(const unsigned long long limit) const;
private:
/// Cached answer
mpz_class value;
/// If cached answer is valid
bool solved;
};
}
#endif
| //===-- problems/Problem15.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 15: Lattice paths
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM15_H
#define PROBLEMS_PROBLEM15_H
#include <string>
#include <gmpxx.h>
#include "../Problem.h"
namespace problems {
class Problem15 : public Problem {
public:
Problem15() : value(0), solved(false) {}
~Problem15() = default;
std::string answer();
std::string description() const;
void solve();
private:
/// Cached answer
mpz_class value;
/// If cached answer is valid
bool solved;
};
}
#endif
| Remove extraneous method in Problem 15 | Remove extraneous method in Problem 15
| C | mit | wtmitchell/challenge_problems,wtmitchell/challenge_problems,wtmitchell/challenge_problems |
bcb11829bab091c0e2c8ea4de42cc03aa5359f0c | src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h | src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h | #ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#include "abstractformeditortool.h"
namespace QmlDesigner {
class QMLDESIGNERCORE_EXPORT AbstractCustomTool : public QmlDesigner::AbstractFormEditorTool
{
public:
AbstractCustomTool();
void selectedItemsChanged(const QList<FormEditorItem *> &itemList) QTC_OVERRIDE;
virtual int wantHandleItem(const ModelNode &modelNode) const QTC_OVERRIDE = 0;
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
| #ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#include "abstractformeditortool.h"
namespace QmlDesigner {
class QMLDESIGNERCORE_EXPORT AbstractCustomTool : public QmlDesigner::AbstractFormEditorTool
{
public:
AbstractCustomTool();
void selectedItemsChanged(const QList<FormEditorItem *> &itemList) QTC_OVERRIDE;
virtual QString name() const = 0;
virtual int wantHandleItem(const ModelNode &modelNode) const QTC_OVERRIDE = 0;
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
| Add name method to custom tools | QmlDesigner.FormEditor: Add name method to custom tools
Change-Id: Icabf454fc49444a5a88c1f5eb84847967f09078e
Reviewed-by: Thomas Hartmann <[email protected]>
| C | lgpl-2.1 | Distrotech/qtcreator,danimo/qt-creator,darksylinc/qt-creator,duythanhphan/qt-creator,colede/qtcreator,amyvmiwei/qt-creator,Distrotech/qtcreator,malikcjm/qtcreator,darksylinc/qt-creator,xianian/qt-creator,omniacreator/qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,danimo/qt-creator,AltarBeastiful/qt-creator,omniacreator/qtcreator,colede/qtcreator,duythanhphan/qt-creator,malikcjm/qtcreator,kuba1/qtcreator,amyvmiwei/qt-creator,farseerri/git_code,xianian/qt-creator,amyvmiwei/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,kuba1/qtcreator,malikcjm/qtcreator,malikcjm/qtcreator,maui-packages/qt-creator,xianian/qt-creator,xianian/qt-creator,AltarBeastiful/qt-creator,duythanhphan/qt-creator,colede/qtcreator,danimo/qt-creator,danimo/qt-creator,maui-packages/qt-creator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,danimo/qt-creator,Distrotech/qtcreator,Distrotech/qtcreator,colede/qtcreator,maui-packages/qt-creator,richardmg/qtcreator,colede/qtcreator,maui-packages/qt-creator,danimo/qt-creator,danimo/qt-creator,richardmg/qtcreator,amyvmiwei/qt-creator,kuba1/qtcreator,maui-packages/qt-creator,amyvmiwei/qt-creator,amyvmiwei/qt-creator,danimo/qt-creator,maui-packages/qt-creator,malikcjm/qtcreator,richardmg/qtcreator,darksylinc/qt-creator,darksylinc/qt-creator,darksylinc/qt-creator,amyvmiwei/qt-creator,farseerri/git_code,kuba1/qtcreator,xianian/qt-creator,danimo/qt-creator,maui-packages/qt-creator,omniacreator/qtcreator,farseerri/git_code,xianian/qt-creator,duythanhphan/qt-creator,xianian/qt-creator,AltarBeastiful/qt-creator,Distrotech/qtcreator,darksylinc/qt-creator,duythanhphan/qt-creator,duythanhphan/qt-creator,omniacreator/qtcreator,malikcjm/qtcreator,duythanhphan/qt-creator,amyvmiwei/qt-creator,kuba1/qtcreator,darksylinc/qt-creator,martyone/sailfish-qtcreator,richardmg/qtcreator,kuba1/qtcreator,colede/qtcreator,richardmg/qtcreator,farseerri/git_code,kuba1/qtcreator,omniacreator/qtcreator,richardmg/qtcreator,kuba1/qtcreator,farseerri/git_code,martyone/sailfish-qtcreator,AltarBeastiful/qt-creator,richardmg/qtcreator,Distrotech/qtcreator,omniacreator/qtcreator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator,farseerri/git_code,xianian/qt-creator,martyone/sailfish-qtcreator,kuba1/qtcreator,colede/qtcreator,farseerri/git_code,malikcjm/qtcreator,Distrotech/qtcreator,martyone/sailfish-qtcreator,farseerri/git_code,omniacreator/qtcreator,AltarBeastiful/qt-creator,martyone/sailfish-qtcreator |
7683806ea3a16e14e8b7c0c9878f5211b4c8baa5 | lib/CodeGen/Spiller.h | lib/CodeGen/Spiller.h | //===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SPILLER_H
#define LLVM_CODEGEN_SPILLER_H
#include <vector>
namespace llvm {
/// Spiller interface.
///
/// Implementations are utility classes which insert spill or remat code on
/// demand.
class Spiller {
public:
virtual ~Spiller() = 0;
virtual std::vector<class LiveInterval*> spill(class LiveInterval *li) = 0;
};
/// Create and return a spiller object, as specified on the command line.
Spiller* createSpiller(class MachineFunction *mf, class LiveIntervals *li,
class VirtRegMap *vrm);
}
#endif
| //===-- llvm/CodeGen/Spiller.h - Spiller -*- C++ -*------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CODEGEN_SPILLER_H
#define LLVM_CODEGEN_SPILLER_H
#include <vector>
namespace llvm {
struct LiveInterval;
/// Spiller interface.
///
/// Implementations are utility classes which insert spill or remat code on
/// demand.
class Spiller {
public:
virtual ~Spiller() = 0;
virtual std::vector<LiveInterval*> spill(class LiveInterval *li) = 0;
};
/// Create and return a spiller object, as specified on the command line.
Spiller* createSpiller(class MachineFunction *mf, class LiveIntervals *li,
class VirtRegMap *vrm);
}
#endif
| Fix to compile on VS2008. | Fix to compile on VS2008.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@72112 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm |
0469cb5ca56892a1678361ff0856d174f09a7a93 | numpy/core/include/numpy/npy_endian.h | numpy/core/include/numpy/npy_endian.h | #ifndef _NPY_ENDIAN_H_
#define _NPY_ENDIAN_H_
/* NPY_BYTE_ORDER is set to the same value as BYTE_ORDER set by glibc in
* endian.h */
#ifdef NPY_HAVE_ENDIAN_H
/* Use endian.h if available */
#include <endian.h>
#define NPY_BYTE_ODER __BYTE_ORDER
#if (__BYTE_ORDER == __LITTLE_ENDIAN)
#define NPY_LITTLE_ENDIAN
#elif (__BYTE_ORDER == __BIG_ENDIAN)
#define NPY_BYTE_ODER __BYTE_ORDER
#else
#error Unknown machine endianness detected.
#endif
#else
/* Set endianness info using target CPU */
#include "cpuarch.h"
#if defined(NPY_X86) || defined(NPY_AMD64)
#define NPY_LITTLE_ENDIAN
#define NPY_BYTE_ORDER 1234
#elif defined(NPY_PPC) || defined(NPY_SPARC) || defined(NPY_S390) || \
defined(NPY_PA_RISC)
#define NPY_BIG_ENDIAN
#define NPY_BYTE_ORDER 4321
#endif
#endif
#endif
| Add a (public) header to set cpu endianness when numpy headers are included instead of setting them at build time. | Add a (public) header to set cpu endianness when numpy headers are included instead of setting them at build time.
| C | bsd-3-clause | endolith/numpy,madphysicist/numpy,brandon-rhodes/numpy,pelson/numpy,ViralLeadership/numpy,GaZ3ll3/numpy,ddasilva/numpy,rmcgibbo/numpy,jorisvandenbossche/numpy,simongibbons/numpy,ajdawson/numpy,pdebuyl/numpy,rgommers/numpy,AustereCuriosity/numpy,ogrisel/numpy,moreati/numpy,endolith/numpy,MSeifert04/numpy,has2k1/numpy,jakirkham/numpy,drasmuss/numpy,leifdenby/numpy,njase/numpy,mingwpy/numpy,hainm/numpy,rmcgibbo/numpy,embray/numpy,ewmoore/numpy,WarrenWeckesser/numpy,rmcgibbo/numpy,maniteja123/numpy,ahaldane/numpy,Srisai85/numpy,GaZ3ll3/numpy,simongibbons/numpy,jonathanunderwood/numpy,jschueller/numpy,empeeu/numpy,ddasilva/numpy,dato-code/numpy,joferkington/numpy,chiffa/numpy,brandon-rhodes/numpy,jorisvandenbossche/numpy,mwiebe/numpy,sinhrks/numpy,ssanderson/numpy,anntzer/numpy,naritta/numpy,gmcastil/numpy,chatcannon/numpy,has2k1/numpy,felipebetancur/numpy,kirillzhuravlev/numpy,kirillzhuravlev/numpy,pelson/numpy,nguyentu1602/numpy,felipebetancur/numpy,embray/numpy,leifdenby/numpy,ajdawson/numpy,utke1/numpy,ogrisel/numpy,kiwifb/numpy,joferkington/numpy,cowlicks/numpy,tdsmith/numpy,mingwpy/numpy,tacaswell/numpy,ChristopherHogan/numpy,larsmans/numpy,ahaldane/numpy,andsor/numpy,jakirkham/numpy,ChristopherHogan/numpy,solarjoe/numpy,seberg/numpy,nguyentu1602/numpy,ssanderson/numpy,skymanaditya1/numpy,has2k1/numpy,jorisvandenbossche/numpy,trankmichael/numpy,mhvk/numpy,mwiebe/numpy,mathdd/numpy,MichaelAquilina/numpy,jonathanunderwood/numpy,grlee77/numpy,Yusa95/numpy,rgommers/numpy,jakirkham/numpy,ViralLeadership/numpy,Anwesh43/numpy,rajathkumarmp/numpy,empeeu/numpy,githubmlai/numpy,Yusa95/numpy,jankoslavic/numpy,mingwpy/numpy,BabeNovelty/numpy,WillieMaddox/numpy,musically-ut/numpy,andsor/numpy,Eric89GXL/numpy,jankoslavic/numpy,AustereCuriosity/numpy,pelson/numpy,mattip/numpy,dwf/numpy,endolith/numpy,pdebuyl/numpy,moreati/numpy,bmorris3/numpy,SunghanKim/numpy,pbrod/numpy,matthew-brett/numpy,dwf/numpy,pizzathief/numpy,rhythmsosad/numpy,GaZ3ll3/numpy,ContinuumIO/numpy,ewmoore/numpy,dch312/numpy,dato-code/numpy,felipebetancur/numpy,GrimDerp/numpy,sigma-random/numpy,sonnyhu/numpy,ahaldane/numpy,jonathanunderwood/numpy,ekalosak/numpy,Srisai85/numpy,shoyer/numpy,njase/numpy,chiffa/numpy,utke1/numpy,mathdd/numpy,githubmlai/numpy,leifdenby/numpy,larsmans/numpy,ChristopherHogan/numpy,ewmoore/numpy,joferkington/numpy,mingwpy/numpy,tynn/numpy,SiccarPoint/numpy,astrofrog/numpy,sinhrks/numpy,tdsmith/numpy,rmcgibbo/numpy,bmorris3/numpy,maniteja123/numpy,Linkid/numpy,rajathkumarmp/numpy,stuarteberg/numpy,Dapid/numpy,rajathkumarmp/numpy,numpy/numpy-refactor,mhvk/numpy,embray/numpy,musically-ut/numpy,solarjoe/numpy,ChanderG/numpy,charris/numpy,hainm/numpy,ahaldane/numpy,numpy/numpy-refactor,nguyentu1602/numpy,sigma-random/numpy,mortada/numpy,nbeaver/numpy,Srisai85/numpy,Linkid/numpy,jankoslavic/numpy,Eric89GXL/numpy,SunghanKim/numpy,pbrod/numpy,mindw/numpy,sigma-random/numpy,Linkid/numpy,rhythmsosad/numpy,dch312/numpy,shoyer/numpy,ogrisel/numpy,bertrand-l/numpy,tynn/numpy,ogrisel/numpy,CMartelLML/numpy,ahaldane/numpy,stefanv/numpy,mathdd/numpy,drasmuss/numpy,ESSS/numpy,Yusa95/numpy,BMJHayward/numpy,bringingheavendown/numpy,mhvk/numpy,has2k1/numpy,grlee77/numpy,brandon-rhodes/numpy,gmcastil/numpy,KaelChen/numpy,jorisvandenbossche/numpy,MSeifert04/numpy,cjermain/numpy,cowlicks/numpy,shoyer/numpy,mhvk/numpy,rgommers/numpy,MaPePeR/numpy,BabeNovelty/numpy,argriffing/numpy,BabeNovelty/numpy,mattip/numpy,Linkid/numpy,groutr/numpy,GrimDerp/numpy,dimasad/numpy,anntzer/numpy,rherault-insa/numpy,githubmlai/numpy,argriffing/numpy,ajdawson/numpy,pdebuyl/numpy,Dapid/numpy,madphysicist/numpy,stefanv/numpy,rhythmsosad/numpy,ewmoore/numpy,skymanaditya1/numpy,CMartelLML/numpy,drasmuss/numpy,WarrenWeckesser/numpy,SunghanKim/numpy,immerrr/numpy,MSeifert04/numpy,mortada/numpy,SunghanKim/numpy,numpy/numpy-refactor,SiccarPoint/numpy,nbeaver/numpy,jorisvandenbossche/numpy,abalkin/numpy,moreati/numpy,sinhrks/numpy,yiakwy/numpy,grlee77/numpy,embray/numpy,WarrenWeckesser/numpy,pbrod/numpy,gmcastil/numpy,MichaelAquilina/numpy,chiffa/numpy,NextThought/pypy-numpy,cjermain/numpy,ESSS/numpy,WarrenWeckesser/numpy,chatcannon/numpy,tdsmith/numpy,bertrand-l/numpy,behzadnouri/numpy,numpy/numpy-refactor,rudimeier/numpy,sinhrks/numpy,Anwesh43/numpy,mortada/numpy,CMartelLML/numpy,BMJHayward/numpy,gfyoung/numpy,kiwifb/numpy,bringingheavendown/numpy,dwf/numpy,stefanv/numpy,naritta/numpy,b-carter/numpy,shoyer/numpy,Eric89GXL/numpy,bmorris3/numpy,ChanderG/numpy,MSeifert04/numpy,immerrr/numpy,pyparallel/numpy,dimasad/numpy,anntzer/numpy,KaelChen/numpy,cjermain/numpy,charris/numpy,GrimDerp/numpy,pbrod/numpy,nguyentu1602/numpy,ViralLeadership/numpy,mortada/numpy,grlee77/numpy,behzadnouri/numpy,mindw/numpy,dwillmer/numpy,BMJHayward/numpy,MSeifert04/numpy,ekalosak/numpy,ChanderG/numpy,MaPePeR/numpy,rherault-insa/numpy,ddasilva/numpy,andsor/numpy,sonnyhu/numpy,jankoslavic/numpy,dwillmer/numpy,Yusa95/numpy,trankmichael/numpy,simongibbons/numpy,charris/numpy,stefanv/numpy,gfyoung/numpy,pyparallel/numpy,rudimeier/numpy,dimasad/numpy,KaelChen/numpy,GrimDerp/numpy,sonnyhu/numpy,CMartelLML/numpy,Dapid/numpy,dwillmer/numpy,dimasad/numpy,seberg/numpy,dwf/numpy,skwbc/numpy,ContinuumIO/numpy,hainm/numpy,mindw/numpy,MaPePeR/numpy,numpy/numpy,empeeu/numpy,ajdawson/numpy,MichaelAquilina/numpy,KaelChen/numpy,larsmans/numpy,naritta/numpy,jschueller/numpy,pdebuyl/numpy,NextThought/pypy-numpy,dwillmer/numpy,WillieMaddox/numpy,trankmichael/numpy,b-carter/numpy,naritta/numpy,kiwifb/numpy,cjermain/numpy,dato-code/numpy,pelson/numpy,numpy/numpy,shoyer/numpy,yiakwy/numpy,andsor/numpy,tacaswell/numpy,immerrr/numpy,ChanderG/numpy,empeeu/numpy,seberg/numpy,charris/numpy,tdsmith/numpy,GaZ3ll3/numpy,mhvk/numpy,trankmichael/numpy,joferkington/numpy,githubmlai/numpy,bmorris3/numpy,bertrand-l/numpy,pbrod/numpy,matthew-brett/numpy,seberg/numpy,groutr/numpy,astrofrog/numpy,cowlicks/numpy,MichaelAquilina/numpy,numpy/numpy,kirillzhuravlev/numpy,skwbc/numpy,Eric89GXL/numpy,astrofrog/numpy,mathdd/numpy,ogrisel/numpy,rudimeier/numpy,MaPePeR/numpy,SiccarPoint/numpy,dato-code/numpy,embray/numpy,kirillzhuravlev/numpy,rajathkumarmp/numpy,groutr/numpy,mattip/numpy,tynn/numpy,skwbc/numpy,hainm/numpy,astrofrog/numpy,pyparallel/numpy,yiakwy/numpy,Anwesh43/numpy,rudimeier/numpy,ESSS/numpy,musically-ut/numpy,Anwesh43/numpy,AustereCuriosity/numpy,jschueller/numpy,pizzathief/numpy,astrofrog/numpy,solarjoe/numpy,BabeNovelty/numpy,cowlicks/numpy,pizzathief/numpy,abalkin/numpy,jakirkham/numpy,brandon-rhodes/numpy,stuarteberg/numpy,NextThought/pypy-numpy,skymanaditya1/numpy,stuarteberg/numpy,WarrenWeckesser/numpy,Srisai85/numpy,numpy/numpy-refactor,abalkin/numpy,WillieMaddox/numpy,matthew-brett/numpy,numpy/numpy,stefanv/numpy,pelson/numpy,yiakwy/numpy,madphysicist/numpy,maniteja123/numpy,simongibbons/numpy,jakirkham/numpy,jschueller/numpy,bringingheavendown/numpy,dch312/numpy,mindw/numpy,matthew-brett/numpy,b-carter/numpy,rhythmsosad/numpy,tacaswell/numpy,chatcannon/numpy,rgommers/numpy,gfyoung/numpy,musically-ut/numpy,utke1/numpy,pizzathief/numpy,behzadnouri/numpy,ContinuumIO/numpy,ekalosak/numpy,ChristopherHogan/numpy,immerrr/numpy,mwiebe/numpy,ssanderson/numpy,endolith/numpy,sonnyhu/numpy,sigma-random/numpy,NextThought/pypy-numpy,madphysicist/numpy,ewmoore/numpy,argriffing/numpy,rherault-insa/numpy,SiccarPoint/numpy,felipebetancur/numpy,dwf/numpy,pizzathief/numpy,BMJHayward/numpy,nbeaver/numpy,njase/numpy,mattip/numpy,madphysicist/numpy,dch312/numpy,larsmans/numpy,stuarteberg/numpy,simongibbons/numpy,grlee77/numpy,anntzer/numpy,ekalosak/numpy,skymanaditya1/numpy,matthew-brett/numpy |
|
24f4d30135007cb729223094e0855c65cf7025f5 | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#define SK_LEGACY_HEIF_API
#endif // SkUserConfigManual_DEFINED
| /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
#define SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE (512 * 1024)
#define SK_USE_FREETYPE_EMBOLDEN
// Disable these Ganesh features
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
// Check error is expensive. HWUI historically also doesn't check its allocations
#define GR_GL_CHECK_ALLOC_WITH_GET_ERROR 0
// Legacy flags
#define SK_IGNORE_GPU_DITHER
#define SK_SUPPORT_DEPRECATED_CLIPOPS
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| Remove SK_LEGACY_HEIF_API to enable animation in SkHeifCodec | Remove SK_LEGACY_HEIF_API to enable animation in SkHeifCodec
bug: 78868457
bug: 120414514
test: local test with OpenGL Rendrerer Tests animation
demo and heifs files
Change-Id: I09a7667a57f545927dbe9ac24c1a6b405ff0006d
| C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia |
22da76be1ee64120f69ed35d6f21c85c31df08b6 | sky/shell/android/platform_view_android.h | sky/shell/android/platform_view_android.h | // 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
#define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
#include "sky/shell/platform_view.h"
struct ANativeWindow;
namespace sky {
namespace shell {
class PlatformViewAndroid : public PlatformView {
public:
static bool Register(JNIEnv* env);
~PlatformViewAndroid() override;
// Called from Java
void Detach(JNIEnv* env, jobject obj);
void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
void SurfaceDestroyed(JNIEnv* env, jobject obj);
private:
void ReleaseWindow();
ANativeWindow* window_;
DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid);
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
| // 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
#define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
#include "sky/shell/platform_view.h"
struct ANativeWindow;
namespace sky {
namespace shell {
class PlatformViewAndroid : public PlatformView {
public:
static bool Register(JNIEnv* env);
~PlatformViewAndroid() override;
// Called from Java
void Detach(JNIEnv* env, jobject obj);
void SurfaceCreated(JNIEnv* env, jobject obj, jobject jsurface);
void SurfaceDestroyed(JNIEnv* env, jobject obj);
private:
void ReleaseWindow();
DISALLOW_COPY_AND_ASSIGN(PlatformViewAndroid);
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_PLATFORM_VIEW_ANDROID_H_
| Stop SkyShell from crashing on startup | Stop SkyShell from crashing on startup
[email protected]
Review URL: https://codereview.chromium.org/1178773002.
| C | bsd-3-clause | afandria/mojo,chinmaygarde/mojo,jianglu/mojo,afandria/mojo,jianglu/mojo,chinmaygarde/mojo,chinmaygarde/mojo,jianglu/mojo,chinmaygarde/mojo,afandria/mojo,afandria/mojo,chinmaygarde/mojo,jianglu/mojo,jianglu/mojo,afandria/mojo,afandria/mojo,chinmaygarde/mojo,jianglu/mojo,chinmaygarde/mojo,afandria/mojo,jianglu/mojo,chinmaygarde/mojo,chinmaygarde/mojo,jianglu/mojo,afandria/mojo |
ab7304d74bef24d2b9eaaa30bd462ecdbd946428 | lib/vpsc/solve_VPSC.h | lib/vpsc/solve_VPSC.h | /**
* \brief Solve an instance of the "Variable Placement with Separation
* Constraints" problem.
*
* Authors:
* Tim Dwyer <[email protected]>
*
* Copyright (C) 2005 Authors
*
* This version is released under the CPL (Common Public License) with
* the Graphviz distribution.
* A version is also available under the LGPL as part of the Adaptagrams
* project: http://sourceforge.net/projects/adaptagrams.
* If you make improvements or bug fixes to this code it would be much
* appreciated if you could also contribute those changes back to the
* Adaptagrams repository.
*/
#ifndef SEEN_REMOVEOVERLAP_SOLVE_VPSC_H
#define SEEN_REMOVEOVERLAP_SOLVE_VPSC_H
#include <vector>
class Variable;
class Constraint;
class Blocks;
/**
* Variable Placement with Separation Constraints problem instance
*/
class VPSC {
public:
virtual void satisfy();
virtual void solve();
VPSC(const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[]);
virtual ~VPSC();
protected:
Blocks *bs;
Constraint **cs;
unsigned m;
void printBlocks();
private:
void refine();
bool constraintGraphIsCyclic(const unsigned n, Variable *vs[]);
bool blockGraphIsCyclic();
};
class IncVPSC : VPSC {
public:
unsigned splitCnt;
void satisfy();
void solve();
void moveBlocks();
void splitBlocks();
IncVPSC(const unsigned n, Variable *vs[], const unsigned m, Constraint *cs[]);
private:
typedef std::vector<Constraint*> ConstraintList;
ConstraintList inactive;
double mostViolated(ConstraintList &l,Constraint* &v);
};
#endif // SEEN_REMOVEOVERLAP_SOLVE_VPSC_H
| Add the vpsc library for IPSEPCOLA features | Add the vpsc library for IPSEPCOLA features
| C | epl-1.0 | pixelglow/graphviz,pixelglow/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,kbrock/graphviz,tkelman/graphviz,pixelglow/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,ellson/graphviz,MjAbuz/graphviz,pixelglow/graphviz,kbrock/graphviz,pixelglow/graphviz,kbrock/graphviz,kbrock/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,BMJHayward/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,jho1965us/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,ellson/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,jho1965us/graphviz,MjAbuz/graphviz,jho1965us/graphviz,ellson/graphviz |
|
e850f2a6f16480dd37ac1c1b9ac4285bcd9fff7c | ext/osl/rbosl_move.h | ext/osl/rbosl_move.h | #include "ruby.h"
#include <osl/move.h>
extern VALUE cMove;
using namespace osl;
void rb_move_free(Move* ptr);
static VALUE rb_move_s_new(VALUE self);
void Init_move(void);
| #ifndef RBOSL_MOVE_H
#define RBOSL_MOVE_H
#include "ruby.h"
#include <osl/move.h>
extern VALUE cMove;
using namespace osl;
void rb_move_free(Move* ptr);
static VALUE rb_move_s_new(VALUE self);
void Init_move(void);
#endif /* RBOSL_MOVE_H */
| Add a missing include guard | Add a missing include guard
| C | mit | myokoym/ruby-osl,myokoym/ruby-osl,myokoym/ruby-osl |
fc94e16df9496ee6a8d12ed8476a545150526480 | src/condor_includes/condor_fix_unistd.h | src/condor_includes/condor_fix_unistd.h | #ifndef FIX_UNISTD_H
#define FIX_UNISTD_H
#include <unistd.h>
/*
For some reason the g++ include files on Ultrix 4.3 fail to provide
these prototypes, even though the Ultrix 4.2 versions did...
*/
#if defined(ULTRIX43)
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__STDC__) || defined(__cplusplus)
int symlink( const char *, const char * );
char *sbrk( int );
int gethostname( char *, int );
#else
int symlink();
char *sbrk();
int gethostname();
#endif
#if defined(__cplusplus)
}
#endif
#endif /* ULTRIX43 */
#endif
| #ifndef FIX_UNISTD_H
#define FIX_UNISTD_H
#include <unistd.h>
/*
For some reason the g++ include files on Ultrix 4.3 fail to provide
these prototypes, even though the Ultrix 4.2 versions did...
Once again, OSF1 also chokes, unless _AES_SOURCE(?) is defined JCP
*/
#if defined(ULTRIX43) || defined(OSF1)
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__STDC__) || defined(__cplusplus)
int symlink( const char *, const char * );
char *sbrk( int );
int gethostname( char *, int );
#else
int symlink();
char *sbrk();
int gethostname();
#endif
#if defined(__cplusplus)
}
#endif
#endif /* ULTRIX43 */
#endif
| Add OSF/1 to a pre-existing conditional compilation switch. | Add OSF/1 to a pre-existing conditional compilation switch.
| C | apache-2.0 | htcondor/htcondor,htcondor/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,htcondor/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,clalancette/condor-dcloud,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/condor,mambelli/osg-bosco-marco,djw8605/condor,htcondor/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/htcondor,djw8605/condor,neurodebian/htcondor,djw8605/condor,bbockelm/condor-network-accounting,htcondor/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,bbockelm/condor-network-accounting,zhangzhehust/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/htcondor,neurodebian/htcondor,djw8605/condor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/condor,bbockelm/condor-network-accounting,djw8605/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,neurodebian/htcondor,djw8605/condor,clalancette/condor-dcloud,mambelli/osg-bosco-marco,zhangzhehust/htcondor,djw8605/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/condor,djw8605/htcondor,djw8605/htcondor,htcondor/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,htcondor/htcondor,zhangzhehust/htcondor |
dd5b849ed810b53946e927ed419082c1fa3d516c | tests/regression/34-congruence/02-constants.c | tests/regression/34-congruence/02-constants.c | // PARAM: --enable ana.int.congruence --disable ana.int.def_exc
// This test ensures that operations on constant congr. classes (i.e. classes of the form {k} : arbitrary integer k) yield concrete vals
int main() {
// basic arithmetic operators
int a = 1;
int b = 2;
int c = -1;
int d = -2;
assert (a + b == 3); assert (a + d == -1);
assert (a * b == 2); assert (b * c == -2);
assert (a / b == 0); assert (d / c == 2);
assert (b % a == 0); assert (d % c == 0);
assert (-a == -1); assert (-d == 2);
// logical operators
int zero = 0;
int one = 1;
unsigned int uns_z = 0;
assert ((zero || one) == 1); assert ((zero || zero) == 0); assert ((one || one) == 1);
assert ((zero && one) == 0); assert ((zero && zero) == 0); assert ((one && one) == 1);
assert (!one == 0); assert (!zero == 1);
// bitwise operators
assert ((zero & zero) == 0); assert ((zero & one) == 0); assert ((one & zero) == 0); assert ((one & one) == 1);
assert ((zero | zero) == 0); assert ((zero | one) == 1); assert ((one | zero) == 1); assert ((one | one) == 1);
assert ((zero ^ zero) == 0); assert ((zero ^ one) == 1); assert ((one ^ zero) == 1); assert ((one ^ one) == 0);
assert (~zero == -1); assert (~uns_z == 4294967295);
// shift-left
unsigned char m = 136;
assert ((m << 1) == 16);
//shift-right missing as only top() is returned currently
// comparisons
assert ((a < b) == 1);
assert ((a > b) == 0);
assert ((a == b) == 0);
assert ((a != b) == 1);
return 0;
} | Add constant test for congruence domain | Add constant test for congruence domain
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
063b55a1ac04addc0989efb15d41d2232e5353da | OrbitGl/GraphTrack.h | OrbitGl/GraphTrack.h | // Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ORBIT_GL_GRAPH_TRACK_H
#define ORBIT_GL_GRAPH_TRACK_H
#include <limits>
#include "ScopeTimer.h"
#include "Track.h"
class TimeGraph;
class GraphTrack : public Track {
public:
explicit GraphTrack(TimeGraph* time_graph);
Type GetType() const override { return kGraphTrack; }
void Draw(GlCanvas* canvas, bool picking) override;
void OnDrag(int x, int y) override;
void AddTimer(const Timer& timer) override;
float GetHeight() const override;
protected:
std::map<uint64_t, double> values_;
double min_ = std::numeric_limits<double>::max();
double max_ = std::numeric_limits<double>::min();
double value_range_ = 0;
double inv_value_range_ = 0;
};
#endif
| // Copyright (c) 2020 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ORBIT_GL_GRAPH_TRACK_H
#define ORBIT_GL_GRAPH_TRACK_H
#include <limits>
#include "ScopeTimer.h"
#include "Track.h"
class TimeGraph;
class GraphTrack : public Track {
public:
explicit GraphTrack(TimeGraph* time_graph);
Type GetType() const override { return kGraphTrack; }
void Draw(GlCanvas* canvas, bool picking) override;
void OnDrag(int x, int y) override;
void AddTimer(const Timer& timer) override;
float GetHeight() const override;
protected:
std::map<uint64_t, double> values_;
double min_ = std::numeric_limits<double>::max();
double max_ = std::numeric_limits<double>::lowest();
double value_range_ = 0;
double inv_value_range_ = 0;
};
#endif
| Use numeric_limits<double>::lowest instead of numeric_limits<double>::min | Use numeric_limits<double>::lowest instead of numeric_limits<double>::min
| C | bsd-2-clause | google/orbit,google/orbit,google/orbit,google/orbit |
af9dfccab1d126811fe6cab3f141a65b41884c6d | ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h | ports/raspberrypi/boards/qtpy_rp2040/mpconfigboard.h | #define MICROPY_HW_BOARD_NAME "Adafruit QTPy RP2040"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO12)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4)
// #define DEFAULT_UART_BUS_RX (&pin_PA11)
// #define DEFAULT_UART_BUS_TX (&pin_PA10)
// Flash chip is GD25Q32 connected over QSPI
#define TOTAL_FLASH_SIZE (4 * 1024 * 1024)
| #define MICROPY_HW_BOARD_NAME "Adafruit QTPy RP2040"
#define MICROPY_HW_MCU_NAME "rp2040"
#define MICROPY_HW_NEOPIXEL (&pin_GPIO12)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24)
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6)
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3)
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4)
// #define DEFAULT_UART_BUS_RX (&pin_PA11)
// #define DEFAULT_UART_BUS_TX (&pin_PA10)
// Flash chip is GD25Q64 connected over QSPI
#define TOTAL_FLASH_SIZE (8 * 1024 * 1024)
| Update QT Py flash size | Update QT Py flash size | C | mit | adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython |
0bd7dc36ef978a11bfe9a4c4d2a19f53e933a7c4 | src/linux/epoll/peer_testing.h | src/linux/epoll/peer_testing.h | #ifndef CJET_PEER_TESTING_H
#define CJET_PEER_TESTING_H
#ifdef TESTING
#ifdef __cplusplus
extern "C" {
#endif
int fake_read(int fd, void *buf, size_t count);
int fake_send(int fd, void *buf, size_t count, int flags);
int fake_writev(int fd, const struct iovec *iov, int iovcnt);
#ifdef __cplusplus
}
#endif
#define READ fake_read
#define SEND fake_send
#define WRITEV fake_writev
#else
#define READ read
#define SEND send
#define WRITEV writev
#endif
#endif
| #ifndef CJET_PEER_TESTING_H
#define CJET_PEER_TESTING_H
#ifdef TESTING
#include <sys/uio.h>
#ifdef __cplusplus
extern "C" {
#endif
int fake_read(int fd, void *buf, size_t count);
int fake_send(int fd, void *buf, size_t count, int flags);
int fake_writev(int fd, const struct iovec *iov, int iovcnt);
#ifdef __cplusplus
}
#endif
#define READ fake_read
#define SEND fake_send
#define WRITEV fake_writev
#else
#define READ read
#define SEND send
#define WRITEV writev
#endif
#endif
| Add include to provide type struct iovec. | Add include to provide type struct iovec.
| C | mit | gatzka/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,mloy/cjet,gatzka/cjet |
82c12a3cec5c2351c2a114ee62f1d61dd57f4253 | src/openboardview/imgui_impl_sdl_gles2.h | src/openboardview/imgui_impl_sdl_gles2.h | // ImGui SDL2 binding with OpenGL ES 2
// You can copy and use unmodified imgui_impl_* files in your project.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and
// ImGui_ImplXXXX_Shutdown().
// See main.cpp for an example of using this.
// https://github.com/ocornut/imgui
#ifndef IMGUI_IMPL_SDL_GL2
#define IMGUI_IMPL_SDL_GL2
#include "../../../../../../../imgui.h"
struct SDL_Window;
typedef union SDL_Event SDL_Event;
IMGUI_API bool ImGui_ImplSdlGLES2_Init(SDL_Window *window);
IMGUI_API void ImGui_ImplSdlGLES2_Shutdown();
IMGUI_API void ImGui_ImplSdlGLES2_NewFrame();
IMGUI_API bool ImGui_ImplSdlGLES2_ProcessEvent(SDL_Event *event);
// Use if you want to reset your rendering device without losing ImGui state.
IMGUI_API void ImGui_ImplSdlGLES2_InvalidateDeviceObjects();
IMGUI_API bool ImGui_ImplSdlGLES2_CreateDeviceObjects();
#endif // IMGUI_IMPL_SDL_GL2 | // ImGui SDL2 binding with OpenGL ES 2
// You can copy and use unmodified imgui_impl_* files in your project.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and
// ImGui_ImplXXXX_Shutdown().
// See main.cpp for an example of using this.
// https://github.com/ocornut/imgui
#ifndef IMGUI_IMPL_SDL_GL2
#define IMGUI_IMPL_SDL_GL2
#include "imgui/imgui.h"
struct SDL_Window;
typedef union SDL_Event SDL_Event;
IMGUI_API bool ImGui_ImplSdlGLES2_Init(SDL_Window *window);
IMGUI_API void ImGui_ImplSdlGLES2_Shutdown();
IMGUI_API void ImGui_ImplSdlGLES2_NewFrame();
IMGUI_API bool ImGui_ImplSdlGLES2_ProcessEvent(SDL_Event *event);
// Use if you want to reset your rendering device without losing ImGui state.
IMGUI_API void ImGui_ImplSdlGLES2_InvalidateDeviceObjects();
IMGUI_API bool ImGui_ImplSdlGLES2_CreateDeviceObjects();
#endif // IMGUI_IMPL_SDL_GL2
| Fix imgui include path in GLES renderer | Fix imgui include path in GLES renderer
| C | mit | chloridite/OpenBoardView,chloridite/OpenBoardView |
bd2ff3914c51693544eecbc477b505c7366d3cb3 | Source/Regex.h | Source/Regex.h | // Copyright © 2015 Outware Mobile. All rights reserved.
#import <Foundation/Foundation.h>
FOUNDATION_EXPORT double RegexVersionNumber;
FOUNDATION_EXPORT const unsigned char RegexVersionString[];
| #import <Foundation/Foundation.h>
FOUNDATION_EXPORT double RegexVersionNumber;
FOUNDATION_EXPORT const unsigned char RegexVersionString[];
| Remove an invalid copyright notice | Remove an invalid copyright notice
| C | mit | sharplet/Regex,sclukey/Regex,sclukey/Regex,sharplet/Regex,sharplet/Regex |
9136fc058781cf31b7b045765be1202681eb6a0d | src/asynchronous_loader/file_loader.h | src/asynchronous_loader/file_loader.h | // Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
#define PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
#include "fplbase/async_loader.h"
namespace pindrop {
class FileLoader;
class Resource : public fplbase::AsyncAsset {
public:
virtual ~Resource() {}
void LoadFile(const char* filename, FileLoader* loader);
private:
virtual void Finalize() {};
};
class FileLoader {
public:
void StartLoading();
bool TryFinalize();
void QueueJob(Resource* resource);
private:
fplbase::AsyncLoader loader;
};
} // namespace pindrop
#endif // PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
| // Copyright 2015 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
#define PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
#include "fplbase/async_loader.h"
namespace pindrop {
class FileLoader;
class Resource : public fplbase::AsyncAsset {
public:
virtual ~Resource() {}
void LoadFile(const char* filename, FileLoader* loader);
private:
virtual bool Finalize() { return true; };
virtual bool IsValid() { return true; };
};
class FileLoader {
public:
void StartLoading();
bool TryFinalize();
void QueueJob(Resource* resource);
private:
fplbase::AsyncLoader loader;
};
} // namespace pindrop
#endif // PINDROP_ASYNCHRONOUS_LOADER_FILE_LOADER_H_
| Update Resource with latest changes to FPLBase. | Update Resource with latest changes to FPLBase.
AsyncAsset had some changes to virtual functions, so Resource,
which inherits from it, needs to be updated.
Tested on Linux.
Change-Id: Ic12854c7d24a04f0049673fa1df6e96a6d68aa15
| C | apache-2.0 | google/pindrop,google/pindrop,google/pindrop |
2cb8f29ecd8d8864a2110ef72fed242c107ef1a5 | test/CodeGen/stack-size-section.c | test/CodeGen/stack-size-section.c | // 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; }
| // 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() { return 42; }
| Fix test added in r321992 failing on some buildbots. | Fix test added in r321992 failing on some buildbots.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@321995 91177308-0d34-0410-b5e6-96231b3b80d8
| C | 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/clang,llvm-mirror/clang,llvm-mirror/clang |
f3b0fb14d7f8e28aeb4d96e587689fe7a8394c69 | tensorflow/core/platform/stringpiece.h | tensorflow/core/platform/stringpiece.h | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// StringPiece is a simple structure containing a pointer into some external
// storage and a size. The user of a StringPiece must ensure that the slice
// is not used after the corresponding external storage has been
// deallocated.
//
// Multiple threads can invoke const methods on a StringPiece without
// external synchronization, but if any of the threads may call a
// non-const method, all threads accessing the same StringPiece must use
// external synchronization.
#ifndef TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
#define TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
#include "absl/strings/string_view.h"
namespace tensorflow {
using StringPiece = absl::string_view;
} // namespace tensorflow
#endif // TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
| /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
// StringPiece is a simple structure containing a pointer into some external
// storage and a size. The user of a StringPiece must ensure that the slice
// is not used after the corresponding external storage has been
// deallocated.
//
// Multiple threads can invoke const methods on a StringPiece without
// external synchronization, but if any of the threads may call a
// non-const method, all threads accessing the same StringPiece must use
// external synchronization.
#ifndef TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
#define TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
#include "absl/strings/string_view.h" // IWYU pragma: export
namespace tensorflow {
using StringPiece = absl::string_view;
} // namespace tensorflow
#endif // TENSORFLOW_CORE_PLATFORM_STRINGPIECE_H_
| Add IWYU tags to headers TF is re-exporting. | Add IWYU tags to headers TF is re-exporting.
PiperOrigin-RevId: 291557362
Change-Id: If78efc5e990f203d5a36777e9531207c573c651a
| C | apache-2.0 | tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,aldian/tensorflow,gunan/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,cxxgtxy/tensorflow,gunan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,xzturn/tensorflow,renyi533/tensorflow,xzturn/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,aam-at/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,gunan/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,tensorflow/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,sarvex/tensorflow,karllessard/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,sarvex/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,tensorflow/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,yongtang/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,annarev/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,annarev/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,annarev/tensorflow,petewarden/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,renyi533/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,aldian/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow,gunan/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,frreiss/tensorflow-fred,aldian/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,annarev/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,renyi533/tensorflow,gunan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,gunan/tensorflow,renyi533/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,yongtang/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,xzturn/tensorflow,aam-at/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-Corporation/tensorflow,yongtang/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,renyi533/tensorflow,xzturn/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,yongtang/tensorflow,petewarden/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,aldian/tensorflow,aldian/tensorflow,yongtang/tensorflow,karllessard/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,annarev/tensorflow,yongtang/tensorflow,sarvex/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,petewarden/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow |
4263808b7481a04033d56c05a24b2a26635e45c8 | include/utils/allocator.h | include/utils/allocator.h | #ifndef _ALLOCATOR_H
#define _ALLOCATOR_H
#include <stddef.h>
typedef struct allocator_t {
void (*cfree)(void *ptr);
} allocator;
#define omf_calloc(nmemb, size) \
omf_calloc_real((nmemb), (size), __FILE__, __LINE__)
void *omf_calloc_real(size_t nmemb, size_t size, const char *file, int line);
#define omf_realloc(ptr, size) \
omf_realloc_real((ptr), (size), __FILE__, __LINE__)
void *omf_realloc_real(void *ptr, size_t size, const char *file, int line);
#endif // _ALLOCATOR_H
| #ifndef _ALLOCATOR_H
#define _ALLOCATOR_H
#include <stddef.h>
typedef struct allocator_t {
void (*cfree)(void *ptr);
} allocator;
#define omf_calloc(nmemb, size) \
omf_calloc_real((nmemb), (size), __FILE__, __LINE__)
void *omf_calloc_real(size_t nmemb, size_t size, const char *file, int line);
#define omf_realloc(ptr, size) \
omf_realloc_real((ptr), (size), __FILE__, __LINE__)
void *omf_realloc_real(void *ptr, size_t size, const char *file, int line);
#define omf_free(ptr) { \
free(ptr); \
(ptr) = NULL; \
}
#endif // _ALLOCATOR_H
| Add omf_free() to NULL the argument after free() | utils: Add omf_free() to NULL the argument after free()
| C | mit | omf2097/openomf,omf2097/openomf,omf2097/openomf |
8bbaaabf9f3db24f387ba1f7bf7374c6ea73f8d3 | libevmjit/Utils.h | libevmjit/Utils.h | #pragma once
#include <iostream>
// The same as assert, but expression is always evaluated and result returned
#define CHECK(expr) (assert(expr), expr)
#if !defined(NDEBUG) // Debug
namespace dev
{
namespace evmjit
{
std::ostream& getLogStream(char const* _channel);
}
}
#define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL)
#else // Release
#define DLOG(CHANNEL) true ? std::cerr : std::cerr
#endif
| #pragma once
#include <iostream>
// The same as assert, but expression is always evaluated and result returned
#define CHECK(expr) (assert(expr), expr)
#if !defined(NDEBUG) // Debug
namespace dev
{
namespace evmjit
{
std::ostream& getLogStream(char const* _channel);
}
}
#define DLOG(CHANNEL) ::dev::evmjit::getLogStream(#CHANNEL)
#else // Release
namespace dev
{
namespace evmjit
{
struct Voider
{
void operator=(std::ostream const&) {}
};
}
}
#define DLOG(CHANNEL) true ? (void)0 : ::dev::evmjit::Voider{} = std::cerr
#endif
| Reimplement no-op version of DLOG to avoid C++ compiler warning | Reimplement no-op version of DLOG to avoid C++ compiler warning
| C | mit | ethcore/evmjit,debris/evmjit,debris/evmjit,ethcore/evmjit |
e00a1a4ce49ad353e25b1ff9eeee2dafd854ddfc | src/python/helpers/python_wrap_const_shared_ptr.h | src/python/helpers/python_wrap_const_shared_ptr.h | /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
#define VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
#include <boost/python/pointee.hpp>
#include <boost/shared_ptr.hpp>
// Retrieved from http://mail.python.org/pipermail/cplusplus-sig/2006-November/011329.html
namespace boost
{
namespace python
{
template <typename T>
inline
T*
get_pointer(boost::shared_ptr<T const> const& p)
{
return const_cast<T*>(p.get());
}
template <typename T>
struct pointee<boost::shared_ptr<T const> >
{
typedef T type;
};
}
}
#endif // VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
| /*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
#define VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
#include <boost/python/pointee.hpp>
#include <boost/get_pointer.hpp>
#include <boost/shared_ptr.hpp>
// Retrieved from http://mail.python.org/pipermail/cplusplus-sig/2006-November/011329.html
namespace boost
{
namespace python
{
template <typename T>
inline
T*
get_pointer(boost::shared_ptr<T const> const& p)
{
return const_cast<T*>(p.get());
}
template <typename T>
struct pointee<boost::shared_ptr<T const> >
{
typedef T type;
};
// Don't hide other get_pointer instances.
using boost::python::get_pointer;
using boost::get_pointer;
}
}
#endif // VISTK_PYTHON_HELPERS_PYTHON_WRAP_CONST_SHARED_PTR_H
| Bring other get_pointer instances into the scope | Bring other get_pointer instances into the scope
| C | bsd-3-clause | Kitware/sprokit,linus-sherrill/sprokit,mathstuf/sprokit,linus-sherrill/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,linus-sherrill/sprokit,Kitware/sprokit,mathstuf/sprokit,mathstuf/sprokit,mathstuf/sprokit |
440744911043f1b09cd3f13172cf023c7e150dac | src/classes/Window.h | src/classes/Window.h | #ifndef WINDOW_H
#define WINDOW_H
#include <ncurses.h>
#include <array>
#include "../game.h"
// Used to define a datatype for calls to wborder
struct Border {
chtype ls, rs, ts, bs;
chtype tl, tr, bl, br;
};
class Window {
public:
Window(rect dim); // ctor
~Window(); // dtor
void bindWin(WINDOW *newW);
int getChar();
void refresh();
void update();
void clear();
void close();
void cursorPos(vec2ui pos);
void draw(vec2ui pos, char ch, chtype colo);
void draw(vec2ui pos, char ch, chtype colo, int attr);
void drawBorder();
void drawBox();
void write(std::string str);
void write(vec2ui pos, std::string str);
void coloSplash(chtype colo);
rect getDim() { return dim; }
void setBorder(Border b);
protected:
WINDOW *w;
rect dim;
Border border { 0,0,0,0,0,0,0,0 }; // Init to default
};
#endif
| #ifndef WINDOW_H
#define WINDOW_H
#include <ncurses.h>
#include <string>
#include <array>
#include "../game.h"
// Used to define a datatype for calls to wborder
struct Border {
chtype ls, rs, ts, bs;
chtype tl, tr, bl, br;
};
class Window {
public:
Window(rect dim); // ctor
~Window(); // dtor
void bindWin(WINDOW *newW);
int getChar();
void refresh();
void update();
void clear();
void close();
void cursorPos(vec2ui pos);
void draw(vec2ui pos, char ch, chtype colo);
void draw(vec2ui pos, char ch, chtype colo, int attr);
void drawBorder();
void drawBox();
void write(std::string str);
void write(vec2ui pos, std::string str);
void coloSplash(chtype colo);
rect getDim() { return dim; }
void setBorder(Border b);
protected:
WINDOW *w;
rect dim;
Border border { 0,0,0,0,0,0,0,0 }; // Init to default
};
#endif
| Fix missing string in namespace std compiler error | Fix missing string in namespace std compiler error
On some systems
| C | mit | jm-janzen/termq,jm-janzen/termq,jm-janzen/termq |
98313137592c16298147327daefe9a4fe8d9ce8d | tests/regression/01-cpa/47-posneg-signed-overflow.c | tests/regression/01-cpa/47-posneg-signed-overflow.c | #include<stdio.h>
#include<assert.h>
int main() {
int i,k,j;
if (k == 5) {
assert(k == 5);
return 0;
}
assert(k != 5);
// Signed overflows might occur in some of the following operations (e.g. the first assignment k could be MAX_INT).
// Signed overflows are undefined behavior, so by default we go to top when they might occur.
// simple arithmetic
i = k + 1;
assert(i != 6); // UNKNOWN!
i = k - 1;
assert(i != 4); // UNKNOWN!
i = k * 3;
assert(i != 15); // UNKNOWN!
i = k * 2;
assert(i != 10); // UNKNOWN! k could be -2147483643;
i = k / 2;
assert(i != 2); // UNKNOWN! k could be 4
return 0;
}
| Add test that by default signed overflow results in top | Add test that by default signed overflow results in top
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
bbd0db9d8b3329cacffc55cdca9a5e63911ed510 | pyroot/inc/LinkDef.h | pyroot/inc/LinkDef.h | #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ function TPython::Exec;
#pragma link C++ function TPython::Eval;
#pragma link C++ function TPython::Bind;
#pragma link C++ function TPython::Prompt;
#endif
| #ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TPython;
#endif
| Declare the class TPython instead of the static functions. With this change, make map will add TPython in system.rootmap and it is possible to do directly root > TPython::Prompt() | Declare the class TPython instead of the static functions.
With this change, make map will add TPython in system.rootmap
and it is possible to do directly
root > TPython::Prompt()
git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@9107 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | Dr15Jones/root,vukasinmilosevic/root,gganis/root,simonpf/root,mkret2/root,pspe/root,alexschlueter/cern-root,veprbl/root,Y--/root,vukasinmilosevic/root,gbitzes/root,beniz/root,zzxuanyuan/root-compressor-dummy,davidlt/root,simonpf/root,sirinath/root,nilqed/root,root-mirror/root,sbinet/cxx-root,jrtomps/root,arch1tect0r/root,abhinavmoudgil95/root,esakellari/my_root_for_test,cxx-hep/root-cern,simonpf/root,beniz/root,smarinac/root,perovic/root,davidlt/root,zzxuanyuan/root-compressor-dummy,bbockelm/root,Y--/root,karies/root,mhuwiler/rootauto,buuck/root,strykejern/TTreeReader,sbinet/cxx-root,sirinath/root,BerserkerTroll/root,mkret2/root,Y--/root,Dr15Jones/root,mattkretz/root,lgiommi/root,gbitzes/root,0x0all/ROOT,lgiommi/root,abhinavmoudgil95/root,krafczyk/root,tc3t/qoot,beniz/root,pspe/root,omazapa/root,lgiommi/root,sawenzel/root,strykejern/TTreeReader,karies/root,evgeny-boger/root,pspe/root,mkret2/root,nilqed/root,thomaskeck/root,jrtomps/root,sbinet/cxx-root,ffurano/root5,georgtroska/root,dfunke/root,tc3t/qoot,BerserkerTroll/root,nilqed/root,georgtroska/root,davidlt/root,kirbyherm/root-r-tools,gganis/root,zzxuanyuan/root,tc3t/qoot,gbitzes/root,nilqed/root,perovic/root,root-mirror/root,mkret2/root,beniz/root,agarciamontoro/root,evgeny-boger/root,mkret2/root,krafczyk/root,Duraznos/root,abhinavmoudgil95/root,esakellari/my_root_for_test,satyarth934/root,krafczyk/root,cxx-hep/root-cern,georgtroska/root,0x0all/ROOT,sirinath/root,davidlt/root,root-mirror/root,dfunke/root,nilqed/root,alexschlueter/cern-root,Duraznos/root,dfunke/root,evgeny-boger/root,lgiommi/root,zzxuanyuan/root,cxx-hep/root-cern,lgiommi/root,evgeny-boger/root,cxx-hep/root-cern,jrtomps/root,abhinavmoudgil95/root,krafczyk/root,ffurano/root5,arch1tect0r/root,beniz/root,zzxuanyuan/root,nilqed/root,smarinac/root,arch1tect0r/root,nilqed/root,abhinavmoudgil95/root,jrtomps/root,Y--/root,georgtroska/root,ffurano/root5,mkret2/root,mattkretz/root,olifre/root,bbockelm/root,krafczyk/root,pspe/root,agarciamontoro/root,CristinaCristescu/root,gbitzes/root,sbinet/cxx-root,jrtomps/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,sawenzel/root,sbinet/cxx-root,mkret2/root,0x0all/ROOT,vukasinmilosevic/root,cxx-hep/root-cern,Duraznos/root,zzxuanyuan/root-compressor-dummy,simonpf/root,karies/root,perovic/root,agarciamontoro/root,evgeny-boger/root,Duraznos/root,simonpf/root,ffurano/root5,tc3t/qoot,jrtomps/root,mattkretz/root,sbinet/cxx-root,georgtroska/root,0x0all/ROOT,nilqed/root,sawenzel/root,vukasinmilosevic/root,buuck/root,mattkretz/root,abhinavmoudgil95/root,karies/root,zzxuanyuan/root-compressor-dummy,Duraznos/root,vukasinmilosevic/root,gbitzes/root,olifre/root,CristinaCristescu/root,BerserkerTroll/root,alexschlueter/cern-root,veprbl/root,mhuwiler/rootauto,olifre/root,kirbyherm/root-r-tools,omazapa/root-old,vukasinmilosevic/root,sawenzel/root,esakellari/my_root_for_test,gbitzes/root,gbitzes/root,abhinavmoudgil95/root,bbockelm/root,ffurano/root5,mkret2/root,mattkretz/root,nilqed/root,Duraznos/root,vukasinmilosevic/root,esakellari/root,lgiommi/root,davidlt/root,sirinath/root,evgeny-boger/root,jrtomps/root,0x0all/ROOT,zzxuanyuan/root,beniz/root,Y--/root,strykejern/TTreeReader,evgeny-boger/root,smarinac/root,arch1tect0r/root,thomaskeck/root,gganis/root,alexschlueter/cern-root,tc3t/qoot,satyarth934/root,Duraznos/root,vukasinmilosevic/root,olifre/root,satyarth934/root,mattkretz/root,gbitzes/root,sbinet/cxx-root,jrtomps/root,mhuwiler/rootauto,alexschlueter/cern-root,davidlt/root,cxx-hep/root-cern,perovic/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,veprbl/root,sawenzel/root,root-mirror/root,gganis/root,buuck/root,karies/root,omazapa/root-old,thomaskeck/root,esakellari/root,omazapa/root-old,root-mirror/root,root-mirror/root,sawenzel/root,perovic/root,satyarth934/root,esakellari/my_root_for_test,satyarth934/root,esakellari/root,simonpf/root,perovic/root,CristinaCristescu/root,sawenzel/root,BerserkerTroll/root,zzxuanyuan/root,simonpf/root,krafczyk/root,sawenzel/root,georgtroska/root,veprbl/root,CristinaCristescu/root,jrtomps/root,CristinaCristescu/root,arch1tect0r/root,dfunke/root,Y--/root,georgtroska/root,omazapa/root,CristinaCristescu/root,omazapa/root,karies/root,georgtroska/root,omazapa/root,zzxuanyuan/root,veprbl/root,sirinath/root,Dr15Jones/root,agarciamontoro/root,buuck/root,esakellari/root,lgiommi/root,tc3t/qoot,root-mirror/root,kirbyherm/root-r-tools,thomaskeck/root,beniz/root,mhuwiler/rootauto,omazapa/root-old,CristinaCristescu/root,ffurano/root5,agarciamontoro/root,krafczyk/root,smarinac/root,gganis/root,zzxuanyuan/root-compressor-dummy,gbitzes/root,ffurano/root5,arch1tect0r/root,evgeny-boger/root,simonpf/root,Duraznos/root,vukasinmilosevic/root,Dr15Jones/root,Duraznos/root,gganis/root,sirinath/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,esakellari/root,veprbl/root,evgeny-boger/root,zzxuanyuan/root-compressor-dummy,arch1tect0r/root,agarciamontoro/root,abhinavmoudgil95/root,root-mirror/root,bbockelm/root,perovic/root,pspe/root,veprbl/root,georgtroska/root,tc3t/qoot,bbockelm/root,sirinath/root,veprbl/root,sawenzel/root,thomaskeck/root,Duraznos/root,agarciamontoro/root,karies/root,BerserkerTroll/root,beniz/root,gganis/root,dfunke/root,omazapa/root,CristinaCristescu/root,omazapa/root-old,sirinath/root,vukasinmilosevic/root,mkret2/root,mkret2/root,jrtomps/root,krafczyk/root,zzxuanyuan/root-compressor-dummy,davidlt/root,dfunke/root,Y--/root,zzxuanyuan/root,krafczyk/root,olifre/root,mattkretz/root,arch1tect0r/root,omazapa/root,strykejern/TTreeReader,thomaskeck/root,BerserkerTroll/root,cxx-hep/root-cern,olifre/root,esakellari/my_root_for_test,vukasinmilosevic/root,esakellari/root,BerserkerTroll/root,tc3t/qoot,CristinaCristescu/root,nilqed/root,gganis/root,perovic/root,zzxuanyuan/root,thomaskeck/root,esakellari/root,omazapa/root,omazapa/root,abhinavmoudgil95/root,CristinaCristescu/root,kirbyherm/root-r-tools,omazapa/root-old,buuck/root,dfunke/root,esakellari/root,BerserkerTroll/root,bbockelm/root,root-mirror/root,satyarth934/root,omazapa/root,davidlt/root,esakellari/root,karies/root,0x0all/ROOT,Y--/root,buuck/root,bbockelm/root,omazapa/root-old,buuck/root,mattkretz/root,Dr15Jones/root,agarciamontoro/root,karies/root,nilqed/root,sirinath/root,pspe/root,mhuwiler/rootauto,0x0all/ROOT,bbockelm/root,perovic/root,georgtroska/root,strykejern/TTreeReader,lgiommi/root,alexschlueter/cern-root,buuck/root,0x0all/ROOT,beniz/root,agarciamontoro/root,olifre/root,davidlt/root,gganis/root,krafczyk/root,mhuwiler/rootauto,satyarth934/root,buuck/root,thomaskeck/root,davidlt/root,sawenzel/root,mattkretz/root,Y--/root,arch1tect0r/root,kirbyherm/root-r-tools,olifre/root,satyarth934/root,pspe/root,bbockelm/root,simonpf/root,krafczyk/root,lgiommi/root,zzxuanyuan/root,zzxuanyuan/root-compressor-dummy,smarinac/root,sbinet/cxx-root,zzxuanyuan/root,dfunke/root,mattkretz/root,bbockelm/root,esakellari/root,omazapa/root,veprbl/root,gganis/root,sbinet/cxx-root,smarinac/root,evgeny-boger/root,thomaskeck/root,sbinet/cxx-root,veprbl/root,tc3t/qoot,omazapa/root,dfunke/root,esakellari/my_root_for_test,omazapa/root-old,esakellari/my_root_for_test,root-mirror/root,esakellari/my_root_for_test,satyarth934/root,CristinaCristescu/root,abhinavmoudgil95/root,dfunke/root,alexschlueter/cern-root,Y--/root,omazapa/root-old,esakellari/my_root_for_test,omazapa/root-old,buuck/root,davidlt/root,arch1tect0r/root,gbitzes/root,sirinath/root,BerserkerTroll/root,smarinac/root,mkret2/root,gbitzes/root,beniz/root,evgeny-boger/root,veprbl/root,smarinac/root,root-mirror/root,agarciamontoro/root,beniz/root,kirbyherm/root-r-tools,mattkretz/root,cxx-hep/root-cern,buuck/root,0x0all/ROOT,sawenzel/root,mhuwiler/rootauto,zzxuanyuan/root,lgiommi/root,jrtomps/root,sirinath/root,simonpf/root,tc3t/qoot,dfunke/root,strykejern/TTreeReader,olifre/root,abhinavmoudgil95/root,BerserkerTroll/root,pspe/root,bbockelm/root,georgtroska/root,karies/root,omazapa/root-old,Dr15Jones/root,olifre/root,sbinet/cxx-root,lgiommi/root,mhuwiler/rootauto,pspe/root,smarinac/root,thomaskeck/root,strykejern/TTreeReader,mhuwiler/rootauto,esakellari/root,perovic/root,kirbyherm/root-r-tools,Duraznos/root,smarinac/root,Y--/root,arch1tect0r/root,mhuwiler/rootauto,Dr15Jones/root,pspe/root,mhuwiler/rootauto,satyarth934/root,gganis/root,simonpf/root,pspe/root,perovic/root,olifre/root,karies/root,BerserkerTroll/root,esakellari/my_root_for_test |
b28c037d64ac7cee7e2c7d9d33b128d62aa4df8a | src/gallium/drivers/r300/r300_public.h | src/gallium/drivers/r300/r300_public.h |
#ifndef R300_PUBLIC_H
#define R300_PUBLIC_H
struct radeon_winsys;
struct pipe_screen* r300_screen_create(struct radeon_winsys *rws);
#endif
|
#ifndef R300_PUBLIC_H
#define R300_PUBLIC_H
#ifdef __cplusplus
extern "C" {
#endif
struct radeon_winsys;
struct pipe_screen* r300_screen_create(struct radeon_winsys *rws);
#ifdef __cplusplus
} // extern "C"
#endif
#endif
| Fix build, invalid extern "C" around header inclusion. | r300g: Fix build, invalid extern "C" around header inclusion.
A previous patch to fix header inclusion within extern "C" neglected
to fix the occurences of this pattern in r300 files.
When the helper to detect this issue was pushed to master, it broke
the build for the r300 driver. This patch fixes the r300 build.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89477
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Jose Fonseca <[email protected]>
| C | mit | metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler |
1b36e324bd55b855e130b0ede0942cf6de561dc6 | src/pspinlock-decc.c | src/pspinlock-decc.c | /*
* Copyright (C) 2016 Alexander Saprykin <[email protected]>
*
* 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 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "pmem.h"
#include "pspinlock.h"
#ifdef P_OS_VMS
# include <builtins.h>
#else
# include <machine/builtins.h>
#endif
struct PSpinLock_ {
volatile pint spin;
};
P_LIB_API PSpinLock *
p_spinlock_new (void)
{
PSpinLock *ret;
if (P_UNLIKELY ((ret = p_malloc0 (sizeof (PSpinLock))) == NULL)) {
P_ERROR ("PSpinLock::p_spinlock_new: failed to allocate memory");
return NULL;
}
return ret;
}
P_LIB_API pboolean
p_spinlock_lock (PSpinLock *spinlock)
{
if (P_UNLIKELY (spinlock == NULL))
return FALSE;
(void) __LOCK_LONG ((volatile void *) &(spinlock->spin));
return TRUE;
}
P_LIB_API pboolean
p_spinlock_trylock (PSpinLock *spinlock)
{
if (P_UNLIKELY (spinlock == NULL))
return FALSE;
return __LOCK_LONG_RETRY ((volatile void *) &(spinlock->spin), 1) == 1 ? TRUE : FALSE;
}
P_LIB_API pboolean
p_spinlock_unlock (PSpinLock *spinlock)
{
if (P_UNLIKELY (spinlock == NULL))
return FALSE;
(void) __UNLOCK_LONG ((volatile void *) &(spinlock->spin));
return TRUE;
}
P_LIB_API void
p_spinlock_free (PSpinLock *spinlock)
{
p_free (spinlock);
}
| Add spinlock model for DEC C compiler | Add spinlock model for DEC C compiler
| C | unknown | saprykin/plibsys,saprykin/plib,saprykin/plibsys,saprykin/plibsys,saprykin/plib |
|
2a84d0b7af1e2ff2d250f0569529e78868cf498b | include/stdlib.h | include/stdlib.h | #ifndef __STDLIB_H__
#define __STDLIB_H__
#include <types.h>
#define abs(ival) (ival < 0? -ival : ival)
void *malloc(size_t size);
void free(void *addr);
struct task;
void __free(void *addr, struct task *task);
void *memcpy(void *dst, const void *src, size_t len);
void *memset(void *src, int c, size_t len);
#endif /* __STDLIB_H__ */
| #ifndef __STDLIB_H__
#define __STDLIB_H__
#include <types.h>
#define abs(ival) ((ival) < 0? -(ival) : (ival))
void *malloc(size_t size);
void free(void *addr);
struct task;
void __free(void *addr, struct task *task);
void *memcpy(void *dst, const void *src, size_t len);
void *memset(void *src, int c, size_t len);
#endif /* __STDLIB_H__ */
| Fix missing parenthesis in abs() | Fix missing parenthesis in abs()
| C | apache-2.0 | onkwon/yaos,onkwon/yaos,onkwon/yaos |
03b7bc948016753bc2e80d9b6e85edfb30da571d | src/log.h | src/log.h | #ifndef LOG_H
#define LOG_H
enum log_level {
LOG_LEVEL_DEBUG = 10,
LOG_LEVEL_MSG = 20,
LOG_LEVEL_WARN = 30,
LOG_LEVEL_ERR = 40
};
void set_log_level(enum log_level threshold);
void log_debug(const char *fmt, ...);
void log_msg(const char *fmt, ...);
void log_warn(const char *fmt, ...);
void log_err(const char *fmt, ...);
void vplog(const int level, const char *fmt, va_list args);
void plog(const int level, const char *fmt, ...);
#endif
| #ifndef LOG_H
#define LOG_H
#include <stdarg.h>
enum log_level {
LOG_LEVEL_DEBUG = 10,
LOG_LEVEL_MSG = 20,
LOG_LEVEL_WARN = 30,
LOG_LEVEL_ERR = 40
};
void set_log_level(enum log_level threshold);
void log_debug(const char *fmt, ...);
void log_msg(const char *fmt, ...);
void log_warn(const char *fmt, ...);
void log_err(const char *fmt, ...);
void vplog(const int level, const char *fmt, va_list args);
void plog(const int level, const char *fmt, ...);
#endif
| Fix an error on linux | Fix an error on linux
| C | apache-2.0 | bestwpw/the_silver_searcher,siadat/the_silver_searcher,godbyk/the_silver_searcher,vehar/the_silver_searcher,Arkanosis/the_silver_searcher,danielshahaf/the_silver_searcher,vehar/the_silver_searcher,nodakai/the_silver_searcher,bc-jaymendoza/the_silver_searcher,Arkanosis/the_silver_searcher,christer155/the_silver_searcher,lunixbochs/the_silver_searcher,lizh06/the_silver_searcher,rowanbeentje/the_silver_searcher,laserswald/the_silver_searcher,smaudet/the_silver_searcher,vehar/the_silver_searcher,snahor/the_silver_searcher,ggreer/the_silver_searcher,cchamberlain/the_silver_searcher,lecheel/the_silver_searcher,sebgod/the_silver_searcher,avih/the_silver_searcher,Arkanosis/the_silver_searcher,brianstorti/the_silver_searcher,danielshahaf/the_silver_searcher,leeonix/the_silver_searcher,SnoringFrog/the_silver_searcher,nodakai/the_silver_searcher,bhaak/the_silver_searcher,christer155/the_silver_searcher,lizh06/the_silver_searcher,godbyk/the_silver_searcher,godbyk/the_silver_searcher,jemiahlee/the_silver_searcher,starcraftman/the_silver_searcher,avih/the_silver_searcher,sebgod/the_silver_searcher,christer155/the_silver_searcher,schlosna/the_silver_searcher,lecheel/the_silver_searcher,jemiahlee/the_silver_searcher,snahor/the_silver_searcher,Arkanosis/the_silver_searcher,k-takata/the_silver_searcher,danielshahaf/the_silver_searcher,nishant8BITS/the_silver_searcher,smaudet/the_silver_searcher,siadat/the_silver_searcher,starcraftman/the_silver_searcher,ggreer/the_silver_searcher,kjk/the_silver_searcher,RedX2501/the_silver_searcher,ArneBab/the_silver_searcher,msys2/the_silver_searcher,rowanbeentje/the_silver_searcher,k-takata/the_silver_searcher,abhiii5459/the_silver_searcher,leeonix/the_silver_searcher,godbyk/the_silver_searcher,siadat/the_silver_searcher,lizh06/the_silver_searcher,ur4ltz/the_silver_searcher,mcanthony/the_silver_searcher,pbhandari/the_silver_searcher,decaff/the_silver_searcher,abhiii5459/the_silver_searcher,rowanbeentje/the_silver_searcher,accessv/the_silver_searcher,cchamberlain/the_silver_searcher,lunixbochs/the_silver_searcher,siadat/the_silver_searcher,accessv/the_silver_searcher,kjk/the_silver_searcher,vehar/the_silver_searcher,smaudet/the_silver_searcher,nodakai/the_silver_searcher,mcanthony/the_silver_searcher,decaff/the_silver_searcher,mcanthony/the_silver_searcher,avih/the_silver_searcher,bc-jaymendoza/the_silver_searcher,subev/the_silver_searcher,monochromegane/the_silver_searcher,JFLarvoire/the_silver_searcher,bhaak/the_silver_searcher,cchamberlain/the_silver_searcher,SnoringFrog/the_silver_searcher,sebgod/the_silver_searcher,leeonix/the_silver_searcher,laserswald/the_silver_searcher,ArneBab/the_silver_searcher,kjk/the_silver_searcher,decaff/the_silver_searcher,abhiii5459/the_silver_searcher,accessv/the_silver_searcher,abhiii5459/the_silver_searcher,nishant8BITS/the_silver_searcher,kjk/the_silver_searcher,nishant8BITS/the_silver_searcher,lunixbochs/the_silver_searcher,JFLarvoire/the_silver_searcher,ur4ltz/the_silver_searcher,JFLarvoire/the_silver_searcher,JFLarvoire/the_silver_searcher,cchamberlain/the_silver_searcher,decaff/the_silver_searcher,bc-jaymendoza/the_silver_searcher,christer155/the_silver_searcher,nodakai/the_silver_searcher,k-takata/the_silver_searcher,msys2/the_silver_searcher,christer155/the_silver_searcher,lecheel/the_silver_searcher,bestwpw/the_silver_searcher,jemiahlee/the_silver_searcher,accessv/the_silver_searcher,pbhandari/the_silver_searcher,cchamberlain/the_silver_searcher,k-takata/the_silver_searcher,brianstorti/the_silver_searcher,brianstorti/the_silver_searcher,subev/the_silver_searcher,danielshahaf/the_silver_searcher,avih/the_silver_searcher,jemiahlee/the_silver_searcher,lizh06/the_silver_searcher,starcraftman/the_silver_searcher,RedX2501/the_silver_searcher,schlosna/the_silver_searcher,decaff/the_silver_searcher,Arkanosis/the_silver_searcher,kjk/the_silver_searcher,ArneBab/the_silver_searcher,mcanthony/the_silver_searcher,laserswald/the_silver_searcher,JFLarvoire/the_silver_searcher,mcanthony/the_silver_searcher,subev/the_silver_searcher,JFLarvoire/the_silver_searcher,brianstorti/the_silver_searcher,k-takata/the_silver_searcher,msys2/the_silver_searcher,snahor/the_silver_searcher,vehar/the_silver_searcher,SnoringFrog/the_silver_searcher,danielshahaf/the_silver_searcher,ur4ltz/the_silver_searcher,bc-jaymendoza/the_silver_searcher,sebgod/the_silver_searcher,SnoringFrog/the_silver_searcher,jemiahlee/the_silver_searcher,snahor/the_silver_searcher,abhiii5459/the_silver_searcher,nodakai/the_silver_searcher,subev/the_silver_searcher,ur4ltz/the_silver_searcher,ur4ltz/the_silver_searcher,bhaak/the_silver_searcher,lunixbochs/the_silver_searcher,nishant8BITS/the_silver_searcher,monochromegane/the_silver_searcher,ggreer/the_silver_searcher,leeonix/the_silver_searcher,RedX2501/the_silver_searcher,subev/the_silver_searcher,vehar/the_silver_searcher,ArneBab/the_silver_searcher,RedX2501/the_silver_searcher,leeonix/the_silver_searcher,snahor/the_silver_searcher,bestwpw/the_silver_searcher,bhaak/the_silver_searcher,bhaak/the_silver_searcher,brianstorti/the_silver_searcher,lecheel/the_silver_searcher,bestwpw/the_silver_searcher,godbyk/the_silver_searcher,JFLarvoire/the_silver_searcher,msys2/the_silver_searcher,accessv/the_silver_searcher,pbhandari/the_silver_searcher,pbhandari/the_silver_searcher,nishant8BITS/the_silver_searcher,avih/the_silver_searcher,smaudet/the_silver_searcher,laserswald/the_silver_searcher,RedX2501/the_silver_searcher,bestwpw/the_silver_searcher,decaff/the_silver_searcher,ggreer/the_silver_searcher,laserswald/the_silver_searcher,siadat/the_silver_searcher,msys2/the_silver_searcher,bc-jaymendoza/the_silver_searcher,ArneBab/the_silver_searcher,starcraftman/the_silver_searcher,starcraftman/the_silver_searcher,lunixbochs/the_silver_searcher,leeonix/the_silver_searcher,SnoringFrog/the_silver_searcher,kjk/the_silver_searcher,pbhandari/the_silver_searcher,smaudet/the_silver_searcher |
121fcc178eea7b69b9c0a1aa5818cb714b37644b | tests/regression/04-mutex/81-if-cond-race-loc.c | tests/regression/04-mutex/81-if-cond-race-loc.c | #include <pthread.h>
#include <stdio.h>
int myglobal;
void *t_fun(void *arg) {
// awkward formatting to check that warning is just on condition expression, not entire if
if // NORACE
(myglobal > 0) { // RACE!
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
printf("Stupid!");
}
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
myglobal=myglobal+1; // RACE!
pthread_join (id, NULL);
return 0;
}
| Add test for if condition race location | Add test for if condition race location
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
ca0d5d42bc9c7b8acb6038d3969a5defb2946942 | third-party/lib/openlibm/impl.h | third-party/lib/openlibm/impl.h |
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline int finitel(long double x) {
return isfinite(x);
}
#if (defined(__STDC_VERSION__) || __STDC_VERSION__ >= 199901L)
__BEGIN_DECLS
extern long long int llabs(long long int j);
__END_DECLS
#endif
#endif /* _OPENLIB_FINITE_H */
|
#ifndef _OPENLIB_FINITE_H
#define _OPENLIB_FINITE_H
#include <sys/cdefs.h>
#define __BSD_VISIBLE 1
#include <../../build/extbld/third_party/lib/OpenLibm/install/openlibm_math.h>
static inline int finite(double x) {
return isfinite(x);
}
static inline int finitef(float x) {
return isfinite(x);
}
static inline int finitel(long double x) {
return isfinite(x);
}
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
__BEGIN_DECLS
extern long long int llabs(long long int j);
__END_DECLS
#endif
#endif /* _OPENLIB_FINITE_H */
| Fix openlibm compilation without defined macro __STDC__ | third-party: Fix openlibm compilation without defined macro __STDC__
| C | bsd-2-clause | embox/embox,embox/embox,embox/embox,embox/embox,embox/embox,embox/embox |
60e74265f056ba274aa4b81034bd687e89279a9a | lib/neatogen/poly.h | lib/neatogen/poly.h | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef POLY_H
#define POLY_H
#include "geometry.h"
typedef struct {
Point origin;
Point corner;
int nverts;
Point *verts;
int kind;
} Poly;
extern void polyFree(void);
extern int polyOverlap(Point, Poly *, Point, Poly *);
extern void makePoly(Poly *, Agnode_t *, double);
extern void breakPoly(Poly *);
#endif
#ifdef __cplusplus
}
#endif
| /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef POLY_H
#define POLY_H
#include "geometry.h"
typedef struct {
Point origin;
Point corner;
int nverts;
Point *verts;
int kind;
} Poly;
extern void polyFree(void);
extern int polyOverlap(Point, Poly *, Point, Poly *);
extern void makePoly(Poly *, Agnode_t *, float, float);
extern void makeAddPoly(Poly *, Agnode_t *, float, float);
extern void breakPoly(Poly *);
#endif
#ifdef __cplusplus
}
#endif
| Fix the sep and esep attributes to allow additive margins in addition to scaled margins. | Fix the sep and esep attributes to allow additive margins in addition
to scaled margins.
| C | epl-1.0 | MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,tkelman/graphviz,ellson/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,BMJHayward/graphviz,kbrock/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,tkelman/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,ellson/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,jho1965us/graphviz,kbrock/graphviz,pixelglow/graphviz |
038fd84030d172d7b94cfd8d84a5fcc274cb3d1f | lib/internal.h | lib/internal.h | /* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following definitions are made:
FASTCALL -- Used for most internal functions to specify that the
fastest possible calling convention be used.
inline -- Used for selected internal functions for which inlining
may improve performance on some platforms.
*/
#if defined(__GNUC__)
#define FASTCALL __attribute__((stdcall, regparm(3)))
#elif defined(WIN32)
#define FASTCALL __fastcall
#else
#define FASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
| /* internal.h
Internal definitions used by Expat. This is not needed to compile
client code.
The following definitions are made:
FASTCALL -- Used for most internal functions to specify that the
fastest possible calling convention be used.
inline -- Used for selected internal functions for which inlining
may improve performance on some platforms.
*/
#if defined(__GNUC__)
#define FASTCALL __attribute__((stdcall, regparm(3)))
#elif defined(WIN32)
/* XXX This seems to have an unexpected negative effect on Windows so
we'll disable it for now on that platform. It may be reconsidered
for a future release if it can be made more effective.
*/
/* #define FASTCALL __fastcall */
#endif
#ifndef FASTCALL
#define FASTCALL
#endif
#ifndef XML_MIN_SIZE
#if !defined(__cplusplus) && !defined(inline)
#ifdef __GNUC__
#define inline __inline
#endif /* __GNUC__ */
#endif
#endif /* XML_MIN_SIZE */
#ifdef __cplusplus
#define inline inline
#else
#ifndef inline
#define inline
#endif
#endif
| Disable FASTCALL on Windows since it turned out not to be as effective as hoped. Leaving the definition in the file so we'll know what it was that didn't work, and hopefully find something better in the future. | Disable FASTCALL on Windows since it turned out not to be as effective
as hoped. Leaving the definition in the file so we'll know what it
was that didn't work, and hopefully find something better in the
future.
| C | mit | PKRoma/expat,PKRoma/expat,PKRoma/expat,PKRoma/expat |
45cf7206ab713b373ae4e8341716329893985186 | tests/regression/05-lval_ls/18-website.c | tests/regression/05-lval_ls/18-website.c | // SKIP PARAM: --sets ana.activated[+] var_eq --sets ana.activated[+] region --sets ana.activated[+] var_eq --enable exp.region-offsets
#include <pthread.h>
int data[10];
pthread_mutex_t mutexes[10];
void safe_inc(int i) {
pthread_mutex_lock(&mutexes[i]);
data[i]++; // RACE
pthread_mutex_unlock(&mutexes[i]);
}
void *t_fun(void *arg) {
safe_inc(3);
safe_inc(4);
return NULL;
}
int main() {
for (int i = 0; i < 10; i++)
pthread_mutex_init(&mutexes[i], NULL);
// Create thread
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&mutexes[4]);
data[3]++; // RACE
data[4]++; // NORACE
pthread_mutex_unlock(&mutexes[4]);
return 0;
}
| Add example from website as skipped test | Add example from website as skipped test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
ed075c4b1a51a4191e6060f003eecbd1368ab841 | tests/c/winsockdup.c | tests/c/winsockdup.c | #include <winsock2.h>
#include <assert.h>
#define sassert assert
void dump() {
int err;
LPTSTR buf;
err = WSAGetLastError();
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, &buf, 0, NULL);
printf("%d %s\n", err, buf);
LocalFree(buf);
}
int main() {
SOCKET s1, s2, s1d, s2d;
int val, rv, size;
WSADATA wsadata;
WSAPROTOCOL_INFO pi;
rv = WSAStartup(MAKEWORD(2, 2), &wsadata);
assert(!rv);
s1 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
assert(s1 > 0);
val = 1;
rv = setsockopt(s1, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
dump();
sassert(!rv);
s2 = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
assert(s2 > 0);
val = 0;
rv = setsockopt(s2, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
sassert(!rv);
size = sizeof(val);
rv = getsockopt(s1, SOL_SOCKET, SO_KEEPALIVE, &val, &size);
assert(!rv);
printf("%d\n", val);
sassert(val == 1);
rv = getsockopt(s2, SOL_SOCKET, SO_KEEPALIVE, &val, &size);
assert(!rv);
sassert(val == 0);
rv = WSADuplicateSocket(s1, GetCurrentProcessId(), &pi);
assert(!rv);
s1d = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, &pi, 0, WSA_FLAG_OVERLAPPED);
assert(s1d > 0);
rv = getsockopt(s1d, SOL_SOCKET, SO_KEEPALIVE, &val, &size);
assert(!rv);
printf("%d\n", val);
sassert(val == 1);
rv = WSADuplicateSocket(s2, GetCurrentProcessId(), &pi);
assert(!rv);
s2d = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP, &pi, 0, WSA_FLAG_OVERLAPPED);
assert(s2d > 0);
rv = getsockopt(s2d, SOL_SOCKET, SO_KEEPALIVE, &val, &size);
assert(!rv);
printf("%d\n", val);
sassert(val == 0);
}
| Test program for duplicating sockets in windows | Test program for duplicating sockets in windows
| C | lgpl-2.1 | pycurl/pycurl,pycurl/pycurl,pycurl/pycurl |
|
9f4f6bdacbc60fd318fb56c587467cf18b1375fb | demos/FPL_Console/fpl_console.c | demos/FPL_Console/fpl_console.c | /*
-------------------------------------------------------------------------------
Name:
FPL-Demo | Console
Description:
A Hello-World Console Application testing Console Output/Input
Requirements:
No requirements
Author:
Torsten Spaete
Changelog:
## 2018-04-23:
- Initial creation of this description block
- Changed from C++ to C99
- Forced Visual-Studio-Project to compile in C always
- Added read char input
-------------------------------------------------------------------------------
*/
#define FPL_IMPLEMENTATION
#define FPL_NO_WINDOW
#define FPL_NO_VIDEO
#define FPL_NO_AUDIO
#include <final_platform_layer.h>
int main(int argc, char *args[]) {
if (fplPlatformInit(fplInitFlags_All, NULL)) {
fplConsoleOut("Hello World\n");
fplConsoleFormatOut("%s %s %d\n", "Hello", "World", 42);
fplConsoleError("Error: Hello World!\n");
fplConsoleFormatError("Error: %s %s %d!\n", "Hello", "World", 42);
fplConsoleOut("Press enter a key: ");
int key = fplConsoleWaitForCharInput();
fplConsoleFormatOut("You pressed '%c'\n", key);
fplPlatformRelease();
}
return 0;
}
| /*
-------------------------------------------------------------------------------
Name:
FPL-Demo | Console
Description:
A Hello-World Console Application testing Console Output/Input
Requirements:
No requirements
Author:
Torsten Spaete
Changelog:
## 2018-04-23:
- Initial creation of this description block
- Changed from C++ to C99
- Forced Visual-Studio-Project to compile in C always
- Added read char input
-------------------------------------------------------------------------------
*/
#define FPL_IMPLEMENTATION
#define FPL_NO_WINDOW
#define FPL_NO_VIDEO
#define FPL_NO_AUDIO
#include <final_platform_layer.h>
int main(int argc, char *args[]) {
if (fplPlatformInit(fplInitFlags_All, fpl_null)) {
fplConsoleOut("Hello World\n");
fplConsoleFormatOut("%s %s %d\n", "Hello", "World", 42);
fplConsoleError("Error: Hello World!\n");
fplConsoleFormatError("Error: %s %s %d!\n", "Hello", "World", 42);
fplConsoleOut("Press enter a key: ");
int key = fplConsoleWaitForCharInput();
fplConsoleFormatOut("You pressed '%c'\n", key);
fplPlatformRelease();
}
return 0;
}
| Use fpl_null instead of NULL in console demo | Use fpl_null instead of NULL in console demo
| C | mit | f1nalspace/final_game_tech,f1nalspace/final_game_tech,f1nalspace/final_game_tech |
d9ae84898ef7e2e97aa4eecd8a9df8e383d15c67 | test/CFrontend/2005-12-04-AttributeUsed.c | test/CFrontend/2005-12-04-AttributeUsed.c | // RUN: %llvmgcc %s -S -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X
int X __attribute__((used));
int Y;
void foo() __attribute__((used));
void foo() {}
| // RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | grep llvm.used | grep foo | grep X
int X __attribute__((used));
int Y;
void foo() __attribute__((used));
void foo() {}
| Use the -emit-llvm switch to generate LLVM assembly that can be parsed by the test case. | Use the -emit-llvm switch to generate LLVM assembly that can be parsed
by the test case.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@30654 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap |
e3490baa8f45f1894326a5925159ebf123b20c51 | source/builtin/optimization/fibonacci.h | source/builtin/optimization/fibonacci.h | #ifndef FIBONACCI_H
#define FIBONACCI_H
#include "../function.h"
namespace BuiltIn {
namespace Optimization {
// Class for finding minimum of function with Fibonacci method
class Fibonacci : public Function
{
public:
Fibonacci();
Rpn::Operand calculate(FunctionCalculator *calculator, QList<Rpn::Operand> actualArguments);
QList<Rpn::Argument> requiredArguments();
Rpn::OperandType returnValueType();
private:
struct Interval {
Number leftBorder;
Number rightBorder;
};
Interval m_sourceInterval;
FunctionCalculator* m_calculator;
QString m_functionName;
Number m_resultIntervalLength;
Number m_differenceConstant;
Number m_iterationsNumber;
Number findMinimum();
void initializeIterationsNumber();
Number fibonacciNumber(int position);
Number calculateFunction(Number argument);
};
} // namespace
} // namespace
#endif // FIBONACCI_H
| #ifndef FIBONACCI_H
#define FIBONACCI_H
#include "../function.h"
namespace BuiltIn {
namespace Optimization {
// Class for finding minimum of function with Fibonacci method
class Fibonacci : public Function
{
public:
Fibonacci();
Rpn::Operand calculate(FunctionCalculator *calculator, QList<Rpn::Operand> actualArguments);
QList<Rpn::Argument> requiredArguments();
Rpn::OperandType returnValueType();
private:
struct Interval {
Number leftBorder;
Number rightBorder;
};
Interval m_sourceInterval;
FunctionCalculator* m_calculator;
QString m_functionName;
Number m_resultIntervalLength;
Number m_differenceConstant;
int m_iterationsNumber;
Number findMinimum();
void initializeIterationsNumber();
Number fibonacciNumber(int position);
Number calculateFunction(Number argument);
};
} // namespace
} // namespace
#endif // FIBONACCI_H
| Fix for impicit conversions from double to int and vise versa. | Fix for impicit conversions from double to int and vise versa.
| C | bsd-3-clause | ming13/aequatio,ming13/aequatio |
d1a6dd6ad96b5eb291976d3d0c949496af470762 | include/core/SkMilestone.h | include/core/SkMilestone.h | /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 60
#endif
| /*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 61
#endif
| Update Skia milestone to 61 | Update Skia milestone to 61
BUG=skia:
Change-Id: I9602ddb0f5a08481365e7c74f1fc93836f7e5080
Reviewed-on: https://skia-review.googlesource.com/17920
Reviewed-by: Heather Miller <[email protected]>
Commit-Queue: Heather Miller <[email protected]>
| C | bsd-3-clause | Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,google/skia,google/skia,rubenvb/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,rubenvb/skia,google/skia |
3dfdf82baff2eea1b02fcba51ea71fbedb0987a4 | src/clientversion.h | src/clientversion.h | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 8
#define CLIENT_VERSION_REVISION 7
#define CLIENT_VERSION_BUILD 5
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE false
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source
#define COPYRIGHT_YEAR 2014
// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
#define STRINGIZE(X) DO_STRINGIZE(X)
#define DO_STRINGIZE(X) #X
#endif // CLIENTVERSION_H
| Update client version number and set false for prerelease | Update client version number and set false for prerelease
| C | mit | Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin,Megalinuxcoin/megalinuxcoin |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.