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
|
---|---|---|---|---|---|---|---|---|---|
a911ff6cc87fa430dac4cbe0017633796907b839 | src/test/resources/testmodule.c | src/test/resources/testmodule.c | #include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx,"testmodule.simple",
HelloworldRand_RedisCommand,
"write deny-oom",1,2,1) == REDISMODULE_ERR)
return REDISMODULE_ERR;
} | #include "redismodule.h"
#include <stdlib.h>
int HelloworldRand_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
RedisModule_ReplyWithLongLong(ctx,rand());
return REDISMODULE_OK;
}
int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) {
if (RedisModule_Init(ctx,"testmodule",1,REDISMODULE_APIVER_1)
== REDISMODULE_ERR) return REDISMODULE_ERR;
if (RedisModule_CreateCommand(ctx,"testmodule.simple",
HelloworldRand_RedisCommand,
"readonly",0,0,0) == REDISMODULE_ERR)
return REDISMODULE_ERR;
} | Fix OnLoad signature and configure command parameters properly | Fix OnLoad signature and configure command parameters properly
| C | mit | RedisLabs/jedis,HeartSaVioR/jedis,yapei123/jedis,sazzad16/jedis,mosoft521/jedis,mosoft521/jedis,HeartSaVioR/jedis,smagellan/jedis,sazzad16/jedis,zts1993/jedis,yapei123/jedis,smagellan/jedis,xetorthio/jedis,xetorthio/jedis,zts1993/jedis,RedisLabs/jedis |
3a189a9e85e9f494f40e44012f864e663274181b | tests/regression/02-base/92-ad-union-fields.c | tests/regression/02-base/92-ad-union-fields.c | // SKIP
// TODO: be sound and claim that assert may hold instead of must not hold
// assert passes when compiled
#include <assert.h>
union u {
int fst;
float snd;
};
int main() {
union u a;
void *p = &a.fst;
void *q = &a.snd;
assert(p == q);
return 0;
}
| Add skipped base union field pointer unsoundness test | Add skipped base union field pointer unsoundness test
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
71db9767599b54ee8f8622bee2420daf78603dcf | arch/x86_64/rsp/vmov.c | arch/x86_64/rsp/vmov.c | //
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, unsigned de) {
uint16_t data;
// Get the element from VT.
data = rsp->cp2.div_in = rsp->cp2.regs[src].e[e];
// Write out the upper part of the result.
rsp->cp2.regs[dest].e[de] = data;
return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e);
}
| //
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, unsigned de) {
uint16_t data;
// Get the element from VT.
data = rsp->cp2.regs[src].e[e];
// Write out the upper part of the result.
rsp->cp2.regs[dest].e[de] = data;
return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e);
}
| Fix a typo in the VMOV implementation. | Fix a typo in the VMOV implementation.
| C | bsd-3-clause | tj90241/cen64,LuigiBlood/cen64,tj90241/cen64,LuigiBlood/cen64 |
a2301921e37925bcc77fd2326249d13ff6a2792d | src/trm/ft_trmsignalhook.c | src/trm/ft_trmsignalhook.c | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_trmsignalhook.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/14 17:12:55 by ncoden #+# #+# */
/* Updated: 2015/05/18 16:04:52 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_trmsignalhook(t_trm *trm, char sig, void (*func)(void *),
void *data)
{
t_ilst_evnt *event;
if ((event = (t_ilst_evnt *)ft_ilstpushfront__(sizeof(t_ilst_evnt),
(t_ilst **)&trm->on_signal, sig)))
{
event->event.func = func;
event->event.data = data;
}
}
| /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_trmsignalhook.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/14 17:12:55 by ncoden #+# #+# */
/* Updated: 2015/05/23 23:50:08 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_trmsignalhook(t_trm *trm, char sig, void (*func)(void *),
void *data)
{
t_ilst_evnt *event;
if ((event = (t_ilst_evnt *)ft_ilstpush__(sizeof(t_ilst_evnt),
(t_ilst **)&trm->on_signal, sig)))
{
event->event.func = func;
event->event.data = data;
}
}
| Change the ilst content (2) | Change the ilst content (2)
| C | apache-2.0 | ncoden/libft |
c10dc660e2f20fa099f7186bf4867f685a398758 | qt/database.h | qt/database.h | /*
* Copyright (C) 2014 Matthias Klumpp <[email protected]>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATABASE_H
#define DATABASE_H
#include <QtCore>
#include "appstream-qt_global.h"
#include "component.h"
namespace Appstream {
class DatabasePrivate;
class ASQTSHARED_EXPORT Database : public QObject
{
Q_OBJECT
public:
Database(QObject *parent = 0);
~Database();
bool open();
Component* getComponentById(QString id);
QList<Component*> getAllComponents();
QList<Component*> getComponentsByKind(Component::Kind kind);
QList<Component*> findComponentsByString(QString searchTerms, QString categories = "");
private:
DatabasePrivate *priv;
};
} // End of namespace: Appstream
#endif // DATABASE_H
| /*
* Copyright (C) 2014 Matthias Klumpp <[email protected]>
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATABASE_H
#define DATABASE_H
#include <QtCore>
#include "appstream-qt_global.h"
#include "component.h"
namespace Appstream {
class DatabasePrivate;
class ASQTSHARED_EXPORT Database : public QObject
{
Q_OBJECT
public:
Database(QObject *parent = 0);
~Database();
bool open();
Component* getComponentById(QString id);
QList<Component*> getAllComponents();
QList<Component*> getComponentsByKind(Component::Kind kind);
QList<Component*> findComponentsByString(QString searchTerms, QString categories = QString());
private:
DatabasePrivate *priv;
};
} // End of namespace: Appstream
#endif // DATABASE_H
| Use QString() as default paramater for an empty string | trivial: Use QString() as default paramater for an empty string
| C | lgpl-2.1 | ximion/appstream,ximion/appstream,ximion/appstream,ximion/appstream |
31f9fa46901ed41ea21f43b1a05481112370e8f1 | PaymentKit/PKCardNumber.h | PaymentKit/PKCardNumber.h | //
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) NSString * last4;
@property (nonatomic, readonly) NSString * lastGroup;
@property (nonatomic, readonly) NSString * string;
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
+ (id) cardNumberWithString:(NSString *)string;
- (id) initWithString:(NSString *)string;
- (BOOL)isValid;
- (BOOL)isValidLength;
- (BOOL)isValidLuhn;
- (BOOL)isPartiallyValid;
@end
| //
// CardNumber.h
// PKPayment Example
//
// Created by Alex MacCaw on 1/22/13.
// Copyright (c) 2013 Stripe. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "PKCardType.h"
@interface PKCardNumber : NSObject
@property (nonatomic, readonly) PKCardType cardType;
@property (nonatomic, readonly) NSString * last4;
@property (nonatomic, readonly) NSString * lastGroup;
@property (nonatomic, readonly) NSString * string;
@property (nonatomic, readonly) NSString * formattedString;
@property (nonatomic, readonly) NSString * formattedStringWithTrail;
@property (nonatomic, readonly, getter = isValid) BOOL valid;
@property (nonatomic, readonly, getter = isValidLength) BOOL validLength;
@property (nonatomic, readonly, getter = isValidLuhn) BOOL validLuhn;
@property (nonatomic, readonly, getter = isPartiallyValid) BOOL partiallyValid;
+ (id) cardNumberWithString:(NSString *)string;
- (id) initWithString:(NSString *)string;
@end
| Make validity booleans properties as well | Make validity booleans properties as well
| C | mit | onevcat/PaymentKit,loudnate/PaymentKit,tictail/TICPaymentKit,spinlister/PaymentKit,RidePal/PaymentKit,loudnate/PaymentKit,mobitar/PaymentKit,oanaBan/PaymentKit,jonathanrauch/PaymentKit,vikas100/Vikas,tictail/TICPaymentKit,jonathanrauch/PaymentKit,zsw12abc/PaymentKit,bobbyski/PaymentKit,stripe/PaymentKit,prolificinteractive/PaymentKit,ichu501/PaymentKit,andris-zalitis/PaymentKit,baoquanjing/newss,spinlister/PaymentKit,vikas100/Vikas,bobbyski/PaymentKit,Dwellers/PaymentKit,insanoid/PaymentKit,Dwellers/PaymentKit,mobitar/PaymentKit,baoquanjing/newss,RidePal/PaymentKit,triposo/PaymentKit,oanaBan/PaymentKit,zsw12abc/PaymentKit,ernestopino/PaymentKit,ernestopino/PaymentKit,andris-zalitis/PaymentKit,heetch/PaymentKit,heetch/PaymentKit |
3c2fc5241d63758ffd4e4c072df9742c8dda3595 | chrome/gpu/gpu_config.h | chrome/gpu/gpu_config.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_GPU_GPU_CONFIG_H_
#define CHROME_GPU_GPU_CONFIG_H_
// This file declares common preprocessor configuration for the GPU process.
#include "build/build_config.h"
#if defined(OS_LINUX) && !defined(ARCH_CPU_X86)
// Only define GLX support for Intel CPUs for now until we can get the
// proper dependencies and build setup for ARM.
#define GPU_USE_GLX
#endif
#endif // CHROME_GPU_GPU_CONFIG_H_
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_GPU_GPU_CONFIG_H_
#define CHROME_GPU_GPU_CONFIG_H_
// This file declares common preprocessor configuration for the GPU process.
#include "build/build_config.h"
#if defined(OS_LINUX) && defined(ARCH_CPU_X86)
// Only define GLX support for Intel CPUs for now until we can get the
// proper dependencies and build setup for ARM.
#define GPU_USE_GLX
#endif
#endif // CHROME_GPU_GPU_CONFIG_H_
| Fix stupid error for Linux build. | Fix stupid error for Linux build.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/555096
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@37093 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
4f81bce800c91bf0676cdff4267ce474d88ebf5a | OpenAL32/Include/alThunk.h | OpenAL32/Include/alThunk.h | #ifndef _AL_THUNK_H_
#define _AL_THUNK_H_
#include "config.h"
#include "AL/al.h"
#include "AL/alc.h"
#ifdef __cplusplus
extern "C" {
#endif
void alThunkInit(void);
void alThunkExit(void);
ALuint alThunkAddEntry(ALvoid * ptr);
void alThunkRemoveEntry(ALuint index);
ALvoid *alThunkLookupEntry(ALuint index);
#if (SIZEOF_VOIDP > SIZEOF_UINT)
#define ALTHUNK_INIT() alThunkInit()
#define ALTHUNK_EXIT() alThunkExit()
#define ALTHUNK_ADDENTRY(p) alThunkAddEntry(p)
#define ALTHUNK_REMOVEENTRY(i) alThunkRemoveEntry(i)
#define ALTHUNK_LOOKUPENTRY(i) alThunkLookupEntry(i)
#else
#define ALTHUNK_INIT()
#define ALTHUNK_EXIT()
#define ALTHUNK_ADDENTRY(p) ((ALuint)p)
#define ALTHUNK_REMOVEENTRY(i)
#define ALTHUNK_LOOKUPENTRY(i) ((ALvoid*)(i))
#endif // (SIZEOF_VOIDP > SIZEOF_INT)
#ifdef __cplusplus
}
#endif
#endif //_AL_THUNK_H_
| #ifndef _AL_THUNK_H_
#define _AL_THUNK_H_
#include "config.h"
#include "AL/al.h"
#include "AL/alc.h"
#ifdef __cplusplus
extern "C" {
#endif
void alThunkInit(void);
void alThunkExit(void);
ALuint alThunkAddEntry(ALvoid *ptr);
void alThunkRemoveEntry(ALuint index);
ALvoid *alThunkLookupEntry(ALuint index);
#if (SIZEOF_VOIDP > SIZEOF_UINT)
#define ALTHUNK_INIT() alThunkInit()
#define ALTHUNK_EXIT() alThunkExit()
#define ALTHUNK_ADDENTRY(p) alThunkAddEntry(p)
#define ALTHUNK_REMOVEENTRY(i) alThunkRemoveEntry(i)
#define ALTHUNK_LOOKUPENTRY(i) alThunkLookupEntry(i)
#else
#define ALTHUNK_INIT()
#define ALTHUNK_EXIT()
#define ALTHUNK_ADDENTRY(p) ((ALuint)p)
#define ALTHUNK_REMOVEENTRY(i) ((ALvoid)i)
#define ALTHUNK_LOOKUPENTRY(i) ((ALvoid*)(i))
#endif // (SIZEOF_VOIDP > SIZEOF_INT)
#ifdef __cplusplus
}
#endif
#endif //_AL_THUNK_H_
| Improve a macro to reference its parameter | Improve a macro to reference its parameter
| C | lgpl-2.1 | alexxvk/openal-soft,Wemersive/openal-soft,soundsrc/openal-soft,aaronmjacobs/openal-soft,EddieRingle/openal-soft,aaronmjacobs/openal-soft,mmozeiko/OpenAL-Soft,mmozeiko/OpenAL-Soft,AerialX/openal-soft-android,irungentoo/openal-soft-tox,arkana-fts/openal-soft,soundsrc/openal-soft,EddieRingle/openal-soft,BeamNG/openal-soft,rryan/openal-soft,jims/openal-soft,alexxvk/openal-soft,rryan/openal-soft,cambridgehackers/klaatu-openal-soft,arkana-fts/openal-soft,irungentoo/openal-soft-tox,franklixuefei/openal-soft,cambridgehackers/klaatu-openal-soft,dapetcu21/openal-soft,jims/openal-soft,cambridgehackers/klaatu-openal-soft,BeamNG/openal-soft,Wemersive/openal-soft,franklixuefei/openal-soft |
e8323b47a5feb3aad3dc68e1cce892808391ca57 | roofit/histfactory/inc/RooStats/HistFactory/HistFactoryException.h | roofit/histfactory/inc/RooStats/HistFactory/HistFactoryException.h | // @(#)root/roostats:$Id$
// Author: George Lewis, Kyle Cranmer
/*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef HISTFACTORY_EXCEPTION
#define HISTFACTORY_EXCEPTION
#include <iostream>
#include <exception>
namespace RooStats{
namespace HistFactory{
class hf_exc: public std::exception
{
virtual const char* what() const noexcept
{
return "HistFactory - Exception";
}
};
}
}
//static hf_exc bad_hf;
#endif
| // @(#)root/roostats:$Id$
// Author: George Lewis, Kyle Cranmer
/*************************************************************************
* Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef HISTFACTORY_EXCEPTION
#define HISTFACTORY_EXCEPTION
#include <exception>
#include <string>
namespace RooStats{
namespace HistFactory{
class hf_exc: public std::exception
{
public:
hf_exc(std::string message = "") : _message("HistFactory - Exception " + message) { }
virtual const char* what() const noexcept
{
return _message.c_str();
}
private:
const std::string _message;
};
}
}
#endif
| Allow for messages in HistFactory exceptions. | [HF] Allow for messages in HistFactory exceptions.
| C | lgpl-2.1 | olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root,olifre/root |
e5666f371e863ac73d8fa7c15bef9c9ba0359b82 | draft/zmq42draft.h | draft/zmq42draft.h | #if ZMQ_VERSION_MINOR == 2
#ifdef ZMQ_BUILD_DRAFT_API
#define ZMQ42HASDRAFT
#endif
#endif
#ifndef ZMQ42HASDRAFT
#define ZMQ_SERVER -12
#define ZMQ_CLIENT -13
#define ZMQ_RADIO -14
#define ZMQ_DISH -15
#define ZMQ_GATHER -16
#define ZMQ_SCATTER -17
#define ZMQ_DGRAM -18
#endif
| #if ZMQ_VERSION_MINOR >= 2
#ifdef ZMQ_BUILD_DRAFT_API
#define ZMQ42HASDRAFT
#endif
#endif
#ifndef ZMQ42HASDRAFT
#define ZMQ_SERVER -12
#define ZMQ_CLIENT -13
#define ZMQ_RADIO -14
#define ZMQ_DISH -15
#define ZMQ_GATHER -16
#define ZMQ_SCATTER -17
#define ZMQ_DGRAM -18
#endif
| Make draft compile with ZeroMQ 4.3.0 | Make draft compile with ZeroMQ 4.3.0
| C | bsd-2-clause | pebbe/zmq4,pebbe/zmq4 |
a804609334035658ed74f5e0664dd4c380e68955 | bin/src/hr.c | bin/src/hr.c | /**************************************************\
* A port of LuRsT's hr to C *
* Sam Stuewe (C) 2014 Licensed under the terms of *
* the GNU Public License version 2 *
\**************************************************/
// Libraries //
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
// Main Function //
int main (int argc, char * * argv) {
struct winsize w;
ioctl(0, TIOCGWINSZ, &w);
int COLS;
if ( w.ws_col <= 0 ) {
COLS = 80;
} else {
COLS = w.ws_col;
}
if ( argc <= 1 ) {
for ( int i = 0; i < COLS; i ++ ) {
printf("#");
} printf("\n");
} else {
for ( int i = 1; i < argc; i ++ ) {
for ( int j = 0; j < (COLS/strlen(argv[i])); j ++ ) {
printf(argv[i]);
} printf("\n");
}
} return 0;
}
// vim: set tabstop=4 shiftwidth=4 expandtab:
| /**************************************************\
* A port of LuRsT's hr to C *
* Sam Stuewe (C) 2014 Licensed under the terms of *
* the GNU Public License version 2 *
\**************************************************/
// Libraries //
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
// Main Function //
int
main (int argc, char * argv []) {
struct winsize w;
ioctl(0, TIOCGWINSZ, &w);
int COLS = ( w.ws_col <= 0 ? 80 : w.ws_col);
if ( argc <= 1 ) {
for ( int i = 0; i < COLS; i ++ ) {
printf("#");
} printf("\n");
} else {
for ( int i = 1; i < argc; i ++ ) {
for ( int j = 0; j < (COLS/strlen(argv[i])); j ++ ) {
printf(argv[i]);
} printf("\n");
}
} return 0;
}
// vim: set tabstop=4 shiftwidth=4 expandtab:
| Update for style and simplicity | Update for style and simplicity
| C | unlicense | HalosGhost/.dotfiles,HalosGhost/.dotfiles |
1f561bba70d0746f0b474f39fad689ae7d678517 | arch/sgi/include/vmparam.h | arch/sgi/include/vmparam.h | /* $OpenBSD: vmparam.h,v 1.3 2009/05/08 18:42:04 miod Exp $ */
#ifndef _SGI_VMPARAM_H_
#define _SGI_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
#define VM_NFREELIST 2
#define VM_FREELIST_DMA32 1 /* memory under 2GB suitable for DMA */
#include <mips64/vmparam.h>
#endif /* _SGI_VMPARAM_H_ */
| /* $OpenBSD: vmparam.h,v 1.4 2009/10/14 20:18:26 miod Exp $ */
/* public domain */
#ifndef _SGI_VMPARAM_H_
#define _SGI_VMPARAM_H_
#define VM_PHYSSEG_MAX 32 /* Max number of physical memory segments */
/*
* On Origin and Octane families, DMA to 32-bit PCI devices is restricted.
*
* Systems with physical memory after the 2GB boundary needs to ensure
* memory which may used for DMA transfers is allocated from the low
* memory range.
*
* Other systems, like the O2, do not have such a restriction, but can not
* have more than 2GB of physical memory, so this doesn't affect them.
*/
#define VM_NFREELIST 2
#define VM_FREELIST_DMA32 1 /* memory suitable for 32-bit DMA */
#include <mips64/vmparam.h>
#endif /* _SGI_VMPARAM_H_ */
| Add some comments to explain why the DMA32 physseg is really 2**31 bytes long. Prompted by deraadt@ long ago. | Add some comments to explain why the DMA32 physseg is really 2**31 bytes
long. Prompted by deraadt@ long ago.
| C | isc | orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars |
64cdc50fbcc47cbcb957111ff6637e65c5b5f525 | config.def.h | config.def.h | /* See LICENSE file for copyright and license details. */
/* Notification, remove DNOTIFY in config.mk if you don't want it */
static char *notifycmd = ""; /* Uses given command if not compiled by DNOTIFY */
static char *notifyext = ""; /* Notify with extra command (eg. play an alarm) */
/*
* This is the array which defines all the timer that will be used.
* It will be repeated after all of it is executed.
*/
static Timers timers[] = {
/* timer(s) comment */
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 1200, "Time to take a nap!" },
};
| /* See LICENSE file for copyright and license details. */
/* Notification, remove DNOTIFY in config.mk if you don't want it */
static char *notifycmd = ""; /* Uses given command if not compiled by DNOTIFY */
static char *notifyext = ""; /* Notify with extra command (eg. play an alarm) */
/*
* This is the array which defines all the timer that will be used.
* It will be repeated after all of it is executed.
*/
static Timers timers[] = {
/* timer(s) comment */
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 300, "Time to start resting!"},
{ 1500, "Time to start working!"},
{ 900, "Time to take a nap!" },
};
| Reduce nap time to 15 minutes as mentioned in docs | Reduce nap time to 15 minutes as mentioned in docs | C | isc | pickfire/spt,pickfire/spt |
a71d3c65375114146bb515b31820c5bf5d670128 | test/CodeGen/builtins-arm.c | test/CodeGen/builtins-arm.c | // RUN: %clang_cc1 -triple thumbv7-eabi -target-cpu cortex-a8 -O3 -emit-llvm -o %t %s
void *f0()
{
return __builtin_thread_pointer();
}
| // RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -O3 -emit-llvm -o - %s | FileCheck %s
void *f0()
{
return __builtin_thread_pointer();
}
void f1(char *a, char *b) {
__clear_cache(a,b);
}
// CHECK: call void @__clear_cache
| Add a test to the previous commit. | Add a test to the previous commit.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@105596 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang |
28bfcfabf1185f197c49f21abc4b71629cfebcec | test/test_parser_terminal.c | test/test_parser_terminal.c | #include "test_parser_p.h"
void terminal_success(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("HelloWorld"),
rule_init("HelloWorld",
terminal("hello world")
), 1
);
parse_t *result = parse("hello world", grammar);
assert_int_equal(result->length, 11);
assert_int_equal(result->start, 0);
assert_int_equal(result->n_children, 1);
assert_int_equal(result->children[0].n_children, 0);
}
void terminal_failure(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("HelloWorld"),
rule_init("HelloWorld",
terminal("hello world")
), 1
);
parse_t *result = parse("nope", grammar);
assert_null(result);
}
| #include "test_parser_p.h"
void terminal_success(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("HelloWorld"),
rule_init("HelloWorld",
terminal("hello world")
), 1
);
parse_result_t *result = parse("hello world", grammar);
assert_non_null(result);
assert_true(is_success(result));
parse_t *suc = result->data.result;
assert_int_equal(suc->length, 11);
assert_int_equal(suc->start, 0);
assert_int_equal(suc->n_children, 1);
assert_int_equal(suc->children[0].n_children, 0);
}
void terminal_failure(void **state) {
grammar_t *grammar = grammar_init(
non_terminal("HelloWorld"),
rule_init("HelloWorld",
terminal("hello world")
), 1
);
parse_result_t *result = parse("nope", grammar);
assert_non_null(result);
assert_true(is_error(result));
}
| Use new api for terminal tests | Use new api for terminal tests
| C | mit | Baltoli/peggo,Baltoli/peggo |
771cb01c0311688f00593cc2a309e32afdbd4b40 | benchmark/timer.h | benchmark/timer.h | #include <time.h>
clock_t calc_time0,calc_time1;
double calc_time;
#define TIME_ON calc_time0=clock();
#define TIME_OFF(msg) calc_time1=clock(); \
calc_time=(double)(calc_time1-calc_time0)/CLOCKS_PER_SEC; \
std::cout<<msg<<": iterations="<<i \
<<" CPU Time="<<std::fixed<<calc_time \
<<" iter/s="<<i/calc_time<<std::endl<<std::flush;
| #include <time.h>
#include <sstream>
#include <iostream>
clock_t calc_time0,calc_time1;
double calc_time;
void printTime(const std::string& msg, long long iterations, double iterPerSec) {
std::stringstream ss;
ss << msg;
while (ss.tellp() < 30) {
ss << ' ';
}
ss << " iterations=" << iterations;
while (ss.tellp() < 60) {
ss << ' ';
}
ss <<" CPU Time="<<std::fixed<<calc_time;
while (ss.tellp() < 80) {
ss << ' ';
}
ss <<" iter/s="<<iterPerSec<<std::endl;
std::cout << ss.str() << std::flush;
}
#define TIME_ON calc_time0=clock();
#define TIME_OFF(msg) calc_time1=clock(); \
calc_time=(double)(calc_time1-calc_time0)/CLOCKS_PER_SEC; \
printTime(msg, i, i/calc_time);
| Print times in fixed columns. | Print times in fixed columns.
Makes it easier to compare.
| C | lgpl-2.1 | worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp,worldforge/atlas-cpp |
6c39b5e3015535d249699cf4c7dd9e3bfa9ed550 | check/tests/check_check_main.c | check/tests/check_check_main.c | #include <stdlib.h>
#include <stdio.h>
#include <check.h>
#include "check_check.h"
int main (void)
{
int n;
SRunner *sr;
fork_setup();
setup_fixture();
sr = srunner_create (make_master_suite());
srunner_add_suite(sr, make_list_suite());
srunner_add_suite(sr, make_msg_suite());
srunner_add_suite(sr, make_log_suite());
srunner_add_suite(sr, make_limit_suite());
srunner_add_suite(sr, make_fork_suite());
srunner_add_suite(sr, make_fixture_suite());
srunner_add_suite(sr, make_pack_suite());
setup();
printf ("Ran %d tests in subordinate suite\n", sub_nfailed);
srunner_run_all (sr, CK_NORMAL);
cleanup();
fork_teardown();
teardown_fixture();
n = srunner_ntests_failed(sr);
srunner_free(sr);
return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
| #include <stdlib.h>
#include <stdio.h>
#include <check.h>
#include "check_check.h"
int main (void)
{
int n;
SRunner *sr;
fork_setup();
setup_fixture();
sr = srunner_create (make_master_suite());
srunner_add_suite(sr, make_list_suite());
srunner_add_suite(sr, make_msg_suite());
srunner_add_suite(sr, make_log_suite());
srunner_add_suite(sr, make_limit_suite());
srunner_add_suite(sr, make_fork_suite());
srunner_add_suite(sr, make_fixture_suite());
srunner_add_suite(sr, make_pack_suite());
setup();
printf ("Ran %d tests in subordinate suite\n", sub_ntests);
srunner_run_all (sr, CK_NORMAL);
cleanup();
fork_teardown();
teardown_fixture();
n = srunner_ntests_failed(sr);
srunner_free(sr);
return (n == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}
| Use correct variable for number of tests | Use correct variable for number of tests
git-svn-id: caee63afe878fe2ec7dbba394a86c9654d9110ca@230 64e312b2-a51f-0410-8e61-82d0ca0eb02a
| C | lgpl-2.1 | dashaomai/check-code,dashaomai/check-code,svn2github/check,svn2github/check,svn2github/check,dashaomai/check-code,svn2github/check,dashaomai/check-code,svn2github/check |
a0b563f277f4fe56bc8af372777301d20c5a419b | src/main.h | src/main.h | #ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 1
#define PROGRAM_PATCH_VERSION 1
extern int quit;
#endif /* _MAIN_H_ */
| #ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 2
#define PROGRAM_PATCH_VERSION 0
extern int quit;
#endif /* _MAIN_H_ */
| Upgrade version number to 0.2.0 | Upgrade version number to 0.2.0
| C | mit | zear/shisen-seki,zear/shisen-seki |
0ac24673a4e719e6cb5e1adb2f72363d422b9f21 | JavaScriptCore/wtf/MathExtras.h | JavaScriptCore/wtf/MathExtras.h | /*
* Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <math.h>
#if PLATFORM(WIN)
inline float roundf(float num)
{
return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f);
}
inline long lroundf(float num)
{
return num > 0 ? num + 0.5f : ceilf(num - 0.5f);
}
#endif
| Add mathextras.h to wtf to give win32 roundf/lroundf support. | Add mathextras.h to wtf to give win32 roundf/lroundf support.
git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@14506 bbb929c8-8fbe-4397-9dbb-9b2b20218538 | C | bsd-3-clause | Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,ondra-novak/blink,nwjs/blink,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,modulexcite/blink,nwjs/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,ondra-novak/blink,XiaosongWei/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,PeterWangIntel/blink-crosswalk,modulexcite/blink,smishenk/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,modulexcite/blink,nwjs/blink,jtg-gg/blink,smishenk/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,modulexcite/blink,ondra-novak/blink,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,jtg-gg/blink,jtg-gg/blink,hgl888/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,jtg-gg/blink,hgl888/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,jtg-gg/blink,Bysmyyr/blink-crosswalk,jtg-gg/blink,hgl888/blink-crosswalk-efl,modulexcite/blink,kurli/blink-crosswalk,ondra-novak/blink,hgl888/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,jtg-gg/blink,nwjs/blink,jtg-gg/blink,XiaosongWei/blink-crosswalk,nwjs/blink,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,nwjs/blink,modulexcite/blink,jtg-gg/blink,nwjs/blink,Bysmyyr/blink-crosswalk,ondra-novak/blink,modulexcite/blink,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,ondra-novak/blink,nwjs/blink,PeterWangIntel/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk |
|
e6bba5feec294deb762bba5b53f6b0440ff81cd7 | strsplit.h | strsplit.h |
#ifndef __STR_SPLIT_H__
#define __STR_SPLIT_H__ 1
#include <stdlib.h>
#include <string.h>
int
strsplit (char *str, char *parts[], char *delimiter) {
char *pch;
int i = 0;
pch = strtok(str, delimiter);
parts[i++] = strdup(pch);
while (pch) {
pch = strtok(NULL, delimiter);
if (NULL == pch) break;
parts[i++] = strdup(pch);
}
free(pch);
return i;
}
#endif
|
#ifndef __STR_SPLIT_H__
#define __STR_SPLIT_H__ 1
#include <stdlib.h>
#include <string.h>
int
strsplit (char *str, char *parts[], char *delimiter) {
char *pch;
int i = 0;
char *tmp = strdup(str);
pch = strtok(tmp, delimiter);
parts[i++] = strdup(pch);
while (pch) {
pch = strtok(NULL, delimiter);
if (NULL == pch) break;
parts[i++] = strdup(pch);
}
free(tmp);
free(pch);
return i;
}
#endif
| Fix bad results when compiling with Apple’s LLVM 5 | Fix bad results when compiling with Apple’s LLVM 5
| C | mit | jwerle/strsplit.c |
ae49b56c52847aadda7be62071dcb33b5c22e6eb | Test/src/minunit.h | Test/src/minunit.h | /*
* minunit.h
*
* Source: http://www.jera.com/techinfo/jtns/jtn002.html
*/
#include <stdio.h>
extern int tests_run;
#define mu_assert(message, test) do { \
if (!(test)) { \
return message; \
} \
} while (0)
#define mu_run_test(test, name) do { \
test_head(name); \
char const * message = test(); \
tests_run++; \
if (message) { \
test_failure; \
printf(" * %s\n", message); \
} else { \
test_success; \
} \
} while (0)
#define test_head(name) printf("Test %s... ", name)
#define test_success printf("[OK]\n")
#define test_failure printf("[FAIL]\n") | /*
* minunit.h
*
* Source: http://www.jera.com/techinfo/jtns/jtn002.html
*/
#include <stdio.h>
extern int tests_run;
#define mu_assert(message, test) do { \
if (!(test)) { \
return message; \
} \
} while (0)
#define mu_run_test(test, name) do { \
printf("Test %s... ", name); \
char const * message = test(); \
tests_run++; \
if (message) { \
if (message[0] != '\0') { \
printf("[FAIL]\n * %s\n", message); \
} else { \
printf("[OK]\n"); \
} \
} else { \
printf("\n"); \
} \
} while (0)
| Remove useless unit testing definitions. | Remove useless unit testing definitions.
| C | mit | AymericGenet/SPHINCS-arduinodue,AymericGenet/SPHINCS-arduinodue,AymericGenet/SPHINCS-arduinodue |
bd339f71c7a5a3e2b883f4306689c8bc39077895 | test/CodeGen/ext-vector-shuffle.c | test/CodeGen/ext-vector-shuffle.c | // RUN: clang-cc %s -emit-llvm -o - | not grep 'extractelement' &&
// RUN: clang-cc %s -emit-llvm -o - | not grep 'insertelement' &&
// RUN: clang-cc %s -emit-llvm -o - | grep 'shufflevector'
typedef __attribute__(( ext_vector_type(2) )) float float2;
typedef __attribute__(( ext_vector_type(4) )) float float4;
float2 test1(float4 V) {
return V.xy + V.wz;
}
float4 test2(float4 V) {
float2 W = V.ww;
return W.xyxy + W.yxyx;
}
| // RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'extractelement' &&
// RUN: clang-cc %s -x cl -emit-llvm -o - | not grep 'insertelement' &&
// RUN: clang-cc %s -x cl -emit-llvm -o - | grep 'shufflevector'
typedef __attribute__(( ext_vector_type(2) )) float float2;
typedef __attribute__(( ext_vector_type(4) )) float float4;
float2 test1(float4 V) {
return V.xy + V.wz;
}
float4 test2(float4 V) {
float2 W = V.ww;
return W.xyxy + W.yxyx;
}
float4 test3(float4 V1, float4 V2) { return (float4)(V1.zw, V2.xy); }
| Add test for OpenCL vector initializer codegen | Add test for OpenCL vector initializer codegen
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@84445 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,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 |
93121c92ab02651020f862d5ccc94d63bc3dda00 | src/zopfli/hash.c | src/zopfli/hash.c | /*
Copyright 2011 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable 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] (Lode Vandevenne)
Author: [email protected] (Jyrki Alakuijala)
*/
#include "hash.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#define HASH_SHIFT 5
#define HASH_MASK 32767
extern ZopfliHash* ZopfliInitHash(size_t window_size);
extern void ZopfliResetHash(size_t window_size, ZopfliHash* h);
extern void ZopfliCleanHash(ZopfliHash* h);
extern void ZopfliUpdateHash(const unsigned char* array, size_t pos, size_t end, ZopfliHash* h);
extern void ZopfliWarmupHash(const unsigned char* array, size_t pos, size_t end, ZopfliHash* h);
| /*
Copyright 2011 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable 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] (Lode Vandevenne)
Author: [email protected] (Jyrki Alakuijala)
*/
#include "hash.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#define HASH_SHIFT 5
#define HASH_MASK 32767
extern ZopfliHash* ZopfliInitHash(size_t window_size);
extern void ZopfliResetHash(size_t window_size, ZopfliHash* h);
extern void ZopfliCleanHash(ZopfliHash* h);
extern void ZopfliUpdateHash(const unsigned char* array, size_t pos, size_t end, ZopfliHash* h);
extern void ZopfliWarmupHash(const unsigned char* array, size_t pos, size_t end, ZopfliHash* h);
| Remove a temporary fn that never got used | Remove a temporary fn that never got used
| C | apache-2.0 | carols10cents/zopfli,carols10cents/zopfli |
e1399dfc55b246db94616bb0052c565a45300710 | tests/escape/proper-escapes/local-phi-to-global-field.c | tests/escape/proper-escapes/local-phi-to-global-field.c | struct S {
int *x;
int *y;
};
struct S s;
void addrOfEscape2(int * i1, int * i2, int x) {
int * p = i2;
if(x > 10)
p = i1;
s.y = p;
}
| struct S {
int *x;
int *y;
};
struct S *s;
void addrOfEscape2(int * i1, int * i2, int x) {
int * p = i2;
if(x > 10)
p = i1;
s->y = p;
}
| Modify a test to avoid constant GEPs | Modify a test to avoid constant GEPs
| C | bsd-3-clause | travitch/foreign-inference,travitch/foreign-inference |
eb66fff7d94199f80378bc0b51a06e62ce379b53 | drivers/scsi/lpfc/lpfc_version.h | drivers/scsi/lpfc/lpfc_version.h | /*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2004-2005 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
* www.emulex.com *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of version 2 of the GNU General *
* Public License as published by the Free Software Foundation. *
* This program is distributed in the hope that it will be useful. *
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
* DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
* TO BE LEGALLY INVALID. See the GNU General Public License for *
* more details, a copy of which can be found in the file COPYING *
* included with this package. *
*******************************************************************/
#define LPFC_DRIVER_VERSION "8.0.30"
#define LPFC_DRIVER_NAME "lpfc"
#define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \
LPFC_DRIVER_VERSION
#define LPFC_COPYRIGHT "Copyright(c) 2004-2005 Emulex. All rights reserved."
#define DFC_API_VERSION "0.0.0"
| /*******************************************************************
* This file is part of the Emulex Linux Device Driver for *
* Fibre Channel Host Bus Adapters. *
* Copyright (C) 2004-2005 Emulex. All rights reserved. *
* EMULEX and SLI are trademarks of Emulex. *
* www.emulex.com *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of version 2 of the GNU General *
* Public License as published by the Free Software Foundation. *
* This program is distributed in the hope that it will be useful. *
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
* DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
* TO BE LEGALLY INVALID. See the GNU General Public License for *
* more details, a copy of which can be found in the file COPYING *
* included with this package. *
*******************************************************************/
#define LPFC_DRIVER_VERSION "8.1.0"
#define LPFC_DRIVER_NAME "lpfc"
#define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \
LPFC_DRIVER_VERSION
#define LPFC_COPYRIGHT "Copyright(c) 2004-2005 Emulex. All rights reserved."
#define DFC_API_VERSION "0.0.0"
| Change version number to 8.1.0 | [SCSI] lpfc: Change version number to 8.1.0
Signed-off-by: James Smart <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
54f611f3c5f8c89b8556fe347525a1dfea222095 | src/modules/conf_randr/e_smart_monitor.h | src/modules/conf_randr/e_smart_monitor.h | #ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch);
void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output);
void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid, Evas_Coord gx, Evas_Coord gy, Evas_Coord gw, Evas_Coord gh);
void e_smart_monitor_grid_virtual_size_set(Evas_Object *obj, Evas_Coord vw, Evas_Coord vh);
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
void e_smart_monitor_current_geometry_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
# endif
#endif
| #ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
void e_smart_monitor_crtc_set(Evas_Object *obj, Ecore_X_Randr_Crtc crtc, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch);
Ecore_X_Randr_Crtc e_smart_monitor_crtc_get(Evas_Object *obj);
void e_smart_monitor_output_set(Evas_Object *obj, Ecore_X_Randr_Output output);
void e_smart_monitor_grid_set(Evas_Object *obj, Evas_Object *grid, Evas_Coord gx, Evas_Coord gy, Evas_Coord gw, Evas_Coord gh);
void e_smart_monitor_grid_virtual_size_set(Evas_Object *obj, Evas_Coord vw, Evas_Coord vh);
void e_smart_monitor_background_set(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy);
void e_smart_monitor_current_geometry_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
void e_smart_monitor_clone_set(Evas_Object *obj, Evas_Object *parent);
# endif
#endif
| Add function prototype for monitor clone set. | Add function prototype for monitor clone set.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84208
| C | bsd-2-clause | tizenorg/platform.upstream.enlightenment,FlorentRevest/Enlightenment,rvandegrift/e,FlorentRevest/Enlightenment,tasn/enlightenment,FlorentRevest/Enlightenment,tasn/enlightenment,rvandegrift/e,rvandegrift/e,tizenorg/platform.upstream.enlightenment,tizenorg/platform.upstream.enlightenment,tasn/enlightenment |
eb0fa7bf4c9d8d24ee597e8777fee446ac55c35b | numba/npyufunc/gufunc_scheduler.h | numba/npyufunc/gufunc_scheduler.h | #ifndef GUFUNC_SCHEDULER
#define GUFUNC_SCHEDULER
#include <stdint.h>
#ifndef __SIZEOF_POINTER__
/* MSVC doesn't define __SIZEOF_POINTER__ */
#if defined(_WIN64)
#define intp int64_t
#define uintp uint64_t
#elif defined(_WIN32)
#define intp int
#define uintp unsigned
#else
#error "cannot determine size of intp"
#endif
#elif __SIZEOF_POINTER__ == 8
#define intp int64_t
#define uintp uint64_t
#else
#define intp int
#define uintp unsigned
#endif
#ifdef __cplusplus
extern "C"
{
#endif
void do_scheduling(intp num_dim, intp *dims, uintp num_threads, intp *sched, intp debug);
#ifdef __cplusplus
}
#endif
#endif
| #ifndef GUFUNC_SCHEDULER
#define GUFUNC_SCHEDULER
/* define int64_t and uint64_t for VC9 */
#ifdef _MSC_VER
#define int64_t signed __int64
#define uint64_t unsigned __int64
#else
#include <stdint.h>
#endif
#ifndef __SIZEOF_POINTER__
/* MSVC doesn't define __SIZEOF_POINTER__ */
#if defined(_WIN64)
#define intp int64_t
#define uintp uint64_t
#elif defined(_WIN32)
#define intp int
#define uintp unsigned
#else
#error "cannot determine size of intp"
#endif
#elif __SIZEOF_POINTER__ == 8
#define intp int64_t
#define uintp uint64_t
#else
#define intp int
#define uintp unsigned
#endif
#ifdef __cplusplus
extern "C"
{
#endif
void do_scheduling(intp num_dim, intp *dims, uintp num_threads, intp *sched, intp debug);
#ifdef __cplusplus
}
#endif
#endif
| Fix missing stdint.h on py2.7 vc9 | Fix missing stdint.h on py2.7 vc9
| C | bsd-2-clause | stonebig/numba,numba/numba,cpcloud/numba,cpcloud/numba,stuartarchibald/numba,gmarkall/numba,seibert/numba,sklam/numba,seibert/numba,sklam/numba,stuartarchibald/numba,jriehl/numba,seibert/numba,jriehl/numba,gmarkall/numba,sklam/numba,IntelLabs/numba,stuartarchibald/numba,stonebig/numba,numba/numba,numba/numba,gmarkall/numba,stuartarchibald/numba,seibert/numba,sklam/numba,gmarkall/numba,stonebig/numba,cpcloud/numba,stonebig/numba,gmarkall/numba,numba/numba,cpcloud/numba,jriehl/numba,stonebig/numba,sklam/numba,IntelLabs/numba,IntelLabs/numba,seibert/numba,cpcloud/numba,numba/numba,IntelLabs/numba,jriehl/numba,jriehl/numba,IntelLabs/numba,stuartarchibald/numba |
9f07c8bcc8f4596d39b31f3515b54c5405f663da | JavaScriptCore/wtf/unicode/Unicode.h | JavaScriptCore/wtf/unicode/Unicode.h | // -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2006 George Staikos <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef KJS_UNICODE_H
#define KJS_UNICODE_H
#include <wtf/Platform.h>
#if USE(QT4_UNICODE)
#include "qt4/UnicodeQt4.h"
#elif USE(ICU_UNICODE)
#include <wtf/icu/UnicodeIcu.h>
#else
#error "Unknown Unicode implementation"
#endif
#endif
// vim: ts=2 sw=2 et
| // -*- c-basic-offset: 2 -*-
/*
* This file is part of the KDE libraries
* Copyright (C) 2006 George Staikos <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef KJS_UNICODE_H
#define KJS_UNICODE_H
#include <wtf/Platform.h>
#if USE(QT4_UNICODE)
#include "qt4/UnicodeQt4.h"
#elif USE(ICU_UNICODE)
#include <wtf/unicode/icu/UnicodeIcu.h>
#else
#error "Unknown Unicode implementation"
#endif
#endif
// vim: ts=2 sw=2 et
| Fix mac bustage (more still). | Fix mac bustage (more still).
git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@18103 bbb929c8-8fbe-4397-9dbb-9b2b20218538 | C | bsd-3-clause | Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,nwjs/blink,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,nwjs/blink,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,kurli/blink-crosswalk,Pluto-tv/blink-crosswalk,nwjs/blink,ondra-novak/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,jtg-gg/blink,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,ondra-novak/blink,modulexcite/blink,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,nwjs/blink,Pluto-tv/blink-crosswalk,Bysmyyr/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,ondra-novak/blink,PeterWangIntel/blink-crosswalk,nwjs/blink,ondra-novak/blink,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,modulexcite/blink,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,jtg-gg/blink,modulexcite/blink,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,XiaosongWei/blink-crosswalk,jtg-gg/blink,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,Pluto-tv/blink-crosswalk,jtg-gg/blink,modulexcite/blink,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,modulexcite/blink,kurli/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,nwjs/blink,jtg-gg/blink,nwjs/blink,ondra-novak/blink,PeterWangIntel/blink-crosswalk,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,modulexcite/blink,smishenk/blink-crosswalk,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,jtg-gg/blink,crosswalk-project/blink-crosswalk-efl,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,XiaosongWei/blink-crosswalk,jtg-gg/blink,jtg-gg/blink,Pluto-tv/blink-crosswalk,hgl888/blink-crosswalk-efl,modulexcite/blink,kurli/blink-crosswalk,XiaosongWei/blink-crosswalk,modulexcite/blink,XiaosongWei/blink-crosswalk,ondra-novak/blink,jtg-gg/blink,kurli/blink-crosswalk,nwjs/blink,smishenk/blink-crosswalk,nwjs/blink,crosswalk-project/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,jtg-gg/blink,ondra-novak/blink,Bysmyyr/blink-crosswalk |
4acd77d97344c93a8fc59567f19ef2b213203bea | test_gcrypt_ecc.c | test_gcrypt_ecc.c |
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <gcrypt.h>
#include <glib.h>
#define DEFAULT_DATA "This message will be signed\n"
#define DEFAULT_SIG "$HPI?t(I*1vAYsl$|%21WXND=6Br*[>k(OR9B!GOwHqL0s+3Uq"
void __init()
{
gcry_error_t err;
err = gcry_control(GCRYCTL_INIT_SECMEM, 1);
if (gcry_err_code(err))
fprintf(stderr, "Cannot enable libgcrypt's secure memory management\n");
gcry_control(GCRYCTL_ENABLE_QUICK_RANDOM, 0);
gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
}
void __test_keygen()
{
__init();
gcry_error_t err;
gcry_sexp_t spec, key_pair, list;
gcry_mpi_t pub;
err = gcry_sexp_build(&spec, NULL, "(genkey (ECDSA (nbits %d)))", 256);
if (err) {
fprintf(stderr, "gcry_sexp_new() failed with: %s\n", gcry_strerror(err));
abort();
}
err = gcry_pk_genkey(&key_pair, spec);
if (err) {
fprintf(stderr, "gcry_pk_genkey() failed with: %s\n", gcry_strerror(err));
abort();
}
list = gcry_sexp_find_token(key_pair, "q", 1);
pub = gcry_sexp_nth_mpi (list, 1, GCRYMPI_FMT_USG);
gcry_sexp_release (list);
gcry_sexp_release (key_pair);
gcry_sexp_release (spec);
unsigned char *pubkey;
size_t publen, privlen;
gcry_mpi_aprint(GCRYMPI_FMT_HEX, &pubkey, &publen, pub);
fprintf(stderr, "PUB: (%d) %s %p\n", (int)publen, pubkey, pubkey);
}
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
g_test_add_func("/test/ecc_keygen", __test_keygen);
return g_test_run();
}
| Add a libgcrypt-ecc test strut | Add a libgcrypt-ecc test strut
| C | lgpl-2.1 | rtyler/PyECC,slideinc/PyECC,rtyler/PyECC,slideinc/PyECC |
|
b9ecedf51225867a3060d4de155186855c7de6b7 | kernel/x86/apic_timer.c | kernel/x86/apic_timer.c | #include <kernel/x86/apic.h>
#include <kernel/port/mmio.h>
void apic_timer_init(uint8_t int_no, uint8_t divisor, uint8_t mode) {
/** set the divisor: **/
uint32_t reg = get32(DIVIDE_CONF);
reg &= ~0xf;
/* The representation of the divisor in the divide configuration
* register is... weird. We're normalizing it a bit here; it's split up
* within the register, and for some reason 7 is divide by 1, where as
* the rest are a perfect 2^(n-1). See the intel manual for the
* details. */
if (divisor == 0) divisor = 7;
else divisor -= 1;
reg |= (divisor & 0x3) | ((divisor & 0x4)<<1);
put32(DIVIDE_CONF, reg);
/** set the lvt entry: **/
LVTEnt lvt_ent;
lvt_ent.raw = get32(LVT_TIMER);
lvt_ent.v.timer_mode = mode;
lvt_ent.v.vector = int_no;
lvt_ent.v.masked = 0;
put32(LVT_TIMER, lvt_ent.raw);
}
void apic_timer_set(uint32_t value) {
put32(INITIAL_COUNT, value);
}
| #include <kernel/x86/apic.h>
#include <kernel/port/mmio.h>
void apic_timer_init(uint8_t int_no, uint8_t divisor, uint8_t mode) {
/** set the divisor: **/
uint32_t reg = get32(DIVIDE_CONF);
reg &= ~0xf;
/* The representation of the divisor in the divide configuration
* register is... weird. We're normalizing it a bit here; it's split up
* within the register, and for some reason 7 is divide by 1, where as
* the rest are a perfect 2^(n-1). See the intel manual for the
* details. */
if (divisor == 0) divisor = 7;
else divisor -= 1;
/* Clear the low 4 bits; the rest is reserved and shouldn't be touched. */
reg &= ~0xf;
reg |= (divisor & 0x3) | ((divisor & 0x4)<<1);
put32(DIVIDE_CONF, reg);
/** set the lvt entry: **/
LVTEnt lvt_ent;
lvt_ent.raw = get32(LVT_TIMER);
lvt_ent.v.timer_mode = mode;
lvt_ent.v.vector = int_no;
lvt_ent.v.masked = 0;
put32(LVT_TIMER, lvt_ent.raw);
}
void apic_timer_set(uint32_t value) {
put32(INITIAL_COUNT, value);
}
| Clear existing divisor before setting it. | timer: Clear existing divisor before setting it.
This is just a case of being slightly more diligent; there is not
currently observed behavior change.
| C | isc | zenhack/zero,zenhack/zero,zenhack/zero |
df7f12046222ae1b263d9148d493182617edc611 | numeric.h | numeric.h | #ifndef H_NUMERIC
#define H_NUMERIC
#include <cmath>
#include <limits>
template<class T>
typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type
almost_equal(T x, T y, int ulp=2)
{
// the machine epsilon has to be scaled to the magnitude of the values used
// and multiplied by the desired precision in ULPs (units in the last place)
return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp
// unless the result is subnormal
|| std::abs(x-y) < std::numeric_limits<T>::min();
}
template<class T>
T half(T x){}
template <>
float half(float x){return 0.5f * x;}
template <>
double half(double x){return 0.5 * x;}
#endif
| #ifndef H_NUMERIC
#define H_NUMERIC
#include <cmath>
#include <limits>
/**
* @brief use of machine epsilon to compare floating-point values for equality
* http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon
*/
template<class T>
typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type
almost_equal(T x, T y, int ulp=2)
{
// the machine epsilon has to be scaled to the magnitude of the values used
// and multiplied by the desired precision in ULPs (units in the last place)
return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp
// unless the result is subnormal
|| std::abs(x-y) < std::numeric_limits<T>::min();
}
template<class T>
T half(T x){}
template <>
float half(float x){return 0.5f * x;}
template <>
double half(double x){return 0.5 * x;}
#endif
| Add reference for almost_equal function | Add reference for almost_equal function
| C | mit | Bl4ckb0ne/delaunay-triangulation |
c6eadf70db6113900a61674fd7195a9977f428a5 | RealmSwift/Tests/TestUtils.h | RealmSwift/Tests/TestUtils.h | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
#import <Foundation/Foundation.h>
#import <XCTest/XCTestCase.h>
// An XCTestCase that invokes each test in an autorelease pool
// Works around a swift 1.1 limitation where `super` can't be used in a block
@interface RLMAutoreleasePoolTestCase : XCTestCase
@end
FOUNDATION_EXTERN void RLMAssertThrows(XCTestCase *self, dispatch_block_t block, NSString *message, NSString *fileName, NSUInteger lineNumber);
// Forcibly deallocate the RLMRealm for the given path on the main thread
// Will cause crashes if it's alive for a reason other than being leaked by RLMAssertThrows
FOUNDATION_EXTERN void RLMDeallocateRealm(NSString *path);
| ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Realm Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
////////////////////////////////////////////////////////////////////////////
#import <Foundation/Foundation.h>
#import <XCTest/XCTestCase.h>
// An XCTestCase that invokes each test in an autorelease pool
// Works around a swift 1.1 limitation where `super` can't be used in a block
@interface RLMAutoreleasePoolTestCase : XCTestCase
@end
FOUNDATION_EXTERN void RLMAssertThrows(XCTestCase *self, __attribute__((noescape)) dispatch_block_t block, NSString *message, NSString *fileName, NSUInteger lineNumber);
// Forcibly deallocate the RLMRealm for the given path on the main thread
// Will cause crashes if it's alive for a reason other than being leaked by RLMAssertThrows
FOUNDATION_EXTERN void RLMDeallocateRealm(NSString *path);
| Annotate RLMAssertThrows' block argument with noescape | [Tests] Annotate RLMAssertThrows' block argument with noescape
| C | apache-2.0 | duk42111/realm-cocoa,ul7290/realm-cocoa,codyDu/realm-cocoa,kylebshr/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,bugix/realm-cocoa,bestwpw/realm-cocoa,yuuki1224/realm-cocoa,nathankot/realm-cocoa,xmartlabs/realm-cocoa,lumoslabs/realm-cocoa,codyDu/realm-cocoa,lumoslabs/realm-cocoa,imjerrybao/realm-cocoa,lumoslabs/realm-cocoa,Palleas/realm-cocoa,bestwpw/realm-cocoa,kylebshr/realm-cocoa,sunzeboy/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,isaacroldan/realm-cocoa,Havi4/realm-cocoa,ChenJian345/realm-cocoa,thdtjsdn/realm-cocoa,thdtjsdn/realm-cocoa,neonichu/realm-cocoa,kevinmlong/realm-cocoa,vuchau/realm-cocoa,vuchau/realm-cocoa,hejunbinlan/realm-cocoa,dilizarov/realm-cocoa,lumoslabs/realm-cocoa,tenebreux/realm-cocoa,vuchau/realm-cocoa,bestwpw/realm-cocoa,bugix/realm-cocoa,tenebreux/realm-cocoa,hejunbinlan/realm-cocoa,duk42111/realm-cocoa,ul7290/realm-cocoa,dilizarov/realm-cocoa,tenebreux/realm-cocoa,thdtjsdn/realm-cocoa,sunzeboy/realm-cocoa,bestwpw/realm-cocoa,imjerrybao/realm-cocoa,iOSCowboy/realm-cocoa,HuylensHu/realm-cocoa,yuuki1224/realm-cocoa,Palleas/realm-cocoa,zilaiyedaren/realm-cocoa,ul7290/realm-cocoa,sunfei/realm-cocoa,Palleas/realm-cocoa,kevinmlong/realm-cocoa,neonichu/realm-cocoa,ChenJian345/realm-cocoa,zilaiyedaren/realm-cocoa,iOSCowboy/realm-cocoa,sunzeboy/realm-cocoa,ChenJian345/realm-cocoa,xmartlabs/realm-cocoa,kylebshr/realm-cocoa,duk42111/realm-cocoa,sunfei/realm-cocoa,isaacroldan/realm-cocoa,isaacroldan/realm-cocoa,zilaiyedaren/realm-cocoa,nathankot/realm-cocoa,iOS--wsl--victor/realm-cocoa,sunzeboy/realm-cocoa,iOSCowboy/realm-cocoa,isaacroldan/realm-cocoa,brasbug/realm-cocoa,tenebreux/realm-cocoa,iOS--wsl--victor/realm-cocoa,Havi4/realm-cocoa,Havi4/realm-cocoa,iOS--wsl--victor/realm-cocoa,iOSCowboy/realm-cocoa,sunzeboy/realm-cocoa,kevinmlong/realm-cocoa,isaacroldan/realm-cocoa,lumoslabs/realm-cocoa,neonichu/realm-cocoa,codyDu/realm-cocoa,ul7290/realm-cocoa,nathankot/realm-cocoa,hejunbinlan/realm-cocoa,brasbug/realm-cocoa,codyDu/realm-cocoa,iOS--wsl--victor/realm-cocoa,yuuki1224/realm-cocoa,zilaiyedaren/realm-cocoa,vuchau/realm-cocoa,imjerrybao/realm-cocoa,kylebshr/realm-cocoa,dilizarov/realm-cocoa,HuylensHu/realm-cocoa,kylebshr/realm-cocoa,zilaiyedaren/realm-cocoa,Havi4/realm-cocoa,hejunbinlan/realm-cocoa,brasbug/realm-cocoa,HuylensHu/realm-cocoa,hejunbinlan/realm-cocoa,codyDu/realm-cocoa,Palleas/realm-cocoa,Palleas/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,HuylensHu/realm-cocoa,bestwpw/realm-cocoa,xmartlabs/realm-cocoa,ul7290/realm-cocoa,nathankot/realm-cocoa,duk42111/realm-cocoa,yuuki1224/realm-cocoa,bugix/realm-cocoa,thdtjsdn/realm-cocoa,Havi4/realm-cocoa,bugix/realm-cocoa,HuylensHu/realm-cocoa,ChenJian345/realm-cocoa,sunfei/realm-cocoa,xmartlabs/realm-cocoa,imjerrybao/realm-cocoa,neonichu/realm-cocoa,brasbug/realm-cocoa,bugix/realm-cocoa,sunfei/realm-cocoa,iOSCowboy/realm-cocoa,neonichu/realm-cocoa,yuuki1224/realm-cocoa,ChenJian345/realm-cocoa,duk42111/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,kevinmlong/realm-cocoa,kevinmlong/realm-cocoa,dilizarov/realm-cocoa,iOS--wsl--victor/realm-cocoa,tenebreux/realm-cocoa,dilizarov/realm-cocoa,imjerrybao/realm-cocoa,nathankot/realm-cocoa,sunfei/realm-cocoa,xmartlabs/realm-cocoa,thdtjsdn/realm-cocoa,AlexanderMazaletskiy/realm-cocoa,vuchau/realm-cocoa,brasbug/realm-cocoa |
9cd2e510651ddb2d7fb927ad1ac1234488487e3e | chrome/browser/thumbnail_store.h | chrome/browser/thumbnail_store.h | // Copyright (c) 2009 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 CHROME_BROWSER_THUMBNAIL_STORE_H_
#define CHROME_BROWSER_THUMBNAIL_STORE_H_
#include <vector>
#include "base/file_path.h"
class GURL;
class SkBitmap;
struct ThumbnailScore;
namespace base {
class Time;
}
// This storage interface provides storage for the thumbnails used
// by the new_tab_ui.
class ThumbnailStore {
public:
ThumbnailStore();
~ThumbnailStore();
// Must be called after creation but before other methods are called.
// file_path is where a new database should be created or the
// location of an existing databse.
// If false is returned, no other methods should be called.
bool Init(const FilePath& file_path);
// Stores the given thumbnail and score with the associated url.
bool SetPageThumbnail(const GURL& url,
const SkBitmap& thumbnail,
const ThumbnailScore& score,
const base::Time& time);
// Retrieves the thumbnail and score for the given url.
// Returns false if there is not data for the given url or some other
// error occurred.
bool GetPageThumbnail(const GURL& url,
SkBitmap* thumbnail,
ThumbnailScore* score);
private:
// The location of the thumbnail store.
FilePath file_path_;
DISALLOW_COPY_AND_ASSIGN(ThumbnailStore);
};
#endif // CHROME_BROWSER_THUMBNAIL_STORE_H_
| Add an unused interface for storing thumbnails. This is to replace the history system's thumbnail storage. | Add an unused interface for storing thumbnails. This is to replace the history
system's thumbnail storage.
git-svn-id: http://src.chromium.org/svn/trunk/src@17028 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 7a580059421cef931317be498a7334eee5d6f2d2 | C | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser |
|
c0ae1b727985d3e94549776666a9f0929cbac090 | include/erpiko/bigint.h | include/erpiko/bigint.h | #ifndef _BIGINT_H_
#define _BIGINT_H_
#include <memory>
namespace Erpiko {
/**
* BigInt is the class of big integer representation.
*/
class BigInt {
public:
/**
* Constructor
*/
BigInt();
/**
* Constructor from long integer
* @param value to be initialized
*/
BigInt(unsigned long value);
/**
* Creates a new BigInt and initialized with the value specified in the string
* @param string string containing the value. If it is prefixed with 0x then it is considered as hex string
* @return the new BigInt with the value set
*/
static BigInt* fromString(const std::string string);
virtual ~BigInt();
/**
* Creates hex string representation of the BigInt
* @return string containing hex string
*/
const std::string toHexString() const;
/**
* Operator ==
**/
bool operator== (const BigInt& other) const;
/**
* Operator =
**/
void operator= (const BigInt& other);
/**
* Operator =
**/
void operator= (const unsigned long value);
/**
* Operator =.
* @param string the new value specified as string. String must be valid or the value will not change.
**/
void operator= (const std::string string);
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace Erpiko
#endif // _BIGINT_H_
| #ifndef _BIGINT_H_
#define _BIGINT_H_
#include <string>
#include <memory>
namespace Erpiko {
/**
* BigInt is the class of big integer representation.
*/
class BigInt {
public:
/**
* Constructor
*/
BigInt();
/**
* Constructor from long integer
* @param value to be initialized
*/
BigInt(unsigned long value);
/**
* Creates a new BigInt and initialized with the value specified in the string
* @param string string containing the value. If it is prefixed with 0x then it is considered as hex string
* @return the new BigInt with the value set
*/
static BigInt* fromString(const std::string string);
virtual ~BigInt();
/**
* Creates hex string representation of the BigInt
* @return string containing hex string
*/
const std::string toHexString() const;
/**
* Operator ==
**/
bool operator== (const BigInt& other) const;
/**
* Operator =
**/
void operator= (const BigInt& other);
/**
* Operator =
**/
void operator= (const unsigned long value);
/**
* Operator =.
* @param string the new value specified as string. String must be valid or the value will not change.
**/
void operator= (const std::string string);
private:
class Impl;
std::unique_ptr<Impl> impl;
};
} // namespace Erpiko
#endif // _BIGINT_H_
| Add <string> explicitly for Windows complaining without it | Add <string> explicitly for Windows complaining without it
| C | bsd-3-clause | mdamt/erpiko,mdamt/erpiko,mdamt/erpiko |
469d2ae14fdeeb192a0f152978f433cd2bed840e | core/alsp_src/win32/win32_locate.c | core/alsp_src/win32/win32_locate.c | #include "defs.h"
void locate_library_executable(int argc, char *argv[])
{
DWORD l;
char *endpath;
#ifdef DLL
HANDLE dll;
#endif
l = GetModuleFileName(NULL, executable_path, IMAGEDIR_MAX);
if (l == 0 || l >= IMAGEDIR_MAX) fatal_error(FE_INFND, 0);
#ifdef DLL
dll = GetModuleHandle(DLL_NAME);
if (dll == NULL) fatal_error(FE_INFND, 0);
l = GetModuleFileName(dll, library_path, IMAGEDIR_MAX);
if (l == 0 || l >= IMAGEDIR_MAX) fatal_error(FE_INFND, 0);
#else
strcpy(library_path, executable_path);
#endif /* DLL */
strcpy(library_dir, library_path);
endpath = strrchr(library_dir, '\\');
if (endpath == NULL) fatal_error(FE_INFND, 0);
endpath++; /* include the \ */
*endpath = 0;
}
| #include "defs.h"
void locate_library_executable(int argc, char *argv[])
{
DWORD l;
char *endpath;
#ifdef DLL
HANDLE dll;
#endif
l = GetModuleFileName(NULL, executable_path, PATH_MAX);
if (l == 0 || l >= PATH_MAX) fatal_error(FE_INFND, 0);
#ifdef DLL
dll = GetModuleHandle(DLL_NAME);
if (dll == NULL) fatal_error(FE_INFND, 0);
l = GetModuleFileName(dll, library_path, PATH_MAX);
if (l == 0 || l >= PATH_MAX) fatal_error(FE_INFND, 0);
#else
strcpy(library_path, executable_path);
#endif /* DLL */
strcpy(library_dir, library_path);
endpath = strrchr(library_dir, '\\');
if (endpath == NULL) fatal_error(FE_INFND, 0);
endpath++; /* include the \ */
*endpath = 0;
}
| Replace custom IMAGEDIR_MAX with PATH_MAX, ala 13616d1 | Replace custom IMAGEDIR_MAX with PATH_MAX, ala 13616d1
| C | mit | AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog,AppliedLogicSystems/ALSProlog |
c6f56c9c3b29fd74859f237e7357322f4ac9574e | ghighlighter/gh-about-dialog.c | ghighlighter/gh-about-dialog.c | #include <gtk/gtk.h>
GtkWidget *
gh_about_dialog_create ()
{
GtkWidget *dialog;
dialog = gtk_about_dialog_new ();
static gchar const *title = "About ghighlighter";
gtk_window_set_title (GTK_WINDOW (dialog), title);
return dialog;
}
| #include <gtk/gtk.h>
GtkWidget *
gh_about_dialog_create ()
{
GtkWidget *dialog;
dialog = gtk_about_dialog_new ();
static gchar const *title = "About ghighlighter";
static gchar const *program_name = "ghighlighter";
gtk_window_set_title (GTK_WINDOW (dialog), title);
gtk_about_dialog_set_program_name (GTK_ABOUT_DIALOG (dialog), program_name);
return dialog;
}
| Set about dialog program name | Set about dialog program name
| C | mit | chdorner/ghighlighter-c |
bb4c88c29ab312e2be118ac857daa7c93399d6e1 | src/include/postmaster/fork_process.h | src/include/postmaster/fork_process.h | #ifndef FORK_PROCESS_H
#define FORK_PROCESS_H
#include "postgres.h"
extern pid_t fork_process(void);
#endif /* ! FORK_PROCESS_H */
| /*-------------------------------------------------------------------------
*
* fork_process.h
* Exports from postmaster/fork_process.c.
*
* Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/postmaster/fork_process.h,v 1.2 2005/03/13 23:32:26 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef FORK_PROCESS_H
#define FORK_PROCESS_H
extern pid_t fork_process(void);
#endif /* FORK_PROCESS_H */
| Add missing identification comment, remove entirely inappropriate include of postgres.h. | Add missing identification comment, remove entirely inappropriate include
of postgres.h.
| C | apache-2.0 | 50wu/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,adam8157/gpdb,rubikloud/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,xinzweb/gpdb,edespino/gpdb,oberstet/postgres-xl,ahachete/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,rubikloud/gpdb,jmcatamney/gpdb,ahachete/gpdb,oberstet/postgres-xl,ovr/postgres-xl,xuegang/gpdb,yuanzhao/gpdb,royc1/gpdb,CraigHarris/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,cjcjameson/gpdb,Quikling/gpdb,janebeckman/gpdb,kmjungersen/PostgresXL,rubikloud/gpdb,randomtask1155/gpdb,oberstet/postgres-xl,chrishajas/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,royc1/gpdb,50wu/gpdb,lintzc/gpdb,50wu/gpdb,greenplum-db/gpdb,yazun/postgres-xl,CraigHarris/gpdb,CraigHarris/gpdb,snaga/postgres-xl,kaknikhil/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,royc1/gpdb,yuanzhao/gpdb,edespino/gpdb,Quikling/gpdb,foyzur/gpdb,atris/gpdb,techdragon/Postgres-XL,adam8157/gpdb,lintzc/gpdb,zaksoup/gpdb,tangp3/gpdb,tangp3/gpdb,ovr/postgres-xl,jmcatamney/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,Chibin/gpdb,rvs/gpdb,CraigHarris/gpdb,Chibin/gpdb,tangp3/gpdb,xinzweb/gpdb,tangp3/gpdb,lintzc/gpdb,Quikling/gpdb,kaknikhil/gpdb,zaksoup/gpdb,yuanzhao/gpdb,snaga/postgres-xl,yazun/postgres-xl,yuanzhao/gpdb,arcivanov/postgres-xl,zeroae/postgres-xl,Chibin/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,postmind-net/postgres-xl,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,randomtask1155/gpdb,rubikloud/gpdb,tangp3/gpdb,cjcjameson/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,ahachete/gpdb,tangp3/gpdb,lpetrov-pivotal/gpdb,ahachete/gpdb,foyzur/gpdb,edespino/gpdb,ahachete/gpdb,ahachete/gpdb,ovr/postgres-xl,janebeckman/gpdb,pavanvd/postgres-xl,janebeckman/gpdb,50wu/gpdb,randomtask1155/gpdb,rvs/gpdb,tangp3/gpdb,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,rvs/gpdb,jmcatamney/gpdb,lintzc/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,lpetrov-pivotal/gpdb,atris/gpdb,edespino/gpdb,greenplum-db/gpdb,postmind-net/postgres-xl,lisakowen/gpdb,lintzc/gpdb,pavanvd/postgres-xl,atris/gpdb,0x0FFF/gpdb,Chibin/gpdb,Quikling/gpdb,oberstet/postgres-xl,janebeckman/gpdb,edespino/gpdb,xinzweb/gpdb,0x0FFF/gpdb,atris/gpdb,chrishajas/gpdb,oberstet/postgres-xl,lisakowen/gpdb,CraigHarris/gpdb,snaga/postgres-xl,lisakowen/gpdb,royc1/gpdb,Postgres-XL/Postgres-XL,zaksoup/gpdb,yazun/postgres-xl,yuanzhao/gpdb,cjcjameson/gpdb,chrishajas/gpdb,xuegang/gpdb,ashwinstar/gpdb,lisakowen/gpdb,chrishajas/gpdb,ashwinstar/gpdb,foyzur/gpdb,Chibin/gpdb,kaknikhil/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,xinzweb/gpdb,lintzc/gpdb,arcivanov/postgres-xl,Quikling/gpdb,Chibin/gpdb,chrishajas/gpdb,Postgres-XL/Postgres-XL,janebeckman/gpdb,cjcjameson/gpdb,techdragon/Postgres-XL,atris/gpdb,adam8157/gpdb,jmcatamney/gpdb,yazun/postgres-xl,cjcjameson/gpdb,edespino/gpdb,foyzur/gpdb,foyzur/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,jmcatamney/gpdb,CraigHarris/gpdb,lintzc/gpdb,randomtask1155/gpdb,xinzweb/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,rubikloud/gpdb,rvs/gpdb,lpetrov-pivotal/gpdb,techdragon/Postgres-XL,CraigHarris/gpdb,50wu/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,zaksoup/gpdb,janebeckman/gpdb,rubikloud/gpdb,arcivanov/postgres-xl,kmjungersen/PostgresXL,jmcatamney/gpdb,postmind-net/postgres-xl,royc1/gpdb,50wu/gpdb,pavanvd/postgres-xl,yuanzhao/gpdb,chrishajas/gpdb,CraigHarris/gpdb,janebeckman/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,randomtask1155/gpdb,xuegang/gpdb,janebeckman/gpdb,xuegang/gpdb,edespino/gpdb,adam8157/gpdb,50wu/gpdb,xuegang/gpdb,ashwinstar/gpdb,foyzur/gpdb,kaknikhil/gpdb,rvs/gpdb,yuanzhao/gpdb,Quikling/gpdb,cjcjameson/gpdb,tpostgres-projects/tPostgres,lintzc/gpdb,0x0FFF/gpdb,zeroae/postgres-xl,xuegang/gpdb,tpostgres-projects/tPostgres,xuegang/gpdb,ovr/postgres-xl,lpetrov-pivotal/gpdb,ashwinstar/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,adam8157/gpdb,rvs/gpdb,Quikling/gpdb,lisakowen/gpdb,kaknikhil/gpdb,zaksoup/gpdb,edespino/gpdb,edespino/gpdb,CraigHarris/gpdb,edespino/gpdb,royc1/gpdb,kaknikhil/gpdb,Quikling/gpdb,janebeckman/gpdb,Chibin/gpdb,yazun/postgres-xl,randomtask1155/gpdb,zaksoup/gpdb,foyzur/gpdb,Chibin/gpdb,ashwinstar/gpdb,xinzweb/gpdb,atris/gpdb,0x0FFF/gpdb,chrishajas/gpdb,yuanzhao/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,techdragon/Postgres-XL,0x0FFF/gpdb,greenplum-db/gpdb,arcivanov/postgres-xl,lisakowen/gpdb,Quikling/gpdb,Quikling/gpdb,xuegang/gpdb,zaksoup/gpdb,atris/gpdb,chrishajas/gpdb,zaksoup/gpdb,kaknikhil/gpdb,Chibin/gpdb,adam8157/gpdb,ovr/postgres-xl,snaga/postgres-xl,tangp3/gpdb,rvs/gpdb,royc1/gpdb,greenplum-db/gpdb,ahachete/gpdb,kaknikhil/gpdb,Chibin/gpdb,xinzweb/gpdb,cjcjameson/gpdb,yuanzhao/gpdb,atris/gpdb,rubikloud/gpdb,rubikloud/gpdb,randomtask1155/gpdb,Postgres-XL/Postgres-XL,janebeckman/gpdb,royc1/gpdb,lintzc/gpdb,foyzur/gpdb,50wu/gpdb,ahachete/gpdb,greenplum-db/gpdb,techdragon/Postgres-XL,rvs/gpdb |
78ed645bc65bfcbf88c84c19efc0c38d2c5c1360 | bibdesk/BDSKOAIGroupServer.h | bibdesk/BDSKOAIGroupServer.h | //
// BDSKOAIGroupServer.h
// Bibdesk
//
// Created by Christiaan Hofman on 1/1/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "BDSKSearchGroup.h"
@class BDSKServerInfo;
@interface BDSKOAIGroupServer : NSObject <BDSKSearchGroupServer>
{
BDSKSearchGroup *group;
BDSKServerInfo *serverInfo;
NSString *searchTerm;
NSString *resumptionToken;
NSArray *sets;
NSString *filePath;
NSURLDownload *URLDownload;
BOOL failedDownload;
BOOL isRetrieving;
BOOL needsReset;
int availableResults;
int fetchedResults;
}
- (void)setServerInfo:(BDSKServerInfo *)info;
- (BDSKServerInfo *)serverInfo;
- (void)setSearchTerm:(NSString *)string;
- (NSString *)searchTerm;
- (void)setSets:(NSArray *)newSets;
- (NSArray *)sets;
- (void)setResumptionToken:(NSString *)newResumptionToken;
- (NSString *)resumptionToken;
- (void)resetSearch;
- (void)fetchSets;
- (void)fetch;
- (void)startDownloadFromURL:(NSURL *)theURL;
@end
| Add new header file. (or: xcode is stupid) | Add new header file. (or: xcode is stupid)
| C | bsd-3-clause | JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim |
|
2a3828f1e477561e574fb9ee4525641832e3dcd9 | make/src/config.c | make/src/config.c | #include <stdlib.h>
#include <string.h>
#include "config.h"
struct Config load_config(char *arquivo) {
}
struct Idioma load_idioma(char *idioma){
char *local_idioma;
int loaded;
strcpy(local_idioma, "local aqui");
strcat(local_idioma, idioma);
strcat(local_idioma, ".conf");
loaded = 1;
while(loaded) {
strcpy(local_idioma, "local aqui");
strcat(local_idioma, idioma);
strcat(local_idioma, ".conf");
//Abre idioma
FILE *arquivo = fopen(local_idioma, "r");
if(file) {
loaded = 0;
}
else {
printf("Arquivo de idioma não localizado\n");
printf("Will try to load the default language\n");
}
}
} | #include <stdlib.h>
#include <string.h>
#include "config.h"
struct Config load_config(char *arquivo) {
}
void load_idioma(struct Idioma *idioma, char *key, char *content){
}
void clean_idioma(struct Idioma *idioma) {
free(idioma);
}
| Change functions to handle idioma | Change functions to handle idioma
| C | apache-2.0 | ezefranca/LogiKiD-Allegro5-Game,ezefranca/LogiKiD-Allegro5-Game,ezefranca/LogiKiD-Allegro5-Game |
a4dca78e05e29151fb8d20573f4387d750c10bc3 | Paystack/PublicHeaders/PSTCKTransactionParams.h | Paystack/PublicHeaders/PSTCKTransactionParams.h | //
// PSTCKTransactionParams.h
// Paystack
//
#import <Foundation/Foundation.h>
#import "PSTCKFormEncodable.h"
/**
* Representation of a user's credit card details. You can assemble these with information that your user enters and
* then create Paystack tokens with them using an PSTCKAPIClient. @see https://paystack.com/docs/api#cards
*/
@interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable>
@property (nonatomic, copy, nonnull) NSString *email;
@property (nonatomic, nonnull) NSUInteger *amount;
@property (nonatomic, copy, nullable) NSString *reference;
@property (nonatomic, copy, nullable) NSString *subaccount;
@property (nonatomic, nullable) NSUInteger *transactionCharge;
@property (nonatomic, copy, nullable) NSString *bearer;
@property (nonatomic, copy, nullable) NSString *metadata;
@end
| //
// PSTCKTransactionParams.h
// Paystack
//
#import <Foundation/Foundation.h>
#import "PSTCKFormEncodable.h"
/**
* Representation of a user's credit card details. You can assemble these with information that your user enters and
* then create Paystack tokens with them using an PSTCKAPIClient. @see https://paystack.com/docs/api#cards
*/
@interface PSTCKTransactionParams : NSObject<PSTCKFormEncodable>
@property (nonatomic, copy, nonnull) NSString *email;
@property (nonatomic) NSUInteger amount;
@property (nonatomic, copy, nullable) NSString *reference;
@property (nonatomic, copy, nullable) NSString *subaccount;
@property (nonatomic) NSUInteger transactionCharge;
@property (nonatomic, copy, nullable) NSString *bearer;
@property (nonatomic, copy, nullable) NSString *metadata;
@end
| Make UInt safe on Transaction Params by not using pointer | Make UInt safe on Transaction Params by not using pointer
| C | mit | PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios,PaystackHQ/paystack-ios |
28621d2412f8a353d7a01d007a7811542d60ac0a | src/imap/cmd-close.c | src/imap/cmd-close.c | /* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
| /* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "common.h"
#include "commands.h"
#include "imap-expunge.h"
bool cmd_close(struct client_command_context *cmd)
{
struct client *client = cmd->client;
struct mailbox *mailbox = client->mailbox;
struct mail_storage *storage;
if (!client_verify_open_mailbox(cmd))
return TRUE;
storage = mailbox_get_storage(mailbox);
client->mailbox = NULL;
if (!imap_expunge(mailbox, NULL))
client_send_untagged_storage_error(client, storage);
else if (mailbox_sync(mailbox, 0, 0, NULL) < 0)
client_send_untagged_storage_error(client, storage);
if (mailbox_close(&mailbox) < 0)
client_send_untagged_storage_error(client, storage);
client_update_mailbox_flags(client, NULL);
client_send_tagline(cmd, "OK Close completed.");
return TRUE;
}
| Synchronize the mailbox after expunging messages to actually get them expunged. | CLOSE: Synchronize the mailbox after expunging messages to actually get them
expunged.
| C | mit | Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot |
f3b8d84988cdb8fcafe5063870a532dde78e4c31 | attempter.c | attempter.c | #include "emu.h"
static void
andflags_sr(unsigned res, uint16_t *sr)
{
*sr &= ~(SR_V | 0xfe00);
if (res & 0x8000)
*sr |= SR_N;
else
*sr &= ~SR_N;
if (res == 0) {
*sr |= SR_Z;
*sr &= ~SR_C;
} else {
*sr &= ~SR_Z;
*sr |= SR_C;
}
}
static void
addflags_sr(unsigned res, unsigned bw, uint16_t *sr)
{
unsigned sz = 16;
if (bw)
sz = 8;
if (bw == 0 && (res & 0x8000))
*sr |= SR_N;
else
*sr &= ~SR_N;
// #uctf never sets V. Only clear on arithmetic, though.
*sr &= ~SR_V;
*sr &= ~0xfe00;
#if 0
if ((res & 0x8000) ^ (orig & 0x8000))
*set |= SR_V;
#endif
if ((res & ((1 << sz) - 1)) == 0)
*sr |= SR_Z;
else
*sr &= ~SR_Z;
if (res & (1 << sz))
*sr |= SR_C;
else
*sr &= ~SR_C;
}
#include "trace_c.c"
void
inputs(unsigned idx, unsigned depthrem)
{
if (depthrem == 0) {
try();
if (unlocked) {
printf("Solved!\n");
exit(0);
}
return;
}
for (unsigned i = 0; i < 256; i++) {
Input[idx] = i;
inputs(idx + 1, depthrem - 1);
}
}
int
main(void)
{
for (unsigned i = 1; i < 7; i++) {
printf("Trying input len: %d\n", i);
InputLen = i;
inputs(0, i);
}
return 0;
}
| Add basic depth-first bruter w/ traced C | Add basic depth-first bruter w/ traced C
| C | mit | nedwill/msp430-emu-uctf,cemeyer/avr-emu,cemeyer/msp430-emu-uctf,piratejon/msp430-emu-uctf,piratejon/msp430-emu-uctf |
|
219d412d13700e86571971075128cd65c2ccd24f | 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 87
#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 88
#endif
| Update Skia milestone to 88 | Update Skia milestone to 88
Change-Id: I8d01f643e1cb7327713959ea744de3ae8c82bb6e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321520
Reviewed-by: Heather Miller <[email protected]>
Commit-Queue: Heather Miller <[email protected]>
| 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,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia |
f1c31c00a26f31c337ab37c37ea529567986bfa2 | include/gum/GlyphStyleID.h | include/gum/GlyphStyleID.h | #ifndef _GUM_GLYPH_STYLE_ID_H_
#define _GUM_GLYPH_STYLE_ID_H_
#include "gum/GlyphStyle.h"
#include <cu/cu_macro.h>
#include <cu/cu_stl.h>
namespace gum
{
class GlyphStyle;
class GlyphStyleID
{
public:
int Gen(const GlyphStyle& style);
private:
static int Hash(const GlyphStyle& style);
private:
static const int HASH_CAP = 197;
private:
int m_next_id;
std::vector<std::pair<GlyphStyle, int> > m_hash[HASH_CAP];
std::pair<GlyphStyle, int> m_last;
CU_SINGLETON_DECLARATION(GlyphStyleID)
}; // GlyphStyleID
}
#endif // _GUM_GLYPH_STYLE_ID_H_ | #ifndef _GUM_GLYPH_STYLE_ID_H_
#define _GUM_GLYPH_STYLE_ID_H_
#include "gum/GlyphStyle.h"
#include <cu/cu_macro.h>
#include <cu/cu_stl.h>
namespace gum
{
class GlyphStyle;
class GlyphStyleID
{
public:
int Gen(const GlyphStyle& style);
private:
static int Hash(const GlyphStyle& style);
private:
static const int HASH_CAP = 197;
private:
int m_next_id;
CU_VEC<std::pair<GlyphStyle, int> > m_hash[HASH_CAP];
std::pair<GlyphStyle, int> m_last;
CU_SINGLETON_DECLARATION(GlyphStyleID)
}; // GlyphStyleID
}
#endif // _GUM_GLYPH_STYLE_ID_H_ | Revert "[FIXED] not use allocator, for async draw" | Revert "[FIXED] not use allocator, for async draw"
This reverts commit 3cce0321da141d1fb8689d826fd5f5235066c977.
| C | mit | xzrunner/gum,xzrunner/gum |
89a8e62c03aa2cfe044c9023ec3bbaefb835a7df | test/profile/Posix/instrprof-get-filename-merge-mode.c | test/profile/Posix/instrprof-get-filename-merge-mode.c | // Test __llvm_profile_get_filename when the on-line merging mode is enabled.
//
// RUN: %clang_pgogen -dynamiclib -o %t.dso %p/Inputs/instrprof-get-filename-dso.c
// RUN: %clang_pgogen -o %t %s %t.dso
// RUN: env LLVM_PROFILE_FILE="%t-%m.profraw" %run %t
#include <string.h>
const char *__llvm_profile_get_filename(void);
extern const char *get_filename_from_DSO(void);
int main(int argc, const char *argv[]) {
const char *filename1 = __llvm_profile_get_filename();
const char *filename2 = get_filename_from_DSO();
// Exit with code 1 if the two filenames are the same.
return strcmp(filename1, filename2) == 0;
}
| // Test __llvm_profile_get_filename when the on-line merging mode is enabled.
//
// RUN: %clang_pgogen -fPIC -shared -o %t.dso %p/../Inputs/instrprof-get-filename-dso.c
// RUN: %clang_pgogen -o %t %s %t.dso
// RUN: env LLVM_PROFILE_FILE="%t-%m.profraw" %run %t
#include <string.h>
const char *__llvm_profile_get_filename(void);
extern const char *get_filename_from_DSO(void);
int main(int argc, const char *argv[]) {
const char *filename1 = __llvm_profile_get_filename();
const char *filename2 = get_filename_from_DSO();
// Exit with code 1 if the two filenames are the same.
return strcmp(filename1, filename2) == 0;
}
| Use -fPIC -shared in a test instead of -dynamiclib | [profile] Use -fPIC -shared in a test instead of -dynamiclib
This is more portable than -dynamiclib. Also, fix the path to an input
file that broke when the test was moved in r375315.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@375317 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
e539d64784ae5837ca6b7f424e1c6ce3540feceb | runtime/test/tasking/bug_36720.c | runtime/test/tasking/bug_36720.c | // RUN: %libomp-compile-and-run
/*
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36720
Assertion failure at kmp_runtime.cpp(1715): nthreads > 0.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(1715).
The assertion fails even with OMP_NUM_THREADS=1. If the second task is removed,
everything runs to completion. If the "omp parallel for" directives are removed
from inside the tasks, once again everything runs fine.
*/
#define N 1024
int main() {
#pragma omp task
{
#pragma omp parallel for
for (int i = 0; i < N; i++)
(void)0;
}
#pragma omp task
{
#pragma omp parallel for
for (int i = 0; i < N; ++i)
(void)0;
}
#pragma omp taskwait
return 0;
}
| // RUN: %libomp-compile-and-run
/*
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36720
Assertion failure at kmp_runtime.cpp(1715): nthreads > 0.
OMP: Error #13: Assertion failure at kmp_runtime.cpp(1715).
The assertion fails even with OMP_NUM_THREADS=1. If the second task is removed,
everything runs to completion. If the "omp parallel for" directives are removed
from inside the tasks, once again everything runs fine.
*/
#define N 1024
int main() {
#pragma omp task
{
int i;
#pragma omp parallel for
for (i = 0; i < N; i++)
(void)0;
}
#pragma omp task
{
int i;
#pragma omp parallel for
for (i = 0; i < N; ++i)
(void)0;
}
#pragma omp taskwait
return 0;
}
| Convert test for PR36720 to c89 | [test] Convert test for PR36720 to c89
GCC 4.8.5 defaults to this old C standard. I think we should make the
tests pass a newer -std=c99|c11 but that's too intrusive for now...
Differential Revision: https://reviews.llvm.org/D50084
git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@338490 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp,llvm-mirror/openmp |
01fd8208ef8d9e3a5c61c1503e2bcb0dd5067f25 | string-permutation-check/string-permutation-check/main.c | string-permutation-check/string-permutation-check/main.c | //
// main.c
// Check if two strings are permutations by checking if they have identical character counts.
//
// Created by Jack Zuban on 8/20/17.
// Copyright © 2017 Jack Zuban. All rights reserved.
//
#include <stdio.h>
#include <stdbool.h>
bool areStringsHaveSameLength(char *str1, char *str2)
{
while (*str1 && *str2) {
str1++;
str2++;
}
return (*str1 == '\0' && *str2 == '\0');
}
bool isPermutation(char *str1, char *str2)
{
bool areStringsHaveSameLength(char *str1, char *str2);
int charactersFrequency[127] = {};
if (! areStringsHaveSameLength(str1, str2)) {
return false;
}
while (*str1) {
charactersFrequency[(int) *str1]++;
str1++;
}
while (*str2) {
charactersFrequency[(int) *str2]--;
if (charactersFrequency[(int) *str2] < 0) {
return false;
}
str2++;
}
return true;
}
int main(void) {
bool isPermutation(char *str1, char *str2);
char str1[80];
char str2[80];
printf("First string: ");
fgets(str1, 79, stdin);
printf("Second string: ");
fgets(str2, 79, stdin);
printf("Strings are: %s\n", isPermutation(str1, str2) ? "permutations." : "not permutations.");
return 0;
}
| Check if two strings are permutations by checking their character counts | Check if two strings are permutations by checking their character counts
| C | mit | jack-zuban/c-practice |
|
3b879e32d7063b4b83867fac9a8c38f042a0fc2b | arch/x86_64/rsp/vmov.c | arch/x86_64/rsp/vmov.c | //
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, rsp_vect_t vt_shuffle) {
uint16_t data;
// Copy element into data
memcpy(&data, (e & 0x7) + (uint16_t *)&vt_shuffle, sizeof(uint16_t));
printf("src %d dest %d el %x data %x\n", src, dest, e, data);
fflush(stdout);
// Write out the upper part of the result.
rsp->cp2.regs[dest].e[e & 0x7] = data;
return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e);
}
| //
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, rsp_vect_t vt_shuffle) {
uint16_t data;
// Copy element into data
memcpy(&data, (e & 0x7) + (uint16_t *)&vt_shuffle, sizeof(uint16_t));
// Write out the upper part of the result.
rsp->cp2.regs[dest].e[e & 0x7] = data;
return rsp_vect_load_unshuffled_operand(rsp->cp2.regs[dest].e);
}
| Remove debug information from VMOV code | Remove debug information from VMOV code
| C | bsd-3-clause | tj90241/cen64,tj90241/cen64 |
9824060b9c83743ddf280113bc454ee482019ad0 | sys/sys/refcount.h | sys/sys/refcount.h | /*-
* Copyright (c) 2005 John Baldwin <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the author nor the names of any co-contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef __SYS_REFCOUNT_H__
#define __SYS_REFCOUNT_H__
#include <machine/atomic.h>
static __inline void
refcount_init(volatile u_int *count, u_int value)
{
*count = value;
}
static __inline void
refcount_acquire(volatile u_int *count)
{
atomic_add_acq_int(count, 1);
}
static __inline int
refcount_release(volatile u_int *count)
{
/* XXX: Should this have a rel membar? */
return (atomic_fetchadd_int(count, -1) == 1);
}
#endif /* ! __SYS_REFCOUNT_H__ */
| Add a simple reference count API that is simply a thin wrapper API around atomic operations on ints. | Add a simple reference count API that is simply a thin wrapper API around
atomic operations on ints.
Reviewed by: arch@
MFC after: 1 week
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
|
8fa7230f1fee1f68f7ae6ed03cdc72c63a8c97b2 | modules/acpi/acpi_module.c | modules/acpi/acpi_module.c | /* SPDX-License-Identifier: BSD-2-Clause */
#include <tilck/common/basic_defs.h>
#include <tilck/common/printk.h>
#include <tilck/kernel/sched.h>
#include "osl.h"
#include <3rd_party/acpi/acpi.h>
#include <3rd_party/acpi/acexcep.h>
static ACPI_TABLE_DESC acpi_tables[16];
void
early_init_acpi_module(void)
{
ACPI_STATUS rc;
rc = AcpiInitializeSubsystem();
if (rc != AE_OK)
panic("AcpiInitializeSubsystem() failed with: %d", rc);
rc = AcpiInitializeTables(acpi_tables, 16, false);
if (rc != AE_OK)
panic("AcpiInitializeTables() failed with: %d", rc);
}
| /* SPDX-License-Identifier: BSD-2-Clause */
#include <tilck/common/basic_defs.h>
#include <tilck/common/printk.h>
#include <tilck/kernel/sched.h>
#include "osl.h"
#include <3rd_party/acpi/acpi.h>
#include <3rd_party/acpi/acexcep.h>
void
early_init_acpi_module(void)
{
ACPI_STATUS rc;
rc = AcpiInitializeSubsystem();
if (rc != AE_OK)
panic("AcpiInitializeSubsystem() failed with: %d", rc);
rc = AcpiInitializeTables(NULL, 0, true);
if (rc != AE_OK)
panic("AcpiInitializeTables() failed with: %d", rc);
}
| Make AcpiInitializeTables to dynamically alloc tables | [acpi] Make AcpiInitializeTables to dynamically alloc tables
| C | bsd-2-clause | vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs,vvaltchev/experimentOs |
32df46c68c5f8756b4383b1228d17df6538ae671 | quic/common/test/TestClientUtils.h | quic/common/test/TestClientUtils.h | /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <fizz/protocol/CertificateVerifier.h>
namespace quic::test {
class TestCertificateVerifier : public fizz::CertificateVerifier {
public:
~TestCertificateVerifier() override = default;
void verify(const std::vector<std::shared_ptr<const fizz::PeerCert>>&)
const override {
return;
}
[[nodiscard]] std::vector<fizz::Extension> getCertificateRequestExtensions()
const override {
return std::vector<fizz::Extension>();
}
};
inline std::unique_ptr<fizz::CertificateVerifier>
createTestCertificateVerifier() {
return std::make_unique<TestCertificateVerifier>();
}
} // namespace quic::test
| /*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <fizz/protocol/CertificateVerifier.h>
namespace quic::test {
class TestCertificateVerifier : public fizz::CertificateVerifier {
public:
~TestCertificateVerifier() override = default;
std::shared_ptr<const folly::AsyncTransportCertificate> verify(
const std::vector<std::shared_ptr<const fizz::PeerCert>>& certs)
const override {
return certs.front();
}
[[nodiscard]] std::vector<fizz::Extension> getCertificateRequestExtensions()
const override {
return std::vector<fizz::Extension>();
}
};
inline std::unique_ptr<fizz::CertificateVerifier>
createTestCertificateVerifier() {
return std::make_unique<TestCertificateVerifier>();
}
} // namespace quic::test
| Replace fizz server cert with leaf cert returned from verification | Replace fizz server cert with leaf cert returned from verification
Summary: Added code to return the leaf cert after successfully verification of the server cert. The returned cert is then used for replacing the server cert.
Reviewed By: AjanthanAsogamoorthy
Differential Revision: D35898220
fbshipit-source-id: 8f542471a711d5aa62d0aad4c1d12b10c2209744
| C | mit | facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst,facebookincubator/mvfst |
b4c1779d143c3555a61ab588589c68549117fea6 | subprojects/docs/src/samples/native-binaries/prebuilt/3rd-party-lib/util/src/util/headers/util.h | subprojects/docs/src/samples/native-binaries/prebuilt/3rd-party-lib/util/src/util/headers/util.h | #ifdef _WIN32
#define LIB_FUNC __declspec(dllimport)
#else
#define LIB_FUNC
#endif
void LIB_FUNC printBuildType();
| #ifdef _WIN32
#define LIB_FUNC __declspec(dllexport)
#else
#define LIB_FUNC
#endif
void LIB_FUNC printBuildType();
| Use correct syntax for windows DLL export | Use correct syntax for windows DLL export
| C | apache-2.0 | blindpirate/gradle,robinverduijn/gradle,gradle/gradle,robinverduijn/gradle,lsmaira/gradle,gradle/gradle,blindpirate/gradle,gradle/gradle,gstevey/gradle,robinverduijn/gradle,robinverduijn/gradle,robinverduijn/gradle,blindpirate/gradle,robinverduijn/gradle,robinverduijn/gradle,gstevey/gradle,lsmaira/gradle,lsmaira/gradle,gstevey/gradle,lsmaira/gradle,gradle/gradle,blindpirate/gradle,lsmaira/gradle,lsmaira/gradle,gradle/gradle,robinverduijn/gradle,gstevey/gradle,gstevey/gradle,robinverduijn/gradle,gstevey/gradle,lsmaira/gradle,blindpirate/gradle,gradle/gradle,gstevey/gradle,blindpirate/gradle,robinverduijn/gradle,gstevey/gradle,gradle/gradle,lsmaira/gradle,robinverduijn/gradle,blindpirate/gradle,lsmaira/gradle,blindpirate/gradle,gradle/gradle,gradle/gradle,lsmaira/gradle,blindpirate/gradle,gradle/gradle,blindpirate/gradle,gstevey/gradle |
191574d42fc281cde241ae33013c9801336e8758 | net/spdy/spdy_http_utils.h | net/spdy/spdy_http_utils.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpResponseInfo;
class HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock.
// |info| output parameter for the HttpResponseInfo.
// Returns true if successfully converted. False if there was a failure
// or if the SpdyHeaderBlock was invalid.
bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers,
HttpResponseInfo* response);
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
spdy::SpdyHeaderBlock* headers,
bool direct);
} // namespace net
#endif // NET_SPDY_SPDY_HTTP_UTILS_H_
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_SPDY_SPDY_HTTP_UTILS_H_
#define NET_SPDY_SPDY_HTTP_UTILS_H_
#pragma once
#include "net/spdy/spdy_framer.h"
namespace net {
class HttpResponseInfo;
struct HttpRequestInfo;
// Convert a SpdyHeaderBlock into an HttpResponseInfo.
// |headers| input parameter with the SpdyHeaderBlock.
// |info| output parameter for the HttpResponseInfo.
// Returns true if successfully converted. False if there was a failure
// or if the SpdyHeaderBlock was invalid.
bool SpdyHeadersToHttpResponse(const spdy::SpdyHeaderBlock& headers,
HttpResponseInfo* response);
// Create a SpdyHeaderBlock for a Spdy SYN_STREAM Frame from
// a HttpRequestInfo block.
void CreateSpdyHeadersFromHttpRequest(const HttpRequestInfo& info,
spdy::SpdyHeaderBlock* headers,
bool direct);
} // namespace net
#endif // NET_SPDY_SPDY_HTTP_UTILS_H_
| Change forward declaration of HttpRequestInfo from class to struct to fix build breakage. | Change forward declaration of HttpRequestInfo from class to struct to
fix build breakage.
BUG=none
TEST=none
git-svn-id: http://src.chromium.org/svn/trunk/src@59584 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: cb97ca6c3e6d589f6d40ad33fdc8afb7a19c6999 | C | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser |
9852e15f303363de9b323a4f60adbab92daabdd8 | tests/regression/36-apron/99-mine14-strengthening.c | tests/regression/36-apron/99-mine14-strengthening.c | // SKIP PARAM: --set ana.activated[+] apron --set ana.path_sens[+] threadflag --set ana.activated[-] threadJoins --enable ana.apron.threshold_widening --set ana.apron.privatization protection --enable ana.apron.strengthening
// Fig 5a from Miné 2014
// Example for join strengthening
#include <pthread.h>
#include <stdio.h>
int x;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
int top;
while(top) {
pthread_mutex_lock(&mutex);
if(x<100) {
x++;
}
pthread_mutex_unlock(&mutex);
}
return NULL;
}
int main(void) {
int top, top2;
pthread_t id;
pthread_t id2;
pthread_create(&id, NULL, t_fun, NULL);
pthread_create(&id2, NULL, t_fun, NULL);
pthread_mutex_lock(&mutex);
assert(x <= 100);
pthread_mutex_unlock(&mutex);
return 0;
}
| Add example that needs Apron heterogeneous join strengthening | Add example that needs Apron heterogeneous join strengthening
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
c2cf47ebbd82bf050d338c73f2d9bcd2de3976d2 | main.c | main.c | #include <stdio.h>
#include <string.h>
// Declare functions
void get_input();
// Global variables
char text_input[32];
int running = 1;
// Main Section
int main() {
while (running == 1) {
if (strcmp(text_input, "q") == 0) {
running = 0;
printf("Goodbye!\n");
}
else {
get_input();
printf("The message is %s\n", text_input);
}
}
return 0;
}
// Define functions
void get_input() {
// Get the string
printf("Please enter a number or (q) to quit\n");
fgets(text_input, 32, stdin);
// Get the length of the string
int length = strlen(text_input) -1;
// Remove the newline at the end of the string if it existss
if (text_input[length] == '\n') {
text_input[length] = '\0';
}
}
| #include <stdio.h>
#include <string.h>
// Declare functions
void get_input();
int is_valid_number();
// Global variables
char text_input[32];
int running = 1;
// Main Section
int main() {
while (running == 1) {
if (strcmp(text_input, "q") == 0) {
running = 0;
printf("Goodbye!\n");
}
else {
get_input();
if(is_valid_number() == 0) {
printf("The message is %s\n", text_input);
}
}
}
return 0;
}
// Define functions
void get_input() {
// Get the string
printf("Please enter a number or (q) to quit\n");
fgets(text_input, 32, stdin);
// Get the length of the string
int length = strlen(text_input) -1;
// Remove the newline at the end of the string if it existss
if (text_input[length] == '\n') {
text_input[length] = '\0';
}
}
// Check if string is a valid number
int is_valid_number() {
char *ptr;
long number;
number = strtol(text_input, &ptr, 10);
if (strlen(ptr) == 0) {
return 0;
} else {
printf("Not a valid number\n");
return 1;
}
}
| Create function to check if text_input is a valid number | Create function to check if text_input is a valid number
| C | mit | julian-labuschagne/number_game |
c2e36b8f4bcbd3a8bec4d5d4bfc6d5a5a669b5c6 | 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 <stdarg.h>
#include <math.h>
#include <stdbool.h>
#ifdef _WIN32
#include <windows.h>
#include <time.h>
ssize_t pread(int fd, void *buf, size_t count, uint64_t offset);
#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);
char *str_concat_many(int count, ...);
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 <stdarg.h>
#include <math.h>
#include <stdbool.h>
#ifdef _WIN32
#include <windows.h>
#include <time.h>
#include <io.h>
ssize_t pread(int fd, void *buf, size_t count, uint64_t offset);
#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);
char *str_concat_many(int count, ...);
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 */
| Include io.h for mingw builds | Include io.h for mingw builds
| C | lgpl-2.1 | braydonf/libstorj,braydonf/libstorj-c,Storj/libstorj-c,braydonf/libstorj-c,Storj/libstorj-c,aleitner/libstorj-c,aleitner/libstorj-c,braydonf/libstorj |
8c47da315e5e6f11bb43c8fa66a2a66fbdaf7b9d | percolation/main.c | percolation/main.c | /* headers */
#include <stdlib.h>
#include <time.h>
#include "lattice.h"
#include "clusters.h"
#include "io_helpers.h"
/* main body function */
int main(int argc, char ** argv)
{
int L; /* square lattice size */
double p; /* occupation probability of each lattice site */
int *lattice; /* lattice array */
/* read input arguments; if none provided fallback to default values */
if (argc == 3) {
L = atoi(argv[1]);
p = atof(argv[2]);
} else {
L = 10;
p = 0.4;
}
/* initialize random number generator seed */
srand(time(NULL));
/* allocate lattice */
lattice = allocate_lattice(L, L);
/* populate lattice with given probability */
populate_lattice(p, lattice, L, L);
/* print the generated lattice for visualization */
print_lattice(lattice, L, L, 1);
/* label clusters and print result */
label_clusters(lattice, L, L);
print_lattice(lattice, L, L, 1);
/* free memory before leaving */
free(lattice);
return 0;
}
| /* headers */
#include <stdlib.h>
#include <time.h>
#include "lattice.h"
#include "clusters.h"
#include "io_helpers.h"
/* main body function */
int main(int argc, char ** argv)
{
int L; /* square lattice size */
double p; /* occupation probability of each lattice site */
int *lattice; /* lattice array */
unsigned int random_seed; /* random number generator seed */
/* read input arguments; if none provided fallback to default values */
if (argc == 3 || argc == 4) {
L = atoi(argv[1]);
p = atof(argv[2]);
if (argc == 4) {
random_seed = atoi(argv[3]);
} else {
random_seed = (unsigned int)time(NULL);
}
} else {
L = 10;
p = 0.4;
random_seed = (unsigned int)time(NULL);
}
/* initialize random number generator seed */
srand(random_seed);
/* allocate lattice */
lattice = allocate_lattice(L, L);
/* populate lattice with given probability */
populate_lattice(p, lattice, L, L);
/* print the generated lattice for visualization */
print_lattice(lattice, L, L, 1);
/* label clusters and print result */
label_clusters(lattice, L, L);
print_lattice(lattice, L, L, 1);
/* free memory before leaving */
free(lattice);
return 0;
}
| Allow passing RNG seed as program argument | [percolation] Allow passing RNG seed as program argument
| C | mit | cerisola/fiscomp,cerisola/fiscomp,cerisola/fiscomp |
ffe8c67712cb6a7286de055ecf7ecf90c0984831 | ch1/e01-01_hello.c | ch1/e01-01_hello.c | /*
* Hello World Program
* 2013-05-27
*/
#include <stdio.h>
int
main()
{
printf("Hello, World!\g");
return 0;
}
| /*
* Hello World Program
* 2013-05-27
*/
#include <stdio.h>
int
main()
{
printf("Hello, World!\n");
return 0;
}
| Add the BSD make build machinery | Add the BSD make build machinery
| C | isc | chettrick/tcpl |
f83df7374019f922bd30cb751b1206c5f934f7d1 | 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
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
// Needed until we fix https://bug.skia.org/2440
#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
#define SK_SUPPORT_LEGACY_EMBOSSMASKFILTER
#define SK_SUPPORT_LEGACY_AA_CHOICE
#define SK_SUPPORT_LEGACY_AAA_CHOICE
#define SK_DISABLE_DAA // skbug.com/6886
#endif // SkUserConfigManual_DEFINED
| /*
* 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
// Staging flags
#define SK_LEGACY_PATH_ARCTO_ENDPOINT
#define SK_SUPPORT_LEGACY_MATRIX_IMAGEFILTER
// 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
| Add flag to stage api change | Add flag to stage api change
Test: make
Bug: 178700363
Change-Id: I8b22d1436260eafca1819e3210b4bea559be7142
| 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 |
259c5e15797f2de45550a037ecc64975a86c4fd9 | sys/sun4v/include/clock.h | sys/sun4v/include/clock.h | /*-
* Copyright (c) 2001 Jake Burkholder.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
extern u_long tick_increment;
extern u_long tick_freq;
extern u_long tick_MHz;
extern int adjkerntz;
extern int wall_cmos_clock;
#endif /* !_MACHINE_CLOCK_H_ */
| /*-
* Copyright (c) 2001 Jake Burkholder.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _MACHINE_CLOCK_H_
#define _MACHINE_CLOCK_H_
extern u_long tick_increment;
extern u_long tick_freq;
extern u_long tick_MHz;
#endif /* !_MACHINE_CLOCK_H_ */
| Remove two variables which are handled MI now. | Remove two variables which are handled MI now.
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
ad8eee60c7ece602d54a98a904d04455a63e979b | cli/main.c | cli/main.c | #include <stdio.h>
#include "ot.h"
#include "otdecode.h"
int main(int argc, const char * argv[])
{
char buf[1024];
fputs("Operation 1: ", stdout);
fgets(buf, 1024, stdin);
char p[64];
ot_op* op = ot_new_op(0, p);
ot_decode_err err = ot_decode(op, buf);
if (err != OT_ERR_NONE) {
puts("Error when decoding JSON.");
return err;
}
char buf2[1024];
fputs("Operation 2: ", stdout);
fgets(buf2, 1024, stdin);
ot_op* op2 = ot_new_op(0, p);
err = ot_decode(op2, buf2);
if (err != OT_ERR_NONE) {
puts("Error when decoding JSON.");
return err;
}
ot_op* composed = ot_compose(op, op2);
char* snapshot = ot_snapshot(composed);
puts("Composed: ");
puts(snapshot);
return 0;
}
| #include <stdio.h>
#include "ot.h"
#include "compose.h"
#include "otdecode.h"
int main(int argc, const char * argv[])
{
char buf[1024];
fputs("Operation 1: ", stdout);
fgets(buf, 1024, stdin);
char p[64];
ot_op* op = ot_new_op(0, p);
ot_decode_err err = ot_decode(op, buf);
if (err != OT_ERR_NONE) {
puts("Error when decoding JSON.");
return err;
}
char buf2[1024];
fputs("Operation 2: ", stdout);
fgets(buf2, 1024, stdin);
ot_op* op2 = ot_new_op(0, p);
err = ot_decode(op2, buf2);
if (err != OT_ERR_NONE) {
puts("Error when decoding JSON.");
return err;
}
ot_op* composed = ot_compose(op, op2);
char* snapshot = ot_snapshot(composed);
puts("Composed: ");
puts(snapshot);
return 0;
}
| Add compose header to CLI | Add compose header to CLI
| C | apache-2.0 | polyphony-ot/libot |
d31bc5e3c46005c363c656c31436a29ddd975c7f | test/srcs/11-omp-for.c | test/srcs/11-omp-for.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double sinTable[256];
#pragma omp parallel for
for(int n=0; n<256; ++n)
sinTable[n] = sin(2 * M_PI * n / 256);
// the table is now initialized
}
// RUN: clang -fopenmp -c -g -emit-llvm %s -o %t.1.bc
// RUN: opt -instnamer %t.1.bc -o %t.bc
// RUN: llvm-epp %t.bc -o %t.profile
// RUN: clang -fopenmp -v %t.epp.bc -o %t-exec -lepp-rt -lpthread -lm 2> %t.compile
// RUN: %t-exec > %t.log
// RUN: llvm-epp -p=%t.profile %t.bc 2> %t.decode
// RUN: diff -aub %t.profile %s.txt
| #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double sinTable[256];
#pragma omp parallel for
for(int n=0; n<256; ++n)
sinTable[n] = sin(2 * M_PI * n / 256);
// the table is now initialized
}
// RUN: clang -fopenmp -c -g -emit-llvm %s -o %t.1.bc
// RUN: opt -instnamer %t.1.bc -o %t.bc
// RUN: llvm-epp %t.bc -o %t.profile
// RUN: clang -fopenmp -v %t.epp.bc -o %t-exec -lepp-rt -lpthread -lm 2> %t.compile
// RUN: OMP_NUM_THREADS=4 %t-exec > %t.log
// RUN: llvm-epp -p=%t.profile %t.bc 2> %t.decode
// RUN: diff -aub %t.profile %s.txt
| Fix test case 11 to set the number of omp threads and make it portable | Fix test case 11 to set the number of omp threads and make it portable
| C | mit | sfu-arch/llvm-epp,sfu-arch/llvm-epp,sfu-arch/llvm-epp |
99f7c07130859fd5ee7b0343e9dedcde48ca9f02 | extension/kill.c | extension/kill.c | /* A simple Lua module to suspend this process. */
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <lua.h>
#include <lauxlib.h>
int l_kill(lua_State *L)
{
/* Send ourselves the terminal stop signal, equivalent to normally
* pressing ^Z. */
kill(0, SIGTSTP);
return 0;
}
/* The module's functions */
struct luaL_Reg functions[] = {
{ "kill", l_kill },
{ 0, 0 },
};
/* Called when importing this module */
int luaopen_kill(lua_State *L)
{
luaL_newlib(L, functions);
return 1;
}
| /* A simple Lua module to suspend this process. */
#include <sys/types.h>
#include <signal.h>
#include <unistd.h>
#include <lua.h>
#include <lauxlib.h>
int l_kill(lua_State *L)
{
/* Send ourselves the terminal stop signal, equivalent to normally
* pressing ^Z. */
kill(0, SIGTSTP);
/* We may have been restored after a window change; pretend we've
* received a WINCH. */
kill(0, SIGWINCH);
return 0;
}
/* The module's functions */
struct luaL_Reg functions[] = {
{ "kill", l_kill },
{ 0, 0 },
};
/* Called when importing this module */
int luaopen_kill(lua_State *L)
{
luaL_newlib(L, functions);
return 1;
}
| Handle the terminal resizing while suspended, by sending ourselves a SIGWINCH after restoring. | Handle the terminal resizing while suspended, by sending ourselves a
SIGWINCH after restoring.
| C | mit | erig0/textadept-vi,jugglerchris/textadept-vi,jugglerchris/textadept-vi |
fdbf1d2a3ebd2245348063db4f8eed3afb41b508 | mudlib/mud/home/Text/sys/verb/ooc/wiz/system/onuke.c | mudlib/mud/home/Text/sys/verb/ooc/wiz/system/onuke.c | /*
* This file is part of Kotaka, a mud library for DGD
* http://github.com/shentino/kotaka
*
* Copyright (C) 2013 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/paths.h>
#include <account/paths.h>
#include <text/paths.h>
#include <game/paths.h>
inherit LIB_RAWVERB;
void main(object actor, string args)
{
object first;
object obj;
object proxy;
if (query_user()->query_class() < 3) {
send_out("Only an administrator can nuke a subsystem\n");
return;
}
first = KERNELD->first_link(args);
if (!first) {
send_out(args + " owns no objects.\n");
return;
}
proxy = PROXYD->get_proxy(query_user()->query_name());
do {
proxy->destruct_object(first);
} while (first = KERNELD->first_link(args));
}
| Add command to nuke all objects owned by a specific owner | Add command to nuke all objects owned by a specific owner
| C | agpl-3.0 | shentino/kotaka,shentino/kotaka,shentino/kotaka |
|
ec699639ae10c455eb224826e9e46610b8b571f7 | test/wasm/stdio/fseek.c | test/wasm/stdio/fseek.c | #include <sys/stat.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
static long posix(const char path[static 1])
{
struct stat metadata;
assert(!stat(path, &metadata));
return metadata.st_size;
}
static long standard(const char path[static 1])
{
FILE* stream = fopen(path, "rb");
fseek(stream, 0, SEEK_END);
long position = ftell(stream);
fclose(stream);
return position;
}
int main(void)
{
const char path[] = "metallic.a";
assert(posix(path) == standard(path));
assert(!errno);
}
| Test standard C interface for ll?seek | Test standard C interface for ll?seek
| C | mit | jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic,jdh8/metallic |
|
e2ee2dab59a8367c3a94f0d7ed74d29e5236b16c | include/stdlib.h | include/stdlib.h | /*
* Copyright (C) 2014, Galois, Inc.
* This sotware is distributed under a standard, three-clause BSD license.
* Please see the file LICENSE, distributed with this software, for specific
* terms and conditions.
*/
#ifndef MINLIBC_STDLIB_H
#define MINLIBC_STDLIB_H
#define NULL 0
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
typedef unsigned long int size_t;
double atof(const char *nptr);
int atoi(const char *nptr);
long int strtol(const char *nptr, char **endptr, int base);
char *getenv(const char *name);
void abort(void);
void exit(int status);
void *malloc(size_t size);
void *realloc(void *ptr, size_t size);
void *calloc(size_t nmemb, size_t size);
void free(void *ptr);
int mkstemp(char *template);
void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
int putenv(char *str);
int unsetenv(const char *name);
#endif
| /*
* Copyright (C) 2014, Galois, Inc.
* This sotware is distributed under a standard, three-clause BSD license.
* Please see the file LICENSE, distributed with this software, for specific
* terms and conditions.
*/
#ifndef MINLIBC_STDLIB_H
#define MINLIBC_STDLIB_H
#define NULL 0
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
typedef unsigned long int size_t;
double atof(const char *nptr);
int atoi(const char *nptr);
long int strtol(const char *nptr, char **endptr, int base);
char *getenv(const char *name);
void abort(void);
void exit(int status);
void *malloc(size_t size);
void *realloc(void *ptr, size_t size);
void *calloc(size_t nmemb, size_t size);
void free(void *ptr);
int mkstemp(char *template);
void *bsearch(const void *, const void *, size_t, size_t,
int (*)(const void *, const void *));
int putenv(char *str);
int unsetenv(const char *name);
int abs(int j);
#endif
| Add a prototype for abs(). | Add a prototype for abs().
| C | bsd-3-clause | GaloisInc/minlibc,GaloisInc/minlibc |
ff603e2fa35e8e1ee2744e5ed5817845fdcca666 | server/types/JoinableImpl.h | server/types/JoinableImpl.h | #ifndef JOINABLE_IMPL
#define JOINABLE_IMPL
#include "joinable_types.h"
#include "types/MediaObjectImpl.h"
using ::com::kurento::kms::api::Joinable;
using ::com::kurento::kms::api::Direction;
namespace com { namespace kurento { namespace kms {
class JoinableImpl : public virtual Joinable, public virtual MediaObjectImpl {
public:
JoinableImpl();
~JoinableImpl() throw() {};
void join(const JoinableImpl& to, const Direction::type direction);
void unjoin(const JoinableImpl& to);
std::vector<Joinable> &getJoinees();
std::vector<Joinable> &getDirectionJoiness(const Direction::type direction);
};
}}} // com::kurento::kms
#endif /* JOINABLE_IMPL */ | #ifndef JOINABLE_IMPL
#define JOINABLE_IMPL
#include "joinable_types.h"
#include "types/MediaObjectImpl.h"
using ::com::kurento::kms::api::Joinable;
using ::com::kurento::kms::api::Direction;
using ::com::kurento::kms::api::StreamType;
namespace com { namespace kurento { namespace kms {
class JoinableImpl : public virtual Joinable, public virtual MediaObjectImpl {
public:
JoinableImpl();
~JoinableImpl() throw() {};
std::vector<StreamType::type> getStreams(const Joinable& joinable);
void join(const JoinableImpl& to, const Direction::type direction);
void unjoin(const JoinableImpl& to);
void join(const JoinableImpl& to, const StreamType::type stream, const Direction::type direction);
void unjoin(const JoinableImpl& to, const StreamType::type stream);
std::vector<Joinable> &getJoinees();
std::vector<Joinable> &getDirectionJoiness(const Direction::type direction);
std::vector<Joinable> &getJoinees(const StreamType::type stream);
std::vector<Joinable> &getDirectionJoiness(const StreamType::type stream, const Direction::type direction);
};
}}} // com::kurento::kms
#endif /* JOINABLE_IMPL */ | Add methods to joinable to handle streams | Add methods to joinable to handle streams
| C | lgpl-2.1 | shelsonjava/kurento-media-server,mparis/kurento-media-server,Kurento/kurento-media-server,Kurento/kurento-media-server,lulufei/kurento-media-server,lulufei/kurento-media-server,mparis/kurento-media-server,TribeMedia/kurento-media-server,todotobe1/kurento-media-server,shelsonjava/kurento-media-server,todotobe1/kurento-media-server,TribeMedia/kurento-media-server |
82941052dcbfa55dc20a02e0bb329e693d546477 | proctor/include/pcl/proctor/proposer.h | proctor/include/pcl/proctor/proposer.h | #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
float votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
| #ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
double votes;
};
class Proposer {
public:
typedef boost::shared_ptr<Proposer> Ptr;
typedef boost::shared_ptr<const Proposer> ConstPtr;
typedef boost::shared_ptr<std::map<std::string, Entry> > DatabasePtr;
typedef boost::shared_ptr<const std::map<std::string, Entry> > ConstDatabasePtr;
Proposer()
{}
void
setDatabase(const DatabasePtr database)
{
database_ = database;
}
virtual void
getProposed(int max_num, Entry &query, std::vector<std::string> &input, std::vector<std::string> &output) = 0;
virtual void
selectBestCandidates(int max_num, vector<Candidate> &ballot, std::vector<std::string> &output);
protected:
DatabasePtr database_;
};
}
}
#endif
| Change votes to use double. | Change votes to use double.
git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@4320 a9d63959-f2ad-4865-b262-bf0e56cfafb6
| C | bsd-3-clause | fanxiaochen/mypcltest,nikste/pcl,nh2/pcl,3dtof/pcl,stfuchs/pcl,ipa-rmb/pcl,chenxingzhe/pcl,cascheberg/pcl,msalvato/pcl_kinfu_highres,KevenRing/vlp,v4hn/pcl,stefanbuettner/pcl,shivmalhotra/pcl,stefanbuettner/pcl,msalvato/pcl_kinfu_highres,RufaelDev/pcc-mp3dg,jakobwilm/pcl,lydhr/pcl,stfuchs/pcl,LZRS/pcl,LZRS/pcl,srbhprajapati/pcl,RufaelDev/pcc-mp3dg,3dtof/pcl,KevenRing/pcl,jeppewalther/kinfu_segmentation,mschoeler/pcl,starius/pcl,shyamalschandra/pcl,zavataafnan/pcl-truck,jakobwilm/pcl,fskuka/pcl,lydhr/pcl,chenxingzhe/pcl,damienjadeduff/pcl,locnx1984/pcl,cascheberg/pcl,jeppewalther/kinfu_segmentation,KevenRing/pcl,KevenRing/pcl,stefanbuettner/pcl,srbhprajapati/pcl,krips89/pcl_newfeatures,starius/pcl,krips89/pcl_newfeatures,nikste/pcl,kanster/pcl,pkuhto/pcl,MMiknis/pcl,jeppewalther/kinfu_segmentation,chenxingzhe/pcl,starius/pcl,wgapl/pcl,DaikiMaekawa/pcl,chenxingzhe/pcl,fskuka/pcl,ResByte/pcl,raydtang/pcl,KevenRing/pcl,the-glu/pcl,chatchavan/pcl,shivmalhotra/pcl,Tabjones/pcl,kanster/pcl,v4hn/pcl,jakobwilm/pcl,raydtang/pcl,cascheberg/pcl,closerbibi/pcl,drmateo/pcl,raydtang/pcl,mikhail-matrosov/pcl,stfuchs/pcl,drmateo/pcl,mikhail-matrosov/pcl,lydhr/pcl,fanxiaochen/mypcltest,KevenRing/vlp,soulsheng/pcl,ResByte/pcl,KevenRing/vlp,ipa-rmb/pcl,Nerei/pcl_old_repo,srbhprajapati/pcl,v4hn/pcl,DaikiMaekawa/pcl,damienjadeduff/pcl,Tabjones/pcl,closerbibi/pcl,damienjadeduff/pcl,ResByte/pcl,zhangxaochen/pcl,chatchavan/pcl,locnx1984/pcl,shivmalhotra/pcl,raydtang/pcl,chenxingzhe/pcl,Tabjones/pcl,wgapl/pcl,RufaelDev/pcc-mp3dg,v4hn/pcl,zhangxaochen/pcl,simonleonard/pcl,KevenRing/pcl,sbec/pcl,starius/pcl,jeppewalther/kinfu_segmentation,wgapl/pcl,v4hn/pcl,closerbibi/pcl,DaikiMaekawa/pcl,fanxiaochen/mypcltest,locnx1984/pcl,mikhail-matrosov/pcl,closerbibi/pcl,soulsheng/pcl,stefanbuettner/pcl,lydhr/pcl,zhangxaochen/pcl,shyamalschandra/pcl,jakobwilm/pcl,pkuhto/pcl,lebronzhang/pcl,krips89/pcl_newfeatures,Tabjones/pcl,MMiknis/pcl,zavataafnan/pcl-truck,shyamalschandra/pcl,Tabjones/pcl,lebronzhang/pcl,zhangxaochen/pcl,ipa-rmb/pcl,zhangxaochen/pcl,MMiknis/pcl,Nerei/pcl_old_repo,simonleonard/pcl,wgapl/pcl,soulsheng/pcl,pkuhto/pcl,soulsheng/pcl,drmateo/pcl,msalvato/pcl_kinfu_highres,wgapl/pcl,stfuchs/pcl,lebronzhang/pcl,locnx1984/pcl,jeppewalther/kinfu_segmentation,ResByte/pcl,LZRS/pcl,fskuka/pcl,DaikiMaekawa/pcl,stfuchs/pcl,ipa-rmb/pcl,lebronzhang/pcl,ResByte/pcl,LZRS/pcl,fanxiaochen/mypcltest,kanster/pcl,nh2/pcl,damienjadeduff/pcl,drmateo/pcl,kanster/pcl,mikhail-matrosov/pcl,sbec/pcl,KevenRing/vlp,sbec/pcl,stefanbuettner/pcl,shyamalschandra/pcl,nikste/pcl,shangwuhencc/pcl,cascheberg/pcl,fskuka/pcl,RufaelDev/pcc-mp3dg,chatchavan/pcl,the-glu/pcl,nikste/pcl,the-glu/pcl,pkuhto/pcl,drmateo/pcl,MMiknis/pcl,chatchavan/pcl,cascheberg/pcl,nh2/pcl,MMiknis/pcl,simonleonard/pcl,zavataafnan/pcl-truck,krips89/pcl_newfeatures,raydtang/pcl,jakobwilm/pcl,fskuka/pcl,3dtof/pcl,lebronzhang/pcl,closerbibi/pcl,pkuhto/pcl,nh2/pcl,locnx1984/pcl,DaikiMaekawa/pcl,3dtof/pcl,LZRS/pcl,mschoeler/pcl,mschoeler/pcl,mikhail-matrosov/pcl,sbec/pcl,kanster/pcl,starius/pcl,fanxiaochen/mypcltest,RufaelDev/pcc-mp3dg,msalvato/pcl_kinfu_highres,damienjadeduff/pcl,mschoeler/pcl,sbec/pcl,mschoeler/pcl,krips89/pcl_newfeatures,srbhprajapati/pcl,zavataafnan/pcl-truck,shangwuhencc/pcl,simonleonard/pcl,Nerei/pcl_old_repo,soulsheng/pcl,nikste/pcl,lydhr/pcl,shangwuhencc/pcl,the-glu/pcl,ipa-rmb/pcl,KevenRing/vlp,zavataafnan/pcl-truck,srbhprajapati/pcl,the-glu/pcl,simonleonard/pcl,shivmalhotra/pcl,shangwuhencc/pcl,3dtof/pcl,shangwuhencc/pcl,shivmalhotra/pcl,shyamalschandra/pcl,Nerei/pcl_old_repo,msalvato/pcl_kinfu_highres |
7ff3d12d44a03d407f53233d1247370bd85c455b | kalarmd/compat.h | kalarmd/compat.h | /*
KDE2 compatibility for KDE Alarm Daemon and KDE Alarm Daemon GUI.
This file is part of the KDE alarm daemon.
Copyright (c) 2001 David Jarvie <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef AD_COMPAT_H
#define AD_COMPAT_H
// Compatibility with KDE 2.2
#include <qglobal.h>
#if QT_VERSION < 300
#define QPtrList QList
#define QPtrListIterator QListIterator
#endif
#include <kapp.h>
#if KDE_VERSION < 290
#define Alarm KOAlarm
#endif
#endif
| /*
KDE2 compatibility for KDE Alarm Daemon and KDE Alarm Daemon GUI.
This file is part of the KDE alarm daemon.
Copyright (c) 2001 David Jarvie <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#ifndef AD_COMPAT_H
#define AD_COMPAT_H
// Compatibility with KDE 2.2
#include <qglobal.h>
#if QT_VERSION < 300
#define QPtrList QList
#define QPtrListIterator QListIterator
#endif
#include <kapp.h>
#if KDE_VERSION < 290
#define Alarm KOAlarm
#define uid VUID
#endif
#endif
| Adjust for changes in libkcal | Adjust for changes in libkcal
svn path=/trunk/kdepim/; revision=133733
| C | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi |
0db041be3be9c84c2949a4f7eb9c3b6cd80ae97c | arch/openrisc/kernel/vmlinux.h | arch/openrisc/kernel/vmlinux.h | #ifndef __OPENRISC_VMLINUX_H_
#define __OPENRISC_VMLINUX_H_
#ifdef CONFIG_BLK_DEV_INITRD
extern char __initrd_start, __initrd_end;
extern char __initramfs_start;
#endif
extern u32 __dtb_start[];
#endif
| #ifndef __OPENRISC_VMLINUX_H_
#define __OPENRISC_VMLINUX_H_
#ifdef CONFIG_BLK_DEV_INITRD
extern char __initrd_start, __initrd_end;
#endif
extern u32 __dtb_start[];
#endif
| Remove unused declaration of __initramfs_start | openrisc: Remove unused declaration of __initramfs_start
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Jonas Bonn <[email protected]>
| C | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs |
6b08a16dbf2e47ec630fd0f1dd575e82a5feb182 | cc1/tests/test039.c | cc1/tests/test039.c |
/*
name: TEST039
description: Test of integer constants
comments: This test is done for z80 sizes
output:
F1 I
G2 F1 main
{
\
A3 I i
A4 N u
A5 W l
A6 Z ul
A7 Q ll
A8 O ull
A3 #I1 :I
A3 #I1 :I
A4 #N1 :N
A4 #N1 :N
A5 #W1 :W
A5 #W0 :W
A4 #N0 :N
A6 #Z1 :Z
A5 #W1 :W
A7 #Q0 :Q
A6 #Z0 :Z
A8 #O1 :O
A8 #O1 :O
r #I0
}
*/
int
main(void)
{
int i;
unsigned u;
long l;
unsigned long ul;
long long ll;
unsigned long long ull;
i = 1;
i = 1u;
u = 1u;
u = 1;
l = 1l;
l = 0xFFFF + 1;
u = 0xFFFF + 1;
ul = 1ul;
l = 1ul;
ll = 0xFFFFFFFF + 1;
ul = 0xFFFFFFFF + 1;
ull = 1lul;
ull = 1;
return 0;
}
| Add test for integer constants | Add test for integer constants
There are some ugly rules in C99 about the type of integer
constants, and this test try to check them.
| C | mit | k0gaMSX/kcc,k0gaMSX/scc,8l/scc,k0gaMSX/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,8l/scc |
|
3b9b66171c55dfa3e1907c6ea7f9e200652936a0 | GCMCocoaExtensions/GCMCocoaExtensions/GCMDeviceInfo.h | GCMCocoaExtensions/GCMCocoaExtensions/GCMDeviceInfo.h | //
// GCMDeviceInfo.h
// GCMCocoaExtensions
//
// Created by Jerry Hsu on 11/26/13.
// Copyright (c) 2013 GameChanger. All rights reserved.
//
#import <Foundation/Foundation.h>
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#define IOS7_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#define PRE_IOS7 SYSTEM_VERSION_LESS_THAN(@"7.0")
@interface GCMDeviceInfo : NSObject
+ (BOOL)isRetinaDisplay;
+ (BOOL)iPad;
@end
| //
// GCMDeviceInfo.h
// GCMCocoaExtensions
//
// Created by Jerry Hsu on 11/26/13.
// Copyright (c) 2013 GameChanger. All rights reserved.
//
#import <Foundation/Foundation.h>
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#define IOS7_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#define PRE_IOS7 SYSTEM_VERSION_LESS_THAN(@"7.0")
#define IOS8_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")
#define PRE_IOS8 SYSTEM_VERSION_LESS_THAN(@"8.0")
@interface GCMDeviceInfo : NSObject
+ (BOOL)isRetinaDisplay;
+ (BOOL)iPad;
@end
| Add macros to check for iOS 8 | Add macros to check for iOS 8
| C | mit | gamechanger/GCMCocoaExtensions,gamechanger/GCMCocoaExtensions,gamechanger/GCMCocoaExtensions |
b1382587216ff7fc6a3c0a664d5546c3ec9b594f | components/Echo/src/echo.c | components/Echo/src/echo.c | /*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#include <Echo.h>
#include <string.h>
void b__init(void) {
}
char * b_echo_string(char *s) {
return strdup(s);
}
int b_echo_int(int i) {
return i;
}
float b_echo_float(float f) {
return f;
}
double b_echo_double(double d) {
return d;
}
int b_echo_mix(double d) {
return d;
}
int b_echo_parameter(int pin, int *pout) {
*pout = pin;
return pin;
}
void b_increment_parameter(int *x) {
*x = *x + 1;
}
| /*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#include <Echo.h>
#include <string.h>
void b__init(void) {
}
char * b_echo_string(const char *s) {
return strdup(s);
}
int b_echo_int(int i) {
return i;
}
float b_echo_float(float f) {
return f;
}
double b_echo_double(double d) {
return d;
}
int b_echo_mix(double d) {
return d;
}
int b_echo_parameter(int pin, int *pout) {
*pout = pin;
return pin;
}
void b_increment_parameter(int *x) {
*x = *x + 1;
}
| Adjust RPC parameter qualification for CAmkES changes. | Adjust RPC parameter qualification for CAmkES changes.
| C | bsd-2-clause | seL4/camkes-apps-simple--devel |
03763a26c09855a4ebf565ea7550c9f255e26e4d | include/libtrading/proto/fast_feed.h | include/libtrading/proto/fast_feed.h | #ifndef LIBTRADING_FAST_FEED_H
#define LIBTRADING_FAST_FEED_H
#include "libtrading/proto/fast_session.h"
#include <sys/socket.h>
#include <sys/types.h>
struct fast_feed {
struct fast_session *session;
struct fast_session_cfg cfg;
u64 recv_num;
char xml[128];
char lip[32];
char sip[32];
char ip[32];
bool active;
int port;
};
static inline int socket_setopt(int sockfd, int level, int optname, int optval)
{
return setsockopt(sockfd, level, optname, (void *) &optval, sizeof(optval));
}
static inline struct fast_message *fast_feed_recv(struct fast_feed *feed, int flags)
{
return fast_session_recv(feed->session, flags);
}
int fast_feed_close(struct fast_feed *feed);
int fast_feed_open(struct fast_feed *feed);
#endif /* LIBTRADING_FAST_FEED_H */
| #ifndef LIBTRADING_FAST_FEED_H
#define LIBTRADING_FAST_FEED_H
#include "libtrading/proto/fast_session.h"
#include <sys/socket.h>
#include <sys/types.h>
struct fast_feed {
struct fast_session *session;
struct fast_session_cfg cfg;
u64 recv_num;
char xml[128];
char lip[32];
char sip[32];
char ip[32];
bool active;
int port;
};
static inline int socket_setopt(int sockfd, int level, int optname, int optval)
{
return setsockopt(sockfd, level, optname, (void *) &optval, sizeof(optval));
}
static inline struct fast_message *fast_feed_recv(struct fast_feed *feed, int flags)
{
if (feed->session->reset)
fast_session_reset(feed->session);
return fast_session_recv(feed->session, flags);
}
int fast_feed_close(struct fast_feed *feed);
int fast_feed_open(struct fast_feed *feed);
#endif /* LIBTRADING_FAST_FEED_H */
| Reset a session if implicit reset option is set | FAST: Reset a session if implicit reset option is set
Signed-off-by: Marat Stanichenko <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
| C | bsd-2-clause | jvirtanen/libtrading,divaykin/libtrading,libtrading/libtrading,mstanichenko/libtrading,divaykin/libtrading,libtrading/libtrading,svdev/libtrading,penberg/libtrading,fengzhyuan/libtrading,femtotrader/libtrading,penberg/libtrading,NunoEdgarGub1/libtrading,etoestja/libtrading,mstanichenko/libtrading,Bitcoinsulting/libtrading,jvirtanen/libtrading,fengzhyuan/libtrading,etoestja/libtrading,femtotrader/libtrading,svdev/libtrading,NunoEdgarGub1/libtrading,Bitcoinsulting/libtrading |
85dec0bf899ac18477920095ad381a7443f800b6 | cpp/log/cert_submission_handler.h | cpp/log/cert_submission_handler.h | #ifndef CERT_SUBMISSION_HANDLER_H
#define CERT_SUBMISSION_HANDLER_H
#include <string>
#include "base/macros.h"
#include "log/cert_checker.h"
#include "proto/ct.pb.h"
#include "proto/serializer.h"
#include "util/status.h"
// Parse incoming submissions, do preliminary sanity checks and pass them
// through cert checker.
// Prepare for signing by parsing the input into an appropriate
// log entry structure.
class CertSubmissionHandler {
public:
// Does not take ownership of the cert_checker.
explicit CertSubmissionHandler(const cert_trans::CertChecker* cert_checker);
// These may change |chain|.
// TODO(pphaneuf): These could return StatusOr<ct::LogEntry>.
util::Status ProcessX509Submission(cert_trans::CertChain* chain,
ct::LogEntry* entry) const;
util::Status ProcessPreCertSubmission(cert_trans::PreCertChain* chain,
ct::LogEntry* entry) const;
// For clients, to reconstruct the bytestring under the signature
// from the observed chain. Does not check whether the entry
// has valid format (i.e., does not check length limits).
static bool X509ChainToEntry(const cert_trans::CertChain& chain,
ct::LogEntry* entry);
const std::multimap<std::string, const cert_trans::Cert*>& GetRoots() const {
return cert_checker_->GetTrustedCertificates();
}
private:
const cert_trans::CertChecker* const cert_checker_;
DISALLOW_COPY_AND_ASSIGN(CertSubmissionHandler);
};
#endif
| #ifndef CERT_SUBMISSION_HANDLER_H
#define CERT_SUBMISSION_HANDLER_H
#include <string>
#include "base/macros.h"
#include "log/cert_checker.h"
#include "proto/ct.pb.h"
#include "proto/serializer.h"
#include "util/status.h"
// Parse incoming submissions, do preliminary sanity checks and pass them
// through cert checker.
// Prepare for signing by parsing the input into an appropriate
// log entry structure.
class CertSubmissionHandler {
public:
// Does not take ownership of the cert_checker.
explicit CertSubmissionHandler(const cert_trans::CertChecker* cert_checker);
// These may change |chain|.
// TODO(pphaneuf): These could return StatusOr<ct::LogEntry>.
util::Status ProcessX509Submission(cert_trans::CertChain* chain,
ct::LogEntry* entry) const;
util::Status ProcessPreCertSubmission(cert_trans::PreCertChain* chain,
ct::LogEntry* entry) const;
// For clients, to reconstruct the bytestring under the signature
// from the observed chain. Does not check whether the entry
// has valid format (i.e., does not check length limits).
static bool X509ChainToEntry(const cert_trans::CertChain& chain,
ct::LogEntry* entry);
private:
const cert_trans::CertChecker* const cert_checker_;
DISALLOW_COPY_AND_ASSIGN(CertSubmissionHandler);
};
#endif
| Remove the unused CertSubmissionHandler::GetRoots method. | Remove the unused CertSubmissionHandler::GetRoots method.
| C | apache-2.0 | taknira/certificate-transparency,taknira/certificate-transparency,kyprizel/certificate-transparency,phad/certificate-transparency,AlCutter/certificate-transparency,lexibrent/certificate-transparency,pphaneuf/certificate-transparency,grandamp/certificate-transparency,AlCutter/certificate-transparency,lexibrent/certificate-transparency,eranmes/certificate-transparency,benlaurie/certificate-transparency,grandamp/certificate-transparency,eranmes/certificate-transparency,kyprizel/certificate-transparency,kyprizel/certificate-transparency,AlCutter/certificate-transparency,katjoyce/certificate-transparency,lexibrent/certificate-transparency,katjoyce/certificate-transparency,kyprizel/certificate-transparency,eranmes/certificate-transparency,AlCutter/certificate-transparency,RJPercival/certificate-transparency,AlCutter/certificate-transparency,katjoyce/certificate-transparency,phad/certificate-transparency,katjoyce/certificate-transparency,grandamp/certificate-transparency,google/certificate-transparency,eranmes/certificate-transparency,katjoyce/certificate-transparency,kyprizel/certificate-transparency,taknira/certificate-transparency,RJPercival/certificate-transparency,eranmes/certificate-transparency,kyprizel/certificate-transparency,taknira/certificate-transparency,lexibrent/certificate-transparency,benlaurie/certificate-transparency,benlaurie/certificate-transparency,benlaurie/certificate-transparency,RJPercival/certificate-transparency,AlCutter/certificate-transparency,taknira/certificate-transparency,taknira/certificate-transparency,katjoyce/certificate-transparency,eranmes/certificate-transparency,pphaneuf/certificate-transparency,AlCutter/certificate-transparency,eranmes/certificate-transparency,google/certificate-transparency,katjoyce/certificate-transparency,RJPercival/certificate-transparency,taknira/certificate-transparency,benlaurie/certificate-transparency,google/certificate-transparency,pphaneuf/certificate-transparency,phad/certificate-transparency,grandamp/certificate-transparency,benlaurie/certificate-transparency,kyprizel/certificate-transparency,benlaurie/certificate-transparency,phad/certificate-transparency,google/certificate-transparency,pphaneuf/certificate-transparency |
b47d70c9531f082cad01e3dd0aa5f1b9827a04b7 | drivers/scsi/qla4xxx/ql4_version.h | drivers/scsi/qla4xxx/ql4_version.h | /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k1"
| /*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k2"
| Update driver version to 5.03.00-k2 | [SCSI] qla4xxx: Update driver version to 5.03.00-k2
Signed-off-by: Vikas Chaudhary <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs |
be8f4e555b466fd790726783222bc622c451e25c | tests/regression/24-octagon/17-problem-pointer.c | tests/regression/24-octagon/17-problem-pointer.c | void change(int *p) {
(*p)++;
}
int a;
int main() {
a = 5;
int *p = &a;
change(p);
assert(a - 6 == 0);
return 0;
} | Add an octagn test for handling pointers | Add an octagn test for handling pointers
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
1ceb72f88deed9c7e12ea0a2fe29fb30e4385adb | Socialize/SZSmartAlertUtils.h | Socialize/SZSmartAlertUtils.h | //
// SZSmartAlertUtils.h
// SocializeSDK
//
// Created by Nathaniel Griswold on 6/4/12.
// Copyright (c) 2012 Socialize, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SZSmartAlertUtils : NSObject
+ (BOOL)isAvailable;
+ (BOOL)handleNotification:(NSDictionary*)userInfo __attribute__((deprecated("Please use `openNotification:` (which unconditionally opens the notification), instead")));
+ (BOOL)isSocializeNotification:(NSDictionary*)userInfo;
+ (void)registerDeviceToken:(NSData*)deviceToken;
+ (BOOL)openNotification:(NSDictionary*)userInfo;
@end | //
// SZSmartAlertUtils.h
// SocializeSDK
//
// Created by Nathaniel Griswold on 6/4/12.
// Copyright (c) 2012 Socialize, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface SZSmartAlertUtils : NSObject
+ (BOOL)isAvailable;
+ (BOOL)handleNotification:(NSDictionary*)userInfo; // __attribute__((deprecated("Please use `openNotification:` (which unconditionally opens the notification), instead")));
+ (BOOL)isSocializeNotification:(NSDictionary*)userInfo;
+ (void)registerDeviceToken:(NSData*)deviceToken;
+ (BOOL)openNotification:(NSDictionary*)userInfo;
@end | Remove a deprecation for minor-minor release | Remove a deprecation for minor-minor release
| C | mit | socialize/socialize-sdk-ios,socialize/socialize-sdk-ios,socialize/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,socialize/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,socialize/socialize-sdk-ios,dontfallisleep/socialize-sdk-ios,socialize/socialize-sdk-ios |
2a68fda5672af426733fb9bb9c82bf7318cdc9ca | src/gfx/support/json.h | src/gfx/support/json.h | /*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "rapidjson/document.h"
#include "glm/glm.hpp"
namespace redc
{
inline glm::vec3 vec3_from_js(rapidjson::Value const& v) noexcept
{
return glm::vec3{v["x"].GetDouble(),v["y"].GetDouble(),v["z"].GetDouble()};
}
}
| /*
* Copyright (C) 2015 Luke San Antonio
* All rights reserved.
*/
#pragma once
#include "rapidjson/document.h"
#include "glm/glm.hpp"
namespace redc
{
inline glm::vec3 vec3_from_js_object(rapidjson::Value const& v) noexcept
{
return glm::vec3{v["x"].GetDouble(),v["y"].GetDouble(),v["z"].GetDouble()};
}
inline glm::vec3 vec3_from_js_array(rapidjson::Value const& v) noexcept
{
return glm::vec3{v[0].GetDouble(),v[1].GetDouble(),v[2].GetDouble()};
}
}
| Update / add vec3 => JSON functions | Update / add vec3 => JSON functions
Add support for array vectors like this [0.2, 12.5, 4.1]
| C | bsd-3-clause | RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine,RedCraneStudio/redcrane-engine |
05b970c5ed2b69076f340aa96724237883cff995 | sim/log2.h | sim/log2.h | #ifndef LOG2_H
#define LOG2_H
template <typename T>
#ifdef __GNUC__
__attribute__((const))
#endif
static bool IsPowerOfTwo(const T& x)
{
return (x & (x - 1)) == 0;
}
template<typename T>
#ifdef __GNUC__
__attribute__((const))
#endif
static inline unsigned ilog2(T n)
{
// returns the first power of two equal to
// or greater than n. For example ilog2(1) = 0, ilog2(4) = 2, ilog2(5) = 3
unsigned l = 0;
T r = 1;
while (r < n)
{
l++;
r *= 2;
}
return l;
}
#endif
| #ifndef LOG2_H
#define LOG2_H
template <typename T>
#ifdef __GNUC__
__attribute__((const))
#endif
static inline bool IsPowerOfTwo(T x)
{
return (x & (x - 1)) == 0;
}
template<typename T>
#ifdef __GNUC__
__attribute__((const))
#endif
static inline unsigned ilog2(T n)
{
// returns the first power of two equal to
// or greater than n. For example ilog2(1) = 0, ilog2(4) = 2, ilog2(5) = 3
unsigned l = 0;
T r = 1;
while (r < n)
{
l++;
r *= 2;
}
return l;
}
#endif
| Work around an optimization bug in IsPowerOfTwo. | Work around an optimization bug in IsPowerOfTwo.
| C | mit | Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim,Bitblade-org/mgsim |
5d70a9c23b0d34ea511b8e1705e2c9a8d6d0a435 | src/definitions.h | src/definitions.h | #pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
struct Noncopyable {
Noncopyable &operator=(const Noncopyable &) = delete;
Noncopyable(const Noncopyable &) = delete;
Noncopyable() = default;
};
| #pragma once
#include <cstdint>
using uint = unsigned int;
using u8 = uint8_t;
using u16 = uint16_t;
using s8 = int8_t;
const int GAMEBOY_WIDTH = 160;
const int GAMEBOY_HEIGHT = 144;
const int CLOCK_RATE = 4194304;
enum class Color {
Color0, /* White */
Color1, /* Light gray */
Color2, /* Dark gray */
Color3, /* Black */
};
struct Noncopyable {
Noncopyable& operator=(const Noncopyable&) = delete;
Noncopyable(const Noncopyable&) = delete;
Noncopyable() = default;
};
| Align & and * to the left always | Align & and * to the left always
| C | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
84f52e954b4baee7ad0ad243648bf61e12f2a84c | test/asan/TestCases/printf-3.c | test/asan/TestCases/printf-3.c | // RUN: %clang_asan -O2 %s -o %t
// RUN: %env_asan_opts=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// RUN: %env_asan_opts=check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s
// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// FIXME: printf is not intercepted on Windows yet.
// XFAIL: windows-msvc
#include <stdio.h>
int main() {
#ifdef _MSC_VER
// FIXME: The test raises a dialog even though it's XFAILd.
return 42;
#endif
volatile char c = '0';
volatile int x = 12;
volatile float f = 1.239;
volatile char s[] = "34";
volatile int n[1];
printf("%c %d %.3f %s%n\n", c, x, f, s, &n[1]);
return 0;
// Check that %n is sanitized.
// CHECK-ON: stack-buffer-overflow
// CHECK-ON-NOT: 0 12 1.239 34
// CHECK-OFF: 0 12 1.239 34
}
| // RUN: %clang_asan -O2 %s -o %t
// RUN: %env_asan_opts=check_printf=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// RUN: %env_asan_opts=check_printf=0 %run %t 2>&1 | FileCheck --check-prefix=CHECK-OFF %s
// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-ON %s
// FIXME: printf is not intercepted on Windows yet.
// XFAIL: windows-msvc
// New Bionic rejects %n
// https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336
// UNSUPPORTED: android
#include <stdio.h>
int main() {
#ifdef _MSC_VER
// FIXME: The test raises a dialog even though it's XFAILd.
return 42;
#endif
volatile char c = '0';
volatile int x = 12;
volatile float f = 1.239;
volatile char s[] = "34";
volatile int n[1];
printf("%c %d %.3f %s%n\n", c, x, f, s, &n[1]);
return 0;
// Check that %n is sanitized.
// CHECK-ON: stack-buffer-overflow
// CHECK-ON-NOT: 0 12 1.239 34
// CHECK-OFF: 0 12 1.239 34
}
| Disable test incompatible with new Android | [asan] Disable test incompatible with new Android
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@349705 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
1d25a02b388dbd4c22e6a9338aa96580efbc712a | crypto/openssl_bio_string.h | crypto/openssl_bio_string.h | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CRYPTO_OPENSSL_BIO_STRING_H_
#define CRYPTO_OPENSSL_BIO_STRING_H_
#include <string>
#include "crypto/crypto_export.h"
// From <openssl/bio.h>
typedef struct bio_st BIO;
namespace crypto {
// Creates a new BIO that can be used with OpenSSL's various output functions,
// and which will write all output directly into |out|. This is primarily
// intended as a utility to reduce the amount of copying and separate
// allocations when performing extensive string modifications or streaming
// within OpenSSL.
//
// Note: |out| must remain valid for the duration of the BIO.
BIO* CRYPTO_EXPORT BIO_new_string(std::string* out);
} // namespace crypto
#endif // CRYPTO_OPENSSL_BIO_STRING_H_
| // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CRYPTO_OPENSSL_BIO_STRING_H_
#define CRYPTO_OPENSSL_BIO_STRING_H_
#include <string>
#include "crypto/crypto_export.h"
// From <openssl/bio.h>
typedef struct bio_st BIO;
namespace crypto {
// Creates a new BIO that can be used with OpenSSL's various output functions,
// and which will write all output directly into |out|. This is primarily
// intended as a utility to reduce the amount of copying and separate
// allocations when performing extensive string modifications or streaming
// within OpenSSL.
//
// Note: |out| must remain valid for the duration of the BIO.
CRYPTO_EXPORT BIO* BIO_new_string(std::string* out);
} // namespace crypto
#endif // CRYPTO_OPENSSL_BIO_STRING_H_
| Fix component build with gcc 4.6 on Android. | Fix component build with gcc 4.6 on Android.
CRYPTO_EXPORT macro has to be before the non-void return type.
BUG=None
[email protected]
Review URL: https://codereview.chromium.org/296223002
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272363 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,axinging/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,ltilve/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,ltilve/chromium,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,M4sse/chromium.src,ltilve/chromium,chuan9/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,hgl888/chromium-crosswalk,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,dednal/chromium.src,Chilledheart/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,littlstar/chromium.src,jaruba/chromium.src,Chilledheart/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,M4sse/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,dednal/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,Chilledheart/chromium,littlstar/chromium.src,littlstar/chromium.src,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,Just-D/chromium-1,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk |
f505abb7da052e109a55b418dfbf3ebb0a6fd71f | PathKit/PathKit.h | PathKit/PathKit.h | //
// PathKit.h
// PathKit
//
// Created by Kyle Fuller on 20/11/2014.
// Copyright (c) 2014 Cocode. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for PathKit.
FOUNDATION_EXPORT double PathKitVersionNumber;
//! Project version string for PathKit.
FOUNDATION_EXPORT const unsigned char PathKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <PathKit/PublicHeader.h>
| //
// PathKit.h
// PathKit
//
// Created by Kyle Fuller on 20/11/2014.
// Copyright (c) 2014 Cocode. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for PathKit.
FOUNDATION_EXPORT double PathKitVersionNumber;
//! Project version string for PathKit.
FOUNDATION_EXPORT const unsigned char PathKitVersionString[];
| Remove useless comment from umbrella header | Remove useless comment from umbrella header
| C | bsd-2-clause | weby/PathKit,weby/PathKit,kylef/PathKit,RahulKatariya/PathKit,kylef/PathKit,RahulKatariya/PathKit |
cb986bca639127f4c4533b7d12a865d8d0d3b2cc | bugs/struct_copy_init_brace.c | bugs/struct_copy_init_brace.c | struct A
{
struct B
{
int i, j;
} b, c;
};
f(struct B *b)
{
struct A fine = {
.b = *b // XXX: should be no missing braces warning
};
struct A bad = {
.b = { *b }
};
}
| Copy init brace conformance example, for structs | Copy init brace conformance example, for structs
| C | mit | bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler |
|
bd1bb2f7a80f5518a7afbce3f19a547dc2fdc23a | testing/test_irf.c | testing/test_irf.c | #include <stdlib.h>
#include <glib.h>
#include "bmi/bmi_cem.h"
static void test_bmi_initialize(void) {
BMI_Model *model = (BMI_Model *)malloc(sizeof(BMI_Model));
int status;
register_bmi_cem(model);
status = model->initialize(NULL, &(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
}
static void test_bmi_update(void) {
BMI_Model *model = (BMI_Model *)malloc(sizeof(BMI_Model));
int status;
register_bmi_cem(model);
status = model->initialize(NULL, &(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
status = model->update(&(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
}
int main(int argc, char* argv[]) {
g_test_init(&argc, &argv, NULL);
g_test_add_func("/bmi/initialize", &test_bmi_initialize);
// g_test_add_func("/bmi/update", &test_bmi_update);
return g_test_run();
}
| #include <stdlib.h>
#include <glib.h>
#include "bmi/bmi_cem.h"
static void test_bmi_initialize(void) {
BMI_Model *model = (BMI_Model *)malloc(sizeof(BMI_Model));
int status;
register_bmi_cem(model);
status = model->initialize(NULL, &(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
}
static void test_bmi_update(void) {
BMI_Model *model = (BMI_Model *)malloc(sizeof(BMI_Model));
int status;
register_bmi_cem(model);
status = model->initialize(NULL, &(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
status = model->update(&(model->self));
g_assert_cmpint(status, ==, BMI_SUCCESS);
}
int main(int argc, char* argv[]) {
g_test_init(&argc, &argv, NULL);
g_test_add_func("/bmi/initialize", &test_bmi_initialize);
g_test_add_func("/bmi/update", &test_bmi_update);
return g_test_run();
}
| Add test for update function. | Add test for update function.
| C | mit | csdms-contrib/cem |
f2ec24fd42d52a52829070b5e31d9a17d145df30 | arch/microblaze/include/asm/entry.h | arch/microblaze/include/asm/entry.h | /*
* Definitions used by low-level trap handlers
*
* Copyright (C) 2008 Michal Simek
* Copyright (C) 2007 - 2008 PetaLogix
* Copyright (C) 2007 John Williams <[email protected]>
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this
* archive for more details.
*/
#ifndef _ASM_MICROBLAZE_ENTRY_H
#define _ASM_MICROBLAZE_ENTRY_H
#include <asm/percpu.h>
#include <asm/ptrace.h>
/*
* These are per-cpu variables required in entry.S, among other
* places
*/
#define PER_CPU(var) per_cpu__##var
# ifndef __ASSEMBLY__
DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
DECLARE_PER_CPU(unsigned int, SYSCALL_SAVE); /* Saved syscall number */
# endif /* __ASSEMBLY__ */
#endif /* _ASM_MICROBLAZE_ENTRY_H */
| /*
* Definitions used by low-level trap handlers
*
* Copyright (C) 2008 Michal Simek
* Copyright (C) 2007 - 2008 PetaLogix
* Copyright (C) 2007 John Williams <[email protected]>
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this
* archive for more details.
*/
#ifndef _ASM_MICROBLAZE_ENTRY_H
#define _ASM_MICROBLAZE_ENTRY_H
#include <asm/percpu.h>
#include <asm/ptrace.h>
/*
* These are per-cpu variables required in entry.S, among other
* places
*/
#define PER_CPU(var) per_cpu__##var
# ifndef __ASSEMBLY__
DECLARE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
DECLARE_PER_CPU(unsigned int, KM); /* Kernel/user mode */
DECLARE_PER_CPU(unsigned int, ENTRY_SP); /* Saved SP on kernel entry */
DECLARE_PER_CPU(unsigned int, R11_SAVE); /* Temp variable for entry */
DECLARE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */
# endif /* __ASSEMBLY__ */
#endif /* _ASM_MICROBLAZE_ENTRY_H */
| Remove unneded per cpu SYSCALL_SAVE variable | microblaze: Remove unneded per cpu SYSCALL_SAVE variable
Signed-off-by: Michal Simek <[email protected]>
| C | mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
05e7220cccf9e335700e91b14c2de91d84c6fe3d | src/keyboard-layout-observer.h | src/keyboard-layout-observer.h | #ifndef SRC_KEYBORD_LAYOUT_OBSERVER_H_
#define SRC_KEYBORD_LAYOUT_OBSERVER_H_
#include "nan.h"
using namespace v8; // NOLINT
class KeyboardLayoutObserver : public node::ObjectWrap {
public:
static void Init(Handle<Object> target);
void HandleKeyboardLayoutChanged();
private:
KeyboardLayoutObserver(NanCallback *callback);
~KeyboardLayoutObserver();
static NAN_METHOD(New);
static NAN_METHOD(GetCurrentKeyboardLayout);
NanCallback *callback;
};
#endif // SRC_KEYBORD_LAYOUT_OBSERVER_H_
| #ifndef SRC_KEYBORD_LAYOUT_OBSERVER_H_
#define SRC_KEYBORD_LAYOUT_OBSERVER_H_
#include "nan.h"
using namespace v8; // NOLINT
class KeyboardLayoutObserver : public node::ObjectWrap {
public:
static void Init(Handle<Object> target);
void HandleKeyboardLayoutChanged();
private:
KeyboardLayoutObserver(NanCallback *callback);
~KeyboardLayoutObserver();
static NAN_METHOD(New);
static NAN_METHOD(GetCurrentKeyboardLayout);
static NAN_METHOD(GetInstalledKeyboardLayouts);
NanCallback *callback;
};
#endif // SRC_KEYBORD_LAYOUT_OBSERVER_H_
| Add our new method to get the list of installed layouts | Add our new method to get the list of installed layouts
| C | mit | atom/keyboard-layout,atom/keyboard-layout,atom/keyboard-layout |
cefc69e635bdcabbf8191627913af238b9f974f2 | UIKit/UIPanGestureRecognizer+Private.h | UIKit/UIPanGestureRecognizer+Private.h | @interface UIPanGestureRecognizer (Private)
@property (setter=_setHysteresis:) BOOL _hysteresis;
@end | @interface UIPanGestureRecognizer (Private)
@property (setter=_setHysteresis:) CGFloat _hysteresis;
@property (assign, nonatomic) BOOL failsPastMaxTouches;
@end | Fix UIPanGestureRecognizer property type; add property | [UIKit] Fix UIPanGestureRecognizer property type; add property
| C | unlicense | hbang/headers,hbang/headers |
11ecac55348eb103e2cbcd25cb01178584faa57f | chrome/app/scoped_ole_initializer.h | chrome/app/scoped_ole_initializer.h | // Copyright (c) 2009 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 CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#define CHROME_APP_SCOPED_OLE_INITIALIZER_H_
// Wraps OLE initialization in a cross-platform class meant to be used on the
// stack so init/uninit is done with scoping. This class is ok for use by
// non-windows platforms; it just doesn't do anything.
#if defined(OS_WIN)
#include <ole2.h>
class ScopedOleInitializer {
public:
ScopedOleInitializer() {
int ole_result = OleInitialize(NULL);
DCHECK(ole_result == S_OK);
}
~ScopedOleInitializer() {
OleUninitialize();
}
};
#else
class ScopedOleInitializer {
public:
// Empty, this class does nothing on non-win32 systems. Empty ctor is
// necessary to avoid "unused variable" warning on gcc.
ScopedOleInitializer() { }
};
#endif
#endif // CHROME_APP_SCOPED_OLE_INITIALIZER_H_
| // Copyright (c) 2009 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 CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#define CHROME_APP_SCOPED_OLE_INITIALIZER_H_
#include "base/logging.h"
#include "build/build_config.h"
// Wraps OLE initialization in a cross-platform class meant to be used on the
// stack so init/uninit is done with scoping. This class is ok for use by
// non-windows platforms; it just doesn't do anything.
#if defined(OS_WIN)
#include <ole2.h>
class ScopedOleInitializer {
public:
ScopedOleInitializer() {
int ole_result = OleInitialize(NULL);
DCHECK(ole_result == S_OK);
}
~ScopedOleInitializer() {
OleUninitialize();
}
};
#else
class ScopedOleInitializer {
public:
// Empty, this class does nothing on non-win32 systems. Empty ctor is
// necessary to avoid "unused variable" warning on gcc.
ScopedOleInitializer() { }
};
#endif
#endif // CHROME_APP_SCOPED_OLE_INITIALIZER_H_
| Make ScopedOleInitializer work on windows if you aren't including build_config already. | Make ScopedOleInitializer work on windows if you aren't including
build_config already.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/19640
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@8835 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
9cdd7db18bcf038c1b92e45ae0ba9c846e8d3977 | test2/float/call/many_floats.c | test2/float/call/many_floats.c | // RUN: %ucc -o %t %s
// RUN: %ocheck 0 %t
// RUN: %t | %output_check 'Hello 5 2.3' 'Hello 5 2.3'
// should run without segfaulting
main()
{
printf("Hello %d %.1f\n",
5,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3); // this causes an infinite loop in glibc's printf()
printf("Hello %d %.1f\n",
5,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3,
2.3, // this causes an infinite loop in glibc's printf()
2.3); // and this causes a crash
// suspect the bug is to do with double alignment when passed as stack arguments
return 0;
}
| // RUN: %ucc -o %t %s
// RUN: %ocheck 0 %t
// RUN: %t | %output_check 'Hello 5 5.9' '7.3 8.7 10.1 11.5 12.9 14.3 15.7 17.1 18.5 19.9' 'Hello 5 15.7' '14.3 12.9 11.5 10.1 8.7 7.3 5.9 4.5 3.1 1.7 0.3'
// should run without segfaulting
main()
{
printf("Hello %d %.1f\n"
"%.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f\n",
5,
5.9,
7.3,
8.7,
10.1,
11.5,
12.9,
14.3,
15.7,
17.1,
18.5,
19.9); // this causes an infinite loop in glibc's printf()
printf("Hello %d %.1f\n"
"%.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f %.1f\n",
5,
15.7,
14.3,
12.9,
11.5,
10.1,
8.7,
7.3,
5.9,
4.5,
3.1,
1.7, // this causes an infinite loop in glibc's printf()
0.3); // and this causes a crash
// suspect the bug is to do with double alignment when passed as stack arguments
return 0;
}
| Format strings and more through test for stack floats | Format strings and more through test for stack floats
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
b004fd538d4d56202a8f226f0145ba03aeb27a69 | tensorflow_lite_support/cc/text/tokenizers/tokenizer_jni_lib.h | tensorflow_lite_support/cc/text/tokenizers/tokenizer_jni_lib.h | /* Copyright 2019 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.
==============================================================================*/
#ifndef TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
#define TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
#include <jni.h>
#include <string>
#include "tensorflow_lite_support/cc/text/tokenizers/tokenizer.h"
#include "tensorflow_lite_support/cc/utils/jni_utils.h"
namespace tflite {
namespace support {
jobjectArray nativeTokenize(JNIEnv* env, jlong handle, jstring jtext);
jintArray nativeConvertTokensToIds(JNIEnv* env, jlong handle,
jobjectArray jtokens);
} // namespace support
} // namespace tflite
#endif // TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
| /* Copyright 2019 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.
==============================================================================*/
#ifndef TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
#define TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
#include <jni.h>
#include "tensorflow_lite_support/cc/text/tokenizers/tokenizer.h"
#include "tensorflow_lite_support/cc/utils/jni_utils.h"
namespace tflite {
namespace support {
jobjectArray nativeTokenize(JNIEnv* env, jlong handle, jstring jtext);
jintArray nativeConvertTokensToIds(JNIEnv* env, jlong handle,
jobjectArray jtokens);
} // namespace support
} // namespace tflite
#endif // TENSORFLOW_LITE_SUPPORT_CC_TEXT_TOKENIZERS_TOKENIZER_JNI_LIB_H_
| Remove unused STL string include | Remove unused STL string include
PiperOrigin-RevId: 433365283
| C | apache-2.0 | tensorflow/tflite-support,tensorflow/tflite-support,tensorflow/tflite-support,tensorflow/tflite-support,tensorflow/tflite-support,tensorflow/tflite-support |
ae78b7da75216dc8b6ed457a7f6ca878faaeec06 | rbcoremidi.c | rbcoremidi.c | /*
* Copyright 2008 Markus Prinz
* Released unter an MIT licence
*
*/
#include <ruby.h>
VALUE crbCoreMidi;
void Init_rbcoremidi (void)
{
// Add the initialization code of your module here.
}
| /*
* Copyright 2008 Markus Prinz
* Released unter an MIT licence
*
*/
#include <ruby.h>
#include <CoreMIDI/CoreMIDI.h>
VALUE callback_proc = Qnil;
MIDIPortRef inPort = NULL;
MIDIClientRef client = NULL;
static void RbMIDIReadProc(const MIDIPacketList* packetList, void* readProcRefCon, void* srcConnRefCon)
{
}
void Init_rbcoremidi (void)
{
// Add the initialization code of your module here.
}
| Add skeleton for callback and a few global vars | Add skeleton for callback and a few global vars
| C | mit | cypher/rbcoremidi,cypher/rbcoremidi |
aca77f3e86ce9c380f19a4d02875023100af8c82 | StravaKit/StravaKit/StravaKit.h | StravaKit/StravaKit/StravaKit.h | //
// StravaKitOSX.h
// StravaKitOSX
//
// Created by Elmar Tampe on 04/12/14.
//
//
#import <UIKit/UIKit.h>
//! Project version number for StravaKitOSX.
FOUNDATION_EXPORT double StravaKitOSXVersionNumber;
//! Project version string for StravaKitOSX.
FOUNDATION_EXPORT const unsigned char StravaKitOSXVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <StravaKitOSX/PublicHeader.h>
| //
// StravaKit.h
// StravaKit
//
// Created by Elmar Tampe on 04/12/14.
//
//
#import <UIKit/UIKit.h>
//! Project version number for StravaKit.
FOUNDATION_EXPORT double StravaKitVersionNumber;
//! Project version string for StravaKit.
FOUNDATION_EXPORT const unsigned char StravaKitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <StravaKitOSX/PublicHeader.h>
| Fix the naming of the var's to match the actual naming. | Fix the naming of the var's to match the actual naming.
| C | mit | elmoswelt/StravaKit,elmoswelt/StravaKit |
9759b067314061deacc5474ecb5d6cc022185986 | src/Omnium.c | src/Omnium.c | /* Standard libraries */
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int distance, n_ciclists, uniforme;
if (argc != 4) {
fprintf(stderr, "USAGE: %s d n [v|u]\n", argv[0]);
return EXIT_FAILURE;
}
distance = atoi(argv[1]);
n_ciclists = atoi(argv[2]);
if (argv[3][1] != '\0') {
fprintf(stderr, "3rd argument must be 'u' or 'v'\n");
return EXIT_FAILURE;
}
switch (argv[3][0]) {
case 'u': uniforme = 1; break;
case 'v': uniforme = 0; break;
default:
fprintf(stderr, "3rd argument must be 'u' or 'v'\n");
return EXIT_FAILURE;
}
printf("d:%d n:%d uniforme:%d\n", distance, n_ciclists, uniforme);
return EXIT_SUCCESS;
}
| Create file and read options | Create file and read options
| C | apache-2.0 | renatocf/MAC0438-EP1 |
|
7c0c1625ca01a505f047c7332073014a96021696 | src/Pomade.c | src/Pomade.c | #include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#define MY_UUID { 0x78, 0x1D, 0x21, 0x66, 0x09, 0x09, 0x4F, 0x9C, 0x88, 0xFD, 0x89, 0x9B, 0x04, 0xBF, 0x5E, 0x32 }
PBL_APP_INFO(MY_UUID,
"Template App", "Your Company",
1, 0, /* App version */
DEFAULT_MENU_ICON,
APP_INFO_STANDARD_APP);
Window window;
void handle_init(AppContextRef ctx) {
window_init(&window, "Window Name");
window_stack_push(&window, true /* Animated */);
}
void pbl_main(void *params) {
PebbleAppHandlers handlers = {
.init_handler = &handle_init
};
app_event_loop(params, &handlers);
}
| #include "pebble_os.h"
#include "pebble_app.h"
#include "pebble_fonts.h"
#define MY_UUID { 0x78, 0x1D, 0x21, 0x66, 0x09, 0x09, 0x4F, 0x9C, 0x88, 0xFD, 0x89, 0x9B, 0x04, 0xBF, 0x5E, 0x32 }
PBL_APP_INFO(MY_UUID,
"Pomade", "Jon Speicher",
0, 1, /* App version */
DEFAULT_MENU_ICON,
APP_INFO_STANDARD_APP);
Window window;
void handle_init(AppContextRef ctx) {
window_init(&window, "Pomade");
window_stack_push(&window, true /* Animated */);
}
void pbl_main(void *params) {
PebbleAppHandlers handlers = {
.init_handler = &handle_init
};
app_event_loop(params, &handlers);
}
| Change version, app and window name | Change version, app and window name
| C | mit | elliots/simple-demo-pebble,jonspeicher/Pomade,jonspeicher/Pomade |
747852023687e4fe4502cc616412a5e3568f56fd | gnu/lib/libregex/gnuregex.h | gnu/lib/libregex/gnuregex.h | /*-
* Copyright (c) 2004 David E. O'Brien
* Copyright (c) 2004 Andrey A. Chernov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifdef __GNUC__
#warning "<gnuregex.h> has been replaced by <gnu/regex.h>"
#endif
#include <gnu/regex.h>
| /*-
* Copyright (c) 2004 David E. O'Brien
* Copyright (c) 2004 Andrey A. Chernov
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifdef __GNUC__
#warning "Use -I/usr/include/gnu and <regex.h> instead of <gnuregex.h>"
#endif
#include <gnu/regex.h>
| Change warning hint to be more useful | Change warning hint to be more useful
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
40a1a436137bab2bb7fc0ed7cc83d4d52be36ce4 | tools/emulator/non_interactive.c | tools/emulator/non_interactive.c | //
// Non-interactive test runner just produces register traces and memory dumps
//
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/poll.h>
#include <stdarg.h>
#include "core.h"
#include "debug_info.h"
void runNonInteractive(Core *core)
{
int i;
enableTracing(core);
runQuantum(core);
}
| //
// Non-interactive test runner just produces register traces and memory dumps
//
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/poll.h>
#include <stdarg.h>
#include "core.h"
#include "debug_info.h"
void runNonInteractive(Core *core)
{
int i;
enableTracing(core);
for (i = 0; i < 20; i++)
{
if (!runQuantum(core))
break;
}
}
| Make emulator run for a little longer in non-interactive mode | Make emulator run for a little longer in non-interactive mode
| C | apache-2.0 | jbush001/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,hoangt/NyuziProcessor,hoangt/NyuziProcessor,jbush001/NyuziProcessor,FulcronZ/NyuziProcessor,FulcronZ/NyuziProcessor,hoangt/NyuziProcessor,FulcronZ/NyuziProcessor,jbush001/NyuziProcessor,jbush001/NyuziProcessor |
9cc47bd19ebc3f697753d1a3ab62777c9e68d1c2 | src/ignore.h | src/ignore.h | #include <sys/dir.h>
#include <sys/types.h>
#ifndef IGNORE_H
#define IGNORE_H
#define SVN_DIR_PROP_BASE "/dir-prop-base"
#define SVN_DIR ".svn"
#define SVN_PROP_IGNORE "svn:ignore"
struct ignores {
char **names; /* Non-regex ignore lines. Sorted so we can binary search them. */
size_t names_len;
char **regexes; /* For patterns that need fnmatch */
size_t regexes_len;
struct ignores *parent;
};
typedef struct ignores ignores;
ignores *root_ignores;
extern const char *evil_hardcoded_ignore_files[];
extern const char *ignore_pattern_files[];
ignores *init_ignore(ignores *parent);
void cleanup_ignore(ignores *ig);
void add_ignore_pattern(ignores *ig, const char* pattern);
void load_ignore_patterns(ignores *ig, const char *ignore_filename);
void load_svn_ignore_patterns(ignores *ig, const char *path);
int ackmate_dir_match(const char* dir_name);
int filename_filter(struct dirent *dir);
#endif
| #ifndef IGNORE_H
#define IGNORE_H
#include <sys/dir.h>
#include <sys/types.h>
#define SVN_DIR_PROP_BASE "/dir-prop-base"
#define SVN_DIR ".svn"
#define SVN_PROP_IGNORE "svn:ignore"
struct ignores {
char **names; /* Non-regex ignore lines. Sorted so we can binary search them. */
size_t names_len;
char **regexes; /* For patterns that need fnmatch */
size_t regexes_len;
struct ignores *parent;
};
typedef struct ignores ignores;
ignores *root_ignores;
extern const char *evil_hardcoded_ignore_files[];
extern const char *ignore_pattern_files[];
ignores *init_ignore(ignores *parent);
void cleanup_ignore(ignores *ig);
void add_ignore_pattern(ignores *ig, const char* pattern);
void load_ignore_patterns(ignores *ig, const char *ignore_filename);
void load_svn_ignore_patterns(ignores *ig, const char *path);
int ackmate_dir_match(const char* dir_name);
int filename_filter(struct dirent *dir);
#endif
| Put ifndef at the top. | Put ifndef at the top.
| C | apache-2.0 | accessv/the_silver_searcher,subev/the_silver_searcher,decaff/the_silver_searcher,siadat/the_silver_searcher,lunixbochs/the_silver_searcher,accessv/the_silver_searcher,nodakai/the_silver_searcher,cchamberlain/the_silver_searcher,brianstorti/the_silver_searcher,smaudet/the_silver_searcher,siadat/the_silver_searcher,godbyk/the_silver_searcher,vehar/the_silver_searcher,cchamberlain/the_silver_searcher,Arkanosis/the_silver_searcher,SnoringFrog/the_silver_searcher,subev/the_silver_searcher,ur4ltz/the_silver_searcher,rowanbeentje/the_silver_searcher,monochromegane/the_silver_searcher,siadat/the_silver_searcher,abhiii5459/the_silver_searcher,christer155/the_silver_searcher,abhiii5459/the_silver_searcher,lizh06/the_silver_searcher,lunixbochs/the_silver_searcher,abhiii5459/the_silver_searcher,bhaak/the_silver_searcher,jemiahlee/the_silver_searcher,bestwpw/the_silver_searcher,msys2/the_silver_searcher,godbyk/the_silver_searcher,ggreer/the_silver_searcher,SnoringFrog/the_silver_searcher,cchamberlain/the_silver_searcher,k-takata/the_silver_searcher,sebgod/the_silver_searcher,starcraftman/the_silver_searcher,nishant8BITS/the_silver_searcher,laserswald/the_silver_searcher,nishant8BITS/the_silver_searcher,avih/the_silver_searcher,snahor/the_silver_searcher,smaudet/the_silver_searcher,subev/the_silver_searcher,leeonix/the_silver_searcher,bhaak/the_silver_searcher,accessv/the_silver_searcher,bhaak/the_silver_searcher,brianstorti/the_silver_searcher,leeonix/the_silver_searcher,christer155/the_silver_searcher,ur4ltz/the_silver_searcher,bc-jaymendoza/the_silver_searcher,sebgod/the_silver_searcher,godbyk/the_silver_searcher,k-takata/the_silver_searcher,snahor/the_silver_searcher,snahor/the_silver_searcher,bestwpw/the_silver_searcher,ggreer/the_silver_searcher,jemiahlee/the_silver_searcher,decaff/the_silver_searcher,starcraftman/the_silver_searcher,laserswald/the_silver_searcher,laserswald/the_silver_searcher,bhaak/the_silver_searcher,nodakai/the_silver_searcher,christer155/the_silver_searcher,ArneBab/the_silver_searcher,k-takata/the_silver_searcher,starcraftman/the_silver_searcher,k-takata/the_silver_searcher,cchamberlain/the_silver_searcher,RedX2501/the_silver_searcher,vehar/the_silver_searcher,vehar/the_silver_searcher,laserswald/the_silver_searcher,JFLarvoire/the_silver_searcher,rowanbeentje/the_silver_searcher,sebgod/the_silver_searcher,accessv/the_silver_searcher,vehar/the_silver_searcher,Arkanosis/the_silver_searcher,danielshahaf/the_silver_searcher,lunixbochs/the_silver_searcher,nodakai/the_silver_searcher,cchamberlain/the_silver_searcher,pbhandari/the_silver_searcher,k-takata/the_silver_searcher,danielshahaf/the_silver_searcher,JFLarvoire/the_silver_searcher,lunixbochs/the_silver_searcher,danielshahaf/the_silver_searcher,lecheel/the_silver_searcher,JFLarvoire/the_silver_searcher,subev/the_silver_searcher,danielshahaf/the_silver_searcher,kjk/the_silver_searcher,snahor/the_silver_searcher,bestwpw/the_silver_searcher,ggreer/the_silver_searcher,Arkanosis/the_silver_searcher,decaff/the_silver_searcher,JFLarvoire/the_silver_searcher,ur4ltz/the_silver_searcher,snahor/the_silver_searcher,jemiahlee/the_silver_searcher,vehar/the_silver_searcher,Arkanosis/the_silver_searcher,siadat/the_silver_searcher,kjk/the_silver_searcher,avih/the_silver_searcher,avih/the_silver_searcher,Arkanosis/the_silver_searcher,ArneBab/the_silver_searcher,leeonix/the_silver_searcher,mcanthony/the_silver_searcher,smaudet/the_silver_searcher,mcanthony/the_silver_searcher,smaudet/the_silver_searcher,msys2/the_silver_searcher,decaff/the_silver_searcher,kjk/the_silver_searcher,pbhandari/the_silver_searcher,bc-jaymendoza/the_silver_searcher,mcanthony/the_silver_searcher,pbhandari/the_silver_searcher,lecheel/the_silver_searcher,lecheel/the_silver_searcher,leeonix/the_silver_searcher,smaudet/the_silver_searcher,starcraftman/the_silver_searcher,RedX2501/the_silver_searcher,jemiahlee/the_silver_searcher,bc-jaymendoza/the_silver_searcher,bc-jaymendoza/the_silver_searcher,JFLarvoire/the_silver_searcher,SnoringFrog/the_silver_searcher,ArneBab/the_silver_searcher,jemiahlee/the_silver_searcher,monochromegane/the_silver_searcher,ArneBab/the_silver_searcher,ArneBab/the_silver_searcher,SnoringFrog/the_silver_searcher,rowanbeentje/the_silver_searcher,RedX2501/the_silver_searcher,lizh06/the_silver_searcher,brianstorti/the_silver_searcher,SnoringFrog/the_silver_searcher,avih/the_silver_searcher,msys2/the_silver_searcher,accessv/the_silver_searcher,JFLarvoire/the_silver_searcher,ur4ltz/the_silver_searcher,godbyk/the_silver_searcher,nishant8BITS/the_silver_searcher,danielshahaf/the_silver_searcher,nodakai/the_silver_searcher,abhiii5459/the_silver_searcher,subev/the_silver_searcher,bestwpw/the_silver_searcher,kjk/the_silver_searcher,bestwpw/the_silver_searcher,kjk/the_silver_searcher,schlosna/the_silver_searcher,siadat/the_silver_searcher,christer155/the_silver_searcher,sebgod/the_silver_searcher,starcraftman/the_silver_searcher,nishant8BITS/the_silver_searcher,JFLarvoire/the_silver_searcher,christer155/the_silver_searcher,lecheel/the_silver_searcher,lizh06/the_silver_searcher,msys2/the_silver_searcher,nodakai/the_silver_searcher,RedX2501/the_silver_searcher,laserswald/the_silver_searcher,decaff/the_silver_searcher,pbhandari/the_silver_searcher,bhaak/the_silver_searcher,leeonix/the_silver_searcher,nishant8BITS/the_silver_searcher,vehar/the_silver_searcher,pbhandari/the_silver_searcher,mcanthony/the_silver_searcher,lunixbochs/the_silver_searcher,ggreer/the_silver_searcher,abhiii5459/the_silver_searcher,brianstorti/the_silver_searcher,kjk/the_silver_searcher,leeonix/the_silver_searcher,schlosna/the_silver_searcher,lizh06/the_silver_searcher,RedX2501/the_silver_searcher,msys2/the_silver_searcher,godbyk/the_silver_searcher,mcanthony/the_silver_searcher,bc-jaymendoza/the_silver_searcher,brianstorti/the_silver_searcher,decaff/the_silver_searcher,ur4ltz/the_silver_searcher,avih/the_silver_searcher |
f051e451c92d176532fde7e6da09dff3262aa9ae | src/gui/src/docks/settings-dock.h | src/gui/src/docks/settings-dock.h | #ifndef SETTINGS_DOCK_H
#define SETTINGS_DOCK_H
#include <QStringList>
#include <QWidget>
#include "dock.h"
namespace Ui
{
class SettingsDock;
}
class Profile;
class QEvent;
class QSettings;
class SettingsDock : public Dock
{
Q_OBJECT
public:
explicit SettingsDock(Profile *profile, QWidget *parent);
~SettingsDock() override;
protected:
void changeEvent(QEvent *event) override;
void saveSettings();
public slots:
void reset();
protected slots:
void chooseFolder();
void save();
void updateCompleters();
private:
Ui::SettingsDock *ui;
Profile *m_profile;
QSettings *m_settings;
QStringList m_lineFilename_completer;
QStringList m_lineFolder_completer;
};
#endif // SETTINGS_DOCK_H
| #ifndef SETTINGS_DOCK_H
#define SETTINGS_DOCK_H
#include <QStringList>
#include <QWidget>
#include "dock.h"
namespace Ui
{
class SettingsDock;
}
class Profile;
class QEvent;
class QSettings;
class SettingsDock : public Dock
{
Q_OBJECT
public:
explicit SettingsDock(Profile *profile, QWidget *parent);
~SettingsDock() override;
protected:
void changeEvent(QEvent *event) override;
public slots:
void reset();
protected slots:
void chooseFolder();
void save();
void saveSettings();
void updateCompleters();
private:
Ui::SettingsDock *ui;
Profile *m_profile;
QSettings *m_settings;
QStringList m_lineFilename_completer;
QStringList m_lineFolder_completer;
};
#endif // SETTINGS_DOCK_H
| Fix broken connection in quick settings dock | Fix broken connection in quick settings dock
| C | apache-2.0 | Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.