commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 1
4.87k
| subject
stringlengths 15
778
| message
stringlengths 15
8.75k
| lang
stringclasses 266
values | license
stringclasses 13
values | repos
stringlengths 5
127k
|
|---|---|---|---|---|---|---|---|---|---|
f5098c051ddf16fd9adb2d53044975c2fc33ad10
|
libpolyml/noreturn.h
|
libpolyml/noreturn.h
|
/*
Title: No return header.
Author: David C.J. Matthews
Copyright (c) 2006, 2015 David C.J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _NORETURN_H
#define _NORETURN_H
/* The exception functions don't return but instead raise exceptions. This macro
tells the compiler about this and prevents spurious errors. */
#if (defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
#define NORETURNFN(x) __declspec(noreturn) x
#elif defined(__GNUC__) || defined(__attribute__)
#define NORETURNFN(x) x __attribute__((noreturn))
#else
#define NORETURNFN(x)
#endif
#endif
|
/*
Title: No return header.
Author: David C.J. Matthews
Copyright (c) 2006, 2015 David C.J. Matthews
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License version 2.1 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _NORETURN_H
#define _NORETURN_H
/* The exception functions don't return but instead raise exceptions. This macro
tells the compiler about this and prevents spurious errors. */
#if (defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
#define NORETURNFN(x) __declspec(noreturn) x
#elif defined(__GNUC__) || defined(__attribute__)
#define NORETURNFN(x) x __attribute__((noreturn))
#else
#define NORETURNFN(x) x
#endif
#endif
|
Fix no-return for non-GCC and non-VS.
|
Fix no-return for non-GCC and non-VS.
|
C
|
lgpl-2.1
|
polyml/polyml,polyml/polyml,dcjm/polyml,polyml/polyml,dcjm/polyml,dcjm/polyml,polyml/polyml,dcjm/polyml
|
a66b58cc03746c8b26d1f73c149eea03f9195c85
|
packages/rview/fltk/Fl_Value_Slider2.h
|
packages/rview/fltk/Fl_Value_Slider2.h
|
#ifndef Fl_Value_Slider2_H
#define Fl_Value_Slider2_H
#include "Fl/Fl_Slider.H"
class Fl_Value_Slider2 : public Fl_Slider {
uchar textfont_, textsize_;
unsigned textcolor_;
public:
void draw();
int handle(int);
Fl_Value_Slider2(int x,int y,int w,int h, const char *l = 0);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
|
#ifndef Fl_Value_Slider2_H
#define Fl_Value_Slider2_H
#include <FL/Fl_Slider.H>
class Fl_Value_Slider2 : public Fl_Slider {
uchar textfont_, textsize_;
unsigned textcolor_;
public:
void draw();
int handle(int);
Fl_Value_Slider2(int x,int y,int w,int h, const char *l = 0);
Fl_Font textfont() const {return (Fl_Font)textfont_;}
void textfont(uchar s) {textfont_ = s;}
uchar textsize() const {return textsize_;}
void textsize(uchar s) {textsize_ = s;}
Fl_Color textcolor() const {return (Fl_Color)textcolor_;}
void textcolor(unsigned s) {textcolor_ = s;}
};
#endif
|
Fix include statement of FLTK header such that it compiles with FLTK 1.3 without requiring backwards compatible link creation.
|
Fix include statement of FLTK header such that it compiles with FLTK 1.3 without requiring backwards compatible link creation.
|
C
|
unknown
|
BioMedIA/irtk-legacy,BioMedIA/IRTK,BioMedIA/IRTK,ghisvail/irtk-legacy,ghisvail/irtk-legacy,BioMedIA/IRTK,ghisvail/irtk-legacy,ghisvail/irtk-legacy,BioMedIA/IRTK,BioMedIA/irtk-legacy,BioMedIA/irtk-legacy,sk1712/IRTK,sk1712/IRTK,sk1712/IRTK,sk1712/IRTK,BioMedIA/irtk-legacy
|
cc960ada72a4626bac4e12853c00a20282d246f7
|
include/problems/0001-0050/Problem14.h
|
include/problems/0001-0050/Problem14.h
|
//===-- problems/Problem14.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 14: Longest Collatz sequence
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM14_H
#define PROBLEMS_PROBLEM14_H
#include <string>
#include <vector>
#include "../Problem.h"
namespace problems {
class Problem14 : public Problem {
public:
Problem14() : start(0), length(0), solved(false) {}
~Problem14() = default;
std::string answer();
std::string description() const;
void solve();
// Simple brute force solution
unsigned long long bruteForce(const unsigned long long limit) const;
// Simple brute force solution with memoization
unsigned long long
faster(const unsigned long long limit,
const std::vector<unsigned long long>::size_type cacheSize) const;
private:
/// Cached answer
unsigned long long start;
/// Cached answer
mutable unsigned long long length;
/// If cached answer is valid
bool solved;
};
}
#endif
|
//===-- problems/Problem14.h ------------------------------------*- C++ -*-===//
//
// ProjectEuler.net solutions by Will Mitchell
//
// This file is distributed under the MIT License. See LICENSE for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Problem 14: Longest Collatz sequence
///
//===----------------------------------------------------------------------===//
#ifndef PROBLEMS_PROBLEM14_H
#define PROBLEMS_PROBLEM14_H
#include <string>
#include <vector>
#include "../Problem.h"
namespace problems {
class Problem14 : public Problem {
public:
Problem14() : start(0), length(0), solved(false) {}
~Problem14() = default;
std::string answer();
std::string description() const;
void solve();
/// Simple brute force solution
unsigned long long bruteForce(const unsigned long long limit) const;
/// Simple brute force solution with memoization
unsigned long long
faster(const unsigned long long limit,
const std::vector<unsigned long long>::size_type cacheSize) const;
private:
/// Cached answer
unsigned long long start;
/// Cached answer
mutable unsigned long long length;
/// If cached answer is valid
bool solved;
};
}
#endif
|
Add another / to a couple comments in Problem 14 to make intended Doxygen comments visible as such.
|
Add another / to a couple comments in Problem 14 to make intended Doxygen comments visible as such.
|
C
|
mit
|
wtmitchell/challenge_problems,wtmitchell/challenge_problems,wtmitchell/challenge_problems
|
adebbe22c28891ccc25941d7679a9641972a7a25
|
tests/regression/31-ikind-aware-ints/16-enums-compare.c
|
tests/regression/31-ikind-aware-ints/16-enums-compare.c
|
//PARAM: --enable ana.int.enums --disable ana.int.def_exc
int main(){
int top = rand();
int x,y;
if(top){
x = 1;
} else{
x = 0;
}
assert(x<2);
return 0;
}
|
//PARAM: --enable ana.int.enums --disable ana.int.def_exc
int main(){
int top = rand();
int x,y;
if(top){
x = 1;
} else{
x = 0;
}
assert(x < 2);
assert(x < 1); // UNKNOWN!
assert(x < 0); // FAIL
assert(x <= 2);
assert(x <= 1);
assert(x <= 0); // UNKNOWN!
assert(x <= -1); //FAIL
assert(x > -1);
assert(x > 0); //UNKNOWN!
assert(x > 1); //FAIL
assert(x >= -1);
assert(x >= 0);
assert(x >= 1); //UNKNOWN!
assert(x >= 2); //FAIL
return 0;
}
|
Add more assert statements to test case
|
Add more assert statements to test case
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
a8f44e52c36e7dee41d2e6a913e83e1d9bb9c1cc
|
sbr/folder_free.c
|
sbr/folder_free.c
|
/*
* folder_free.c -- free a folder/message structure
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
void
folder_free (struct msgs *mp)
{
size_t i;
bvector_t *v;
if (!mp)
return;
if (mp->foldpath)
free (mp->foldpath);
/* free the sequence names */
for (i = 0; i < svector_size (mp->msgattrs); i++)
free (svector_at (mp->msgattrs, i));
svector_free (mp->msgattrs);
for (i = 0, v = mp->msgstats; i < mp->num_msgstats; ++i, ++v) {
bvector_free (*v);
}
free (mp->msgstats);
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
lkfclosedata (mp->seqhandle, mp->seqname);
if (mp->seqname)
free (mp->seqname);
bvector_free (mp->attrstats);
free (mp); /* free main folder structure */
}
|
/*
* folder_free.c -- free a folder/message structure
*
* This code is Copyright (c) 2002, by the authors of nmh. See the
* COPYRIGHT file in the root directory of the nmh distribution for
* complete copyright information.
*/
#include <h/mh.h>
#include <h/utils.h>
void
folder_free (struct msgs *mp)
{
size_t i;
bvector_t *v;
if (!mp)
return;
mh_xfree(mp->foldpath);
/* free the sequence names */
for (i = 0; i < svector_size (mp->msgattrs); i++)
free (svector_at (mp->msgattrs, i));
svector_free (mp->msgattrs);
for (i = 0, v = mp->msgstats; i < mp->num_msgstats; ++i, ++v) {
bvector_free (*v);
}
free (mp->msgstats);
/* Close/free the sequence file if it is open */
if (mp->seqhandle)
lkfclosedata (mp->seqhandle, mp->seqname);
mh_xfree(mp->seqname);
bvector_free (mp->attrstats);
free (mp); /* free main folder structure */
}
|
Replace `if (p) free(p)' with `mh_xfree(p)'.
|
Replace `if (p) free(p)' with `mh_xfree(p)'.
|
C
|
bsd-3-clause
|
mcr/nmh,mcr/nmh
|
89eae96b2f739b5f0e7db4bee8bd517207d699c6
|
src/include/port/qnx4.h
|
src/include/port/qnx4.h
|
#include <sys/types.h> /* for namser.h */
#include <arpa/nameser.h> /* for BYTE_ORDER */
#include <process.h> /* for execv */
#include <ioctl.h> /* for unix.h */
#include <unix.h>
#include <sys/select.h> /* for select */
#define HAS_TEST_AND_SET
#undef HAVE_GETRUSAGE
#define strncasecmp strnicmp
#ifndef NAN
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
#endif /* __nan_bytes */
extern unsigned char __nan[8];
#define NAN (*(const double *) __nan)
#endif /* NAN */
typedef u_short ushort;
typedef unsigned char slock_t;
extern int isnan(double dsrc);
extern double rint(double x);
extern char *crypt(const char *, const char *);
extern long random(void);
extern void srandom(unsigned int seed);
|
#include <sys/types.h> /* for namser.h */
#include <arpa/nameser.h> /* for BYTE_ORDER */
#include <process.h> /* for execv */
#include <ioctl.h> /* for unix.h */
#include <unix.h>
#include <sys/select.h> /* for select */
#define HAS_TEST_AND_SET
#undef HAVE_GETRUSAGE
#define strncasecmp strnicmp
#ifndef NAN
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
#endif /* __nan_bytes */
extern unsigned char __nan[8];
#define NAN (*(const double *) __nan)
#endif /* NAN */
typedef u_short ushort;
typedef unsigned char slock_t;
extern int isnan(double dsrc);
extern char *crypt(const char *, const char *);
extern long random(void);
extern void srandom(unsigned int seed);
|
Remove rint() prototype from QNX.
|
Remove rint() prototype from QNX.
|
C
|
mpl-2.0
|
postmind-net/postgres-xl,randomtask1155/gpdb,rvs/gpdb,janebeckman/gpdb,foyzur/gpdb,xuegang/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,cjcjameson/gpdb,jmcatamney/gpdb,Chibin/gpdb,zaksoup/gpdb,50wu/gpdb,snaga/postgres-xl,Quikling/gpdb,adam8157/gpdb,lintzc/gpdb,lisakowen/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,atris/gpdb,edespino/gpdb,pavanvd/postgres-xl,tangp3/gpdb,ashwinstar/gpdb,ahachete/gpdb,0x0FFF/gpdb,kmjungersen/PostgresXL,Chibin/gpdb,yuanzhao/gpdb,xinzweb/gpdb,zeroae/postgres-xl,edespino/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,lpetrov-pivotal/gpdb,ahachete/gpdb,ovr/postgres-xl,edespino/gpdb,lpetrov-pivotal/gpdb,lisakowen/gpdb,lintzc/gpdb,rubikloud/gpdb,snaga/postgres-xl,foyzur/gpdb,royc1/gpdb,kmjungersen/PostgresXL,0x0FFF/gpdb,postmind-net/postgres-xl,ahachete/gpdb,atris/gpdb,CraigHarris/gpdb,arcivanov/postgres-xl,pavanvd/postgres-xl,edespino/gpdb,adam8157/gpdb,foyzur/gpdb,royc1/gpdb,janebeckman/gpdb,yuanzhao/gpdb,rubikloud/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,yazun/postgres-xl,ahachete/gpdb,0x0FFF/gpdb,janebeckman/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,xuegang/gpdb,tangp3/gpdb,kaknikhil/gpdb,50wu/gpdb,adam8157/gpdb,xinzweb/gpdb,kaknikhil/gpdb,zaksoup/gpdb,oberstet/postgres-xl,randomtask1155/gpdb,janebeckman/gpdb,xinzweb/gpdb,jmcatamney/gpdb,zeroae/postgres-xl,CraigHarris/gpdb,cjcjameson/gpdb,rvs/gpdb,rubikloud/gpdb,lintzc/gpdb,xuegang/gpdb,lintzc/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,rvs/gpdb,tangp3/gpdb,yazun/postgres-xl,CraigHarris/gpdb,lintzc/gpdb,royc1/gpdb,snaga/postgres-xl,lisakowen/gpdb,Chibin/gpdb,foyzur/gpdb,cjcjameson/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,yazun/postgres-xl,cjcjameson/gpdb,ahachete/gpdb,Postgres-XL/Postgres-XL,CraigHarris/gpdb,Chibin/gpdb,randomtask1155/gpdb,xinzweb/gpdb,zeroae/postgres-xl,lisakowen/gpdb,lpetrov-pivotal/gpdb,snaga/postgres-xl,adam8157/gpdb,xuegang/gpdb,tangp3/gpdb,kaknikhil/gpdb,arcivanov/postgres-xl,Chibin/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,zaksoup/gpdb,atris/gpdb,tangp3/gpdb,zaksoup/gpdb,foyzur/gpdb,chrishajas/gpdb,randomtask1155/gpdb,cjcjameson/gpdb,ovr/postgres-xl,edespino/gpdb,edespino/gpdb,Chibin/gpdb,Quikling/gpdb,foyzur/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,CraigHarris/gpdb,Quikling/gpdb,greenplum-db/gpdb,tangp3/gpdb,yazun/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,ovr/postgres-xl,lisakowen/gpdb,ahachete/gpdb,chrishajas/gpdb,zaksoup/gpdb,tpostgres-projects/tPostgres,atris/gpdb,rvs/gpdb,lpetrov-pivotal/gpdb,rvs/gpdb,Postgres-XL/Postgres-XL,lpetrov-pivotal/gpdb,lintzc/gpdb,janebeckman/gpdb,xuegang/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,Chibin/gpdb,0x0FFF/gpdb,lpetrov-pivotal/gpdb,xuegang/gpdb,tangp3/gpdb,edespino/gpdb,postmind-net/postgres-xl,Quikling/gpdb,edespino/gpdb,janebeckman/gpdb,randomtask1155/gpdb,lisakowen/gpdb,ovr/postgres-xl,kaknikhil/gpdb,Quikling/gpdb,xuegang/gpdb,randomtask1155/gpdb,xuegang/gpdb,cjcjameson/gpdb,atris/gpdb,royc1/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,yuanzhao/gpdb,chrishajas/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,yazun/postgres-xl,janebeckman/gpdb,kaknikhil/gpdb,0x0FFF/gpdb,xinzweb/gpdb,chrishajas/gpdb,xinzweb/gpdb,lisakowen/gpdb,Chibin/gpdb,tangp3/gpdb,cjcjameson/gpdb,foyzur/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,lintzc/gpdb,techdragon/Postgres-XL,postmind-net/postgres-xl,xuegang/gpdb,ovr/postgres-xl,rvs/gpdb,0x0FFF/gpdb,rubikloud/gpdb,lisakowen/gpdb,rubikloud/gpdb,rubikloud/gpdb,0x0FFF/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,janebeckman/gpdb,50wu/gpdb,oberstet/postgres-xl,kaknikhil/gpdb,royc1/gpdb,chrishajas/gpdb,rubikloud/gpdb,randomtask1155/gpdb,janebeckman/gpdb,xinzweb/gpdb,ashwinstar/gpdb,atris/gpdb,tpostgres-projects/tPostgres,royc1/gpdb,50wu/gpdb,oberstet/postgres-xl,arcivanov/postgres-xl,lintzc/gpdb,Chibin/gpdb,greenplum-db/gpdb,kaknikhil/gpdb,adam8157/gpdb,atris/gpdb,CraigHarris/gpdb,yuanzhao/gpdb,atris/gpdb,CraigHarris/gpdb,lintzc/gpdb,zaksoup/gpdb,Quikling/gpdb,0x0FFF/gpdb,royc1/gpdb,edespino/gpdb,yuanzhao/gpdb,edespino/gpdb,pavanvd/postgres-xl,rubikloud/gpdb,jmcatamney/gpdb,CraigHarris/gpdb,Quikling/gpdb,Quikling/gpdb,randomtask1155/gpdb,50wu/gpdb,jmcatamney/gpdb,snaga/postgres-xl,rvs/gpdb,tpostgres-projects/tPostgres,greenplum-db/gpdb,rvs/gpdb,ahachete/gpdb,zaksoup/gpdb,50wu/gpdb,zaksoup/gpdb,yuanzhao/gpdb,zeroae/postgres-xl,arcivanov/postgres-xl,foyzur/gpdb,kaknikhil/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,adam8157/gpdb,techdragon/Postgres-XL,50wu/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,Quikling/gpdb,kaknikhil/gpdb,janebeckman/gpdb,jmcatamney/gpdb,rvs/gpdb,ahachete/gpdb,yuanzhao/gpdb,chrishajas/gpdb,adam8157/gpdb,chrishajas/gpdb,Quikling/gpdb,ashwinstar/gpdb,cjcjameson/gpdb,chrishajas/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,CraigHarris/gpdb,zeroae/postgres-xl,adam8157/gpdb,yuanzhao/gpdb,oberstet/postgres-xl
|
80b30e1bfdef0904945b67b3add42458da72dcaa
|
packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c
|
packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c
|
int main(int argc, char **argv) {
lldb_enable_attach();
int to_complete = 0;
return to_complete;
}
|
int main(int argc, char **argv) {
int to_complete = 0;
return to_complete;
}
|
Remove unnecessary lldb_enable_attach in TestMultilineCompletion
|
[lldb][NFC] Remove unnecessary lldb_enable_attach in TestMultilineCompletion
We don't actually need to call this for this test.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@370623 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb
|
4f4ada85e23ba03759aaf617c994bf2efc7e91c4
|
net/proxy/proxy_resolver_mac.h
|
net/proxy/proxy_resolver_mac.h
|
// Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_
#define NET_PROXY_PROXY_RESOLVER_MAC_H_
#pragma once
#include <string>
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
#include "net/proxy/proxy_resolver.h"
namespace net {
// Implementation of ProxyResolver that uses the Mac CFProxySupport to implement
// proxies.
class ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver methods:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
CompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log);
virtual void CancelRequest(RequestHandle request) {
NOTREACHED();
}
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
CompletionCallback* /*callback*/) {
script_data_ = script_data_;
return OK;
}
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
};
} // namespace net
#endif // NET_PROXY_PROXY_RESOLVER_MAC_H_
|
// Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_
#define NET_PROXY_PROXY_RESOLVER_MAC_H_
#pragma once
#include <string>
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
#include "net/proxy/proxy_resolver.h"
namespace net {
// Implementation of ProxyResolver that uses the Mac CFProxySupport to implement
// proxies.
class ProxyResolverMac : public ProxyResolver {
public:
ProxyResolverMac() : ProxyResolver(false /*expects_pac_bytes*/) {}
// ProxyResolver methods:
virtual int GetProxyForURL(const GURL& url,
ProxyInfo* results,
CompletionCallback* callback,
RequestHandle* request,
const BoundNetLog& net_log);
virtual void CancelRequest(RequestHandle request) {
NOTREACHED();
}
virtual int SetPacScript(
const scoped_refptr<ProxyResolverScriptData>& script_data,
CompletionCallback* /*callback*/) {
script_data_ = script_data;
return OK;
}
private:
scoped_refptr<ProxyResolverScriptData> script_data_;
};
} // namespace net
#endif // NET_PROXY_PROXY_RESOLVER_MAC_H_
|
Fix a typo, that could cause a crash on mac.
|
Fix a typo, that could cause a crash on mac.
BUG=50717
TBR=rvargas
TEST=Set system proxy settings to use a custom PAC script, then launch TestShell.app -- should not crash.
Review URL: http://codereview.chromium.org/3023030
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@54279 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
nacl-webkit/chrome_deps,zcbenz/cefode-chromium,axinging/chromium-crosswalk,robclark/chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,Just-D/chromium-1,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,anirudhSK/chromium,markYoungH/chromium.src,zcbenz/cefode-chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,keishi/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,Chilledheart/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,dushu1203/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,keishi/chromium,dednal/chromium.src,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,patrickm/chromium.src,ltilve/chromium,dednal/chromium.src,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,nacl-webkit/chrome_deps,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,Chilledheart/chromium,littlstar/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,zcbenz/cefode-chromium,robclark/chromium,rogerwang/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,hujiajie/pa-chromium,hujiajie/pa-chromium,M4sse/chromium.src,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,littlstar/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,ltilve/chromium,jaruba/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,M4sse/chromium.src,ondra-novak/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,robclark/chromium,jaruba/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,junmin-zhu/chromium-rivertrail,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,dushu1203/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,Chilledheart/chromium,robclark/chromium,robclark/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,M4sse/chromium.src,ltilve/chromium,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,ondra-novak/chromium.src,dednal/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,rogerwang/chromium,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,chuan9/chromium-crosswalk,rogerwang/chromium,dednal/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,Just-D/chromium-1,fujunwei/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,chuan9/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,rogerwang/chromium,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,anirudhSK/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,fujunwei/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,markYoungH/chromium.src,anirudhSK/chromium,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,ltilve/chromium,anirudhSK/chromium,pozdnyakov/chromium-crosswalk,M4sse/chromium.src,anirudhSK/chromium,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,patrickm/chromium.src,M4sse/chromium.src,dednal/chromium.src,bright-sparks/chromium-spacewalk,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,rogerwang/chromium,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,dushu1203/chromium.src,dednal/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,robclark/chromium,Jonekee/chromium.src,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,keishi/chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,ChromiumWebApps/chromium,rogerwang/chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,ltilve/chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,keishi/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,keishi/chromium,chuan9/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,Chilledheart/chromium,markYoungH/chromium.src,ChromiumWebApps/chromium,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,rogerwang/chromium,littlstar/chromium.src,hujiajie/pa-chromium,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,nacl-webkit/chrome_deps,robclark/chromium
|
9cc3c498b25f30ebe2da5b9d59df7a87ef7bc3d2
|
src/libstddjb/absolutepath.c
|
src/libstddjb/absolutepath.c
|
/* ISC license. */
/* MT-unsafe */
#include <skalibs/stralloc.h>
#include <skalibs/skamisc.h>
#include <skalibs/djbunix.h>
int sarealpath (stralloc *sa, char const *path)
{
return sarealpath_tmp(sa, path, &satmp) ;
}
|
/* ISC license. */
/* MT-unsafe */
#include <skalibs/stralloc.h>
#include <skalibs/skamisc.h>
#include <skalibs/djbunix.h>
BUG
int sarealpath (stralloc *sa, char const *path)
{
return sarealpath_tmp(sa, path, &satmp) ;
}
|
Make build crash early on purpose (to test test suite...)
|
Make build crash early on purpose (to test test suite...)
|
C
|
isc
|
skarnet/skalibs,skarnet/skalibs
|
a9befa9f89a002dc2fa7696a44936055a98de413
|
test_utils/mock_queue.h
|
test_utils/mock_queue.h
|
#ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include <stdint.h>
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const T &item));
MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item));
MOCK_METHOD1_T(DequeueNext, bool(T *item));
MOCK_METHOD1_T(DequeueNextBlocking, void(T *item));
MOCK_CONST_METHOD0_T(GetOffset, int());
MOCK_METHOD0_T(FreeQueue, void());
MOCK_CONST_METHOD0_T(GetNumConsumers, uint32_t());
};
} // namespace testing
} // namespace tachyon
#endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
|
#ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include <stdint.h>
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const T &item));
MOCK_METHOD1_T(EnqueueBlocking, bool(const T &item));
MOCK_METHOD1_T(DequeueNext, bool(T *item));
MOCK_METHOD1_T(DequeueNextBlocking, void(T *item));
MOCK_METHOD1_T(PeekNext, bool(T *item));
MOCK_METHOD1_T(PeekNextBlocking, void(T *item));
MOCK_CONST_METHOD0_T(GetOffset, int());
MOCK_METHOD0_T(FreeQueue, void());
MOCK_CONST_METHOD0_T(GetNumConsumers, uint32_t());
};
} // namespace testing
} // namespace tachyon
#endif // TACHYON_TEST_UTILS_MOCK_QUEUE_H_
|
Add peek methods to mock queue.
|
Add peek methods to mock queue.
|
C
|
mit
|
djpetti/gaia,djpetti/gaia,djpetti/gaia
|
388d30f266630975e30de38b987038859207d3bc
|
tests/glibc_syscall_wrappers/test_stat.c
|
tests/glibc_syscall_wrappers/test_stat.c
|
/*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can
* be found in the LICENSE file.
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h>
#pragma GCC diagnostic ignored "-Wnonnull"
#define KNOWN_FILE_SIZE 30
int main(int argc, char** argv) {
struct stat st;
struct stat64 st64;
if (2 != argc) {
printf("Usage: sel_ldr test_stat.nexe test_stat_data\n");
return 1;
}
st.st_size = 0;
st64.st_size = 0;
assert(-1 == stat(NULL, &st));
assert(EFAULT == errno);
assert(-1 == stat(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat(argv[1], &st));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st.st_size);
assert(-1 == stat64(NULL, &st64));
assert(EFAULT == errno);
assert(-1 == stat64(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat64(argv[1], &st64));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st64.st_size);
return 0;
}
|
/*
* Copyright 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can
* be found in the LICENSE file.
*/
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <sys/stat.h>
#pragma GCC diagnostic ignored "-Wnonnull"
#define KNOWN_FILE_SIZE 30
int main(int argc, char** argv) {
struct stat st;
if (2 != argc) {
printf("Usage: sel_ldr test_stat.nexe test_stat_data\n");
return 1;
}
st.st_size = 0;
assert(-1 == stat(NULL, &st));
assert(EFAULT == errno);
assert(-1 == stat(".", NULL));
assert(EFAULT == errno);
errno = 0;
assert(0 == stat(argv[1], &st));
assert(0 == errno);
assert(KNOWN_FILE_SIZE == st.st_size);
return 0;
}
|
Remove test for obsolete function stat64.
|
Remove test for obsolete function stat64.
BUG=
TEST=run_stat_test
Review URL: http://codereview.chromium.org/6300006
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@4152 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
|
C
|
bsd-3-clause
|
sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client,nacl-webkit/native_client,sbc100/native_client,sbc100/native_client,nacl-webkit/native_client,nacl-webkit/native_client,sbc100/native_client
|
28b5c302b8d65d935fb833d5a8a583866f2e5c60
|
secure-notes-exporter/main.c
|
secure-notes-exporter/main.c
|
//
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
int main(int argc, const char * argv[])
{
// create query
CFStringRef keys[] = { kSecReturnAttributes, kSecMatchLimit, kSecClass };
CFTypeRef values[] = { kCFBooleanTrue, kSecMatchLimitAll, kSecClassGenericPassword };
CFDictionaryRef query = CFDictionaryCreate(
kCFAllocatorDefault,
(const void **)keys,
(const void **)values,
3,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks
);
// get search results
CFArrayRef items = nil;
OSStatus status = SecItemCopyMatching(query, (CFTypeRef *)&items);
CFRelease(query);
assert(status == 0);
CFShow(items);
CFRelease(items);
return 0;
}
|
//
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
void printItem(const void *value, void *context) {
CFDictionaryRef dictionary = value;
CFNumberRef itemType = CFDictionaryGetValue(dictionary, kSecAttrType);
CFNumberRef noteType = (CFNumberRef)context;
if (!itemType || !CFEqual(itemType, noteType)) {
// not a note
return;
}
CFShow(noteType);
}
int main(int argc, const char * argv[])
{
// create query
CFStringRef keys[] = { kSecReturnAttributes, kSecMatchLimit, kSecClass };
CFTypeRef values[] = { kCFBooleanTrue, kSecMatchLimitAll, kSecClassGenericPassword };
CFDictionaryRef query = CFDictionaryCreate(
kCFAllocatorDefault,
(const void **)keys,
(const void **)values,
3,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks
);
// get search results
CFArrayRef items = nil;
OSStatus status = SecItemCopyMatching(query, (CFTypeRef *)&items);
CFRelease(query);
assert(status == 0);
// iterate over "Secure Note" items
CFRange range = CFRangeMake(0, CFArrayGetCount(items));
SInt32 note = 'note';
CFNumberRef noteRef = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, ¬e);
CFArrayApplyFunction(items, range, printItem, (void *)noteRef);
CFRelease(noteRef);
CFRelease(items);
return 0;
}
|
Print something about "Secure Notes" while iterating
|
Print something about "Secure Notes" while iterating
I couldn't find a constant for 'note' and there are probably more
idiomatic ways to do this, but this is what I have.
Signed-off-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@hurrell.net>
|
C
|
bsd-3-clause
|
wincent/secure-notes-exporter
|
ce1a1091e2ca7826ec17d08d756105eb6cf654f4
|
include/llvm/Transforms/Utils/Mem2Reg.h
|
include/llvm/Transforms/Utils/Mem2Reg.h
|
//===- Mem2Reg.h - The -mem2reg pass, a wrapper around the Utils lib ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is a simple pass wrapper around the PromoteMemToReg function call
// exposed by the Utils library.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_MEM2REG_H
#define LLVM_TRANSFORMS_UTILS_MEM2REG_H
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
class PromotePass : public PassInfoMixin<PromotePass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
}
#endif // LLVM_TRANSFORMS_UTILS_MEM2REG_H
|
//===- Mem2Reg.h - The -mem2reg pass, a wrapper around the Utils lib ------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is a simple pass wrapper around the PromoteMemToReg function call
// exposed by the Utils library.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_MEM2REG_H
#define LLVM_TRANSFORMS_UTILS_MEM2REG_H
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
namespace llvm {
class PromotePass : public PassInfoMixin<PromotePass> {
public:
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
};
}
#endif // LLVM_TRANSFORMS_UTILS_MEM2REG_H
|
Add EOL at EOF to appease source utils like unifdef
|
Add EOL at EOF to appease source utils like unifdef
<rdar://problem/32511256>
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@305225 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
|
20a48bba8b21203919b25888f3ad75d27a2bbab0
|
tests/regression/02-base/86-spurious.c
|
tests/regression/02-base/86-spurious.c
|
#include<pthread.h>
#include<assert.h>
int counter = 0;
pthread_mutex_t lock1;
void* producer(void* param) {
pthread_mutex_lock(&lock1);
counter = 0;
pthread_mutex_unlock(&lock1);
}
void* consumer(void* param) {
pthread_mutex_lock(&lock1);
int bla = counter >= 0;
// This should not produce a warning about the privatization being unsound
assert(counter >= 0);
pthread_mutex_unlock(&lock1);
}
int main() {
pthread_t thread;
pthread_t thread2;
pthread_create(&thread,NULL,producer,NULL);
pthread_create(&thread2,NULL,consumer,NULL);
}
|
//PARAM: --disable warn.assert
#include<pthread.h>
#include<assert.h>
int counter = 0;
pthread_mutex_t lock1;
void* producer(void* param) {
pthread_mutex_lock(&lock1);
counter = 0;
pthread_mutex_unlock(&lock1);
}
void* consumer(void* param) {
pthread_mutex_lock(&lock1);
int bla = counter >= 0;
// This should not produce a warning about the privatization being unsound
assert(counter >= 0); //NOWARN
pthread_mutex_unlock(&lock1);
}
int main() {
pthread_t thread;
pthread_t thread2;
pthread_create(&thread,NULL,producer,NULL);
pthread_create(&thread2,NULL,consumer,NULL);
}
|
Modify test 02/86 so it fails if spurious warning is produced
|
Modify test 02/86 so it fails if spurious warning is produced
|
C
|
mit
|
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
|
87b2aa5ed903e8121969ae0f8dead4a7aaa88ea1
|
boards/nrf52832-mdk/include/periph_conf.h
|
boards/nrf52832-mdk/include/periph_conf.h
|
/*
* Copyright (C) 2019 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_nrf52832-mdk
* @{
*
* @file
* @brief Peripheral configuration for the nRF52832-MDK
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_cpu.h"
#include "cfg_clock_32_1.h"
#include "cfg_i2c_default.h"
#include "cfg_rtt_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_PIN_RX GPIO_PIN(0,19)
#define UART_PIN_TX GPIO_PIN(0,20)
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
|
/*
* Copyright (C) 2019 Inria
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_nrf52832-mdk
* @{
*
* @file
* @brief Peripheral configuration for the nRF52832-MDK
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
*/
#ifndef PERIPH_CONF_H
#define PERIPH_CONF_H
#include "periph_cpu.h"
#include "cfg_clock_32_1.h"
#include "cfg_i2c_default.h"
#include "cfg_rtt_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name UART configuration
* @{
*/
#define UART_NUMOF (1U)
#define UART_PIN_RX GPIO_PIN(0,19)
#define UART_PIN_TX GPIO_PIN(0,20)
/** @} */
/**
* @brief Enable the internal DC/DC converter
*/
#define NRF5X_ENABLE_DCDC
#ifdef __cplusplus
}
#endif
#endif /* PERIPH_CONF_H */
|
Enable the nRF52 built-in DC/DC converter
|
nrf52832-mdk: Enable the nRF52 built-in DC/DC converter
|
C
|
lgpl-2.1
|
OlegHahm/RIOT,RIOT-OS/RIOT,yogo1212/RIOT,OTAkeys/RIOT,ant9000/RIOT,authmillenon/RIOT,kaspar030/RIOT,RIOT-OS/RIOT,kaspar030/RIOT,ant9000/RIOT,kYc0o/RIOT,yogo1212/RIOT,basilfx/RIOT,authmillenon/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,authmillenon/RIOT,yogo1212/RIOT,OTAkeys/RIOT,basilfx/RIOT,basilfx/RIOT,jasonatran/RIOT,miri64/RIOT,yogo1212/RIOT,miri64/RIOT,jasonatran/RIOT,RIOT-OS/RIOT,OlegHahm/RIOT,kaspar030/RIOT,basilfx/RIOT,jasonatran/RIOT,ant9000/RIOT,RIOT-OS/RIOT,authmillenon/RIOT,RIOT-OS/RIOT,jasonatran/RIOT,miri64/RIOT,authmillenon/RIOT,yogo1212/RIOT,kYc0o/RIOT,kYc0o/RIOT,authmillenon/RIOT,jasonatran/RIOT,ant9000/RIOT,ant9000/RIOT,kaspar030/RIOT,kYc0o/RIOT,basilfx/RIOT,miri64/RIOT,kYc0o/RIOT,OlegHahm/RIOT,miri64/RIOT,OTAkeys/RIOT,OlegHahm/RIOT,kaspar030/RIOT,yogo1212/RIOT,OTAkeys/RIOT
|
e92636f39795ce15a5f11660803d0d0c9394ec23
|
src/t3/Portability.h
|
src/t3/Portability.h
|
/****************************************************************************
* Simple definitions to aid platform portability
* Author: Bill Forster
* License: MIT license. Full text of license is in associated file LICENSE
* Copyright 2010-2014, Bill Forster <billforsternz at gmail dot com>
****************************************************************************/
#ifndef PORTABILITY_H
#define PORTABILITY_H
#include <stdint.h> // int32_t etc.
// Windows
#ifdef WIN32
#include <Windows.h>
#include <string.h>
#define strcmpi _strcmpi
#define THC_WINDOWS // Triple Happy Chess, Windows specific code
#define WINDOWS_FIX_LATER // Windows only fix later on Mac
// Mac
#else
unsigned long GetTickCount();
typedef unsigned char byte;
int strcmpi( const char *s, const char *t ); // return 0 if case insensitive match
#define THC_MAC // Triple Happy Chess, Mac specific code
#define MAC_FIX_LATER // Things not yet done on the Mac
#endif
//#define DebugPrintfInner printf //temp
#endif // PORTABILITY_H
|
/****************************************************************************
* Simple definitions to aid platform portability
* Author: Bill Forster
* License: MIT license. Full text of license is in associated file LICENSE
* Copyright 2010-2014, Bill Forster <billforsternz at gmail dot com>
****************************************************************************/
#ifndef PORTABILITY_H
#define PORTABILITY_H
#include <stdint.h> // int32_t etc.
//CHOOSE ONE:
//#define TARRASCH_UNIX 1
//#define TARRASCH_WINDOWS 1
//#define TARRASCH_OSX 1
#ifdef WIN32
#define TARRASCH_WINDOWS 1
#else
#define TARRASCH_UNIX 1
#endif
#include <stdint.h> // int32_t etc.
#if TARRASCH_UNIX
#include <string.h>
typedef uint8_t byte;
#define THC_MAC
#define MAC_FIX_LATER
unsigned long GetTickCount();
int strcmpi(const char *s, const char *t);
#elif TARRASCH_WINDOWS
#include <Windows.h>
#include <string.h>
#define strcmpi _strcmpi
#define THC_WINDOWS // Triple Happy Chess, Windows specific code
#define WINDOWS_FIX_LATER // Windows only fix later on Mac
#elif TARRASCH_OSX
unsigned long GetTickCount();
typedef unsigned char byte;
int strcmpi( const char *s, const char *t ); // return 0 if case insensitive match
#define THC_MAC // Triple Happy Chess, Mac specific code
#define MAC_FIX_LATER // Things not yet done on the Mac
#else
#error Unknown Platform!
#endif
//#define DebugPrintfInner printf //temp
#endif // PORTABILITY_H
|
Change over to KostaKow's version of this
|
Change over to KostaKow's version of this
|
C
|
mit
|
billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui,billforsternz/tarrasch-chess-gui
|
a0bd5722877d7144bbac6ab613ef3d9ea89e39cd
|
src/polling/polling_thread.h
|
src/polling/polling_thread.h
|
#ifndef POLLING_THREAD_H
#define POLLING_THREAD_H
#include <cstdint>
#include <chrono>
#include <map>
#include <uv.h>
#include "../thread.h"
#include "../status.h"
#include "../result.h"
#include "polled_root.h"
const std::chrono::milliseconds DEFAULT_POLL_INTERVAL = std::chrono::milliseconds(500);
const uint_fast64_t DEFAULT_POLL_THROTTLE = 1000;
class PollingThread : public Thread {
public:
PollingThread(uv_async_t *main_callback);
~PollingThread();
void collect_status(Status &status) override;
private:
Result<> body() override;
Result<> cycle();
Result<OfflineCommandOutcome> handle_offline_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_add_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_remove_command(const CommandPayload *payload) override;
std::chrono::milliseconds poll_interval;
uint_fast64_t poll_throttle;
std::map<ChannelID, PolledRoot> roots;
};
#endif
|
#ifndef POLLING_THREAD_H
#define POLLING_THREAD_H
#include <cstdint>
#include <chrono>
#include <map>
#include <uv.h>
#include "../thread.h"
#include "../status.h"
#include "../result.h"
#include "polled_root.h"
const std::chrono::milliseconds DEFAULT_POLL_INTERVAL = std::chrono::milliseconds(100);
const uint_fast64_t DEFAULT_POLL_THROTTLE = 1000;
class PollingThread : public Thread {
public:
PollingThread(uv_async_t *main_callback);
~PollingThread();
void collect_status(Status &status) override;
private:
Result<> body() override;
Result<> cycle();
Result<OfflineCommandOutcome> handle_offline_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_add_command(const CommandPayload *command) override;
Result<CommandOutcome> handle_remove_command(const CommandPayload *payload) override;
std::chrono::milliseconds poll_interval;
uint_fast64_t poll_throttle;
std::map<ChannelID, PolledRoot> roots;
};
#endif
|
Drop the default polling interval to 100ms
|
Drop the default polling interval to 100ms
|
C
|
mit
|
atom/watcher,atom/watcher,atom/watcher,atom/watcher,atom/watcher
|
9447fa811b7ac3429f9fdbc8a34a7b6ac6dccca3
|
core-set.h
|
core-set.h
|
#ifndef __CORE_SET__
#define __CORE_SET__
#include <set>
class CoreSet : public std::set<int>
{
public:
int getPrevCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr--;
// This was the first element, start over
if (curr == this->end())
curr--;
return *curr;
}
int getNextCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr++;
// This was the last element, start over
if (curr == this->end())
curr = this->begin();
return *curr;
}
};
#endif
|
#ifndef __CORE_SET__
#define __CORE_SET__
#include "assert.h"
#include <set>
class CoreSet : public std::set<int>
{
public:
int getPrevCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr--;
// This was the first element, start over
if (curr == this->end())
curr--;
return *curr;
}
int getNextCore(int coreId) {
auto curr = this->find(coreId);
assert(curr != this->end());
curr++;
// This was the last element, start over
if (curr == this->end())
curr = this->begin();
return *curr;
}
};
#endif
|
Add a missing header include for assert.h
|
Add a missing header include for assert.h
|
C
|
bsd-3-clause
|
s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim,s-kanev/XIOSim
|
4ede882f2c2b3a2409bddbbd6cee9bbbfdead905
|
Lumina-DE/src/lumina-desktop/Globals.h
|
Lumina-DE/src/lumina-desktop/Globals.h
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
class SYSTEM{
public:
//Current Username
static QString user(){ return QString(getlogin()); }
//Current Hostname
static QString hostname(){
char name[50];
gethostname(name,sizeof(name));
return QString(name);
}
//Shutdown the system
static void shutdown(){ system("(shutdown -p now) &"); }
//Restart the system
static void restart(){ system("(shutdown -r now) &"); }
};
/*
class LUMINA{
public:
static QIcon getIcon(QString iconname);
static QIcon getFileIcon(QString filename);
};
*/
#endif
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2012, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
#ifndef _LUMINA_DESKTOP_GLOBALS_H
#define _LUMINA_DESKTOP_GLOBALS_H
#include <unistd.h>
class SYSTEM{
public:
//Current Username
static QString user(){ return QString(getlogin()); }
//Current Hostname
static QString hostname(){
char name[50];
gethostname(name,sizeof(name));
return QString(name);
}
//Shutdown the system
static void shutdown(){ system("(shutdown -p now) &"); }
//Restart the system
static void restart(){ system("(shutdown -r now) &"); }
};
/*
class LUMINA{
public:
static QIcon getIcon(QString iconname);
static QIcon getFileIcon(QString filename);
};
*/
#endif
|
Fix up the Lumina compilation on 10.x
|
Fix up the Lumina compilation on 10.x
|
C
|
bsd-2-clause
|
pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects,pcbsd/external-projects
|
d09f9e3fd3ca978e0a20e63bdeb906c9592baf82
|
include/fileurlreader.h
|
include/fileurlreader.h
|
#ifndef NEWSBOAT_FILEURLREADER_H_
#define NEWSBOAT_FILEURLREADER_H_
#include <string>
#include "urlreader.h"
namespace newsboat {
class FileUrlReader : public UrlReader {
public:
explicit FileUrlReader(const std::string& file = "");
nonstd::optional<std::string> reload() override;
std::string get_source() override;
/// \brief Write URLs back to the input file.
///
/// This method is used after importing feeds from OPML.
nonstd::optional<std::string> write_config();
private:
const std::string filename;
};
}
#endif /* NEWSBOAT_FILEURLREADER_H_ */
|
#ifndef NEWSBOAT_FILEURLREADER_H_
#define NEWSBOAT_FILEURLREADER_H_
#include <string>
#include "urlreader.h"
namespace newsboat {
class FileUrlReader : public UrlReader {
public:
explicit FileUrlReader(const std::string& file = "");
/// \brief Load URLs from the urls file.
///
/// \return A non-value on success, an error message otherwise.
nonstd::optional<std::string> reload() override;
std::string get_source() override;
/// \brief Write URLs back to the urls file.
///
/// \return A non-value on success, an error message otherwise.
nonstd::optional<std::string> write_config();
private:
const std::string filename;
};
}
#endif /* NEWSBOAT_FILEURLREADER_H_ */
|
Document return value of FileUrlReader's reload() and write_config()
|
Document return value of FileUrlReader's reload() and write_config()
|
C
|
mit
|
der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat,newsboat/newsboat,der-lyse/newsboat,newsboat/newsboat,newsboat/newsboat,newsboat/newsboat,der-lyse/newsboat,der-lyse/newsboat
|
1cba0a11831e8920b4a958eee14d9785b034ad85
|
include/oc_clock_util.h
|
include/oc_clock_util.h
|
/*
// Copyright (c) 2019 Intel Corporation
//
// 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 OC_CLOCK_UTIL_H
#define OC_CLOCK_UTIL_H
#include "oc_config.h"
size_t oc_clock_time_rfc3339(char *out_buf, size_t out_buf_len);
size_t oc_clock_encode_time_rfc3339(oc_clock_time_t time, char *out_buf,
size_t out_buf_len);
oc_clock_time_t oc_clock_parse_time_rfc3339(const char *in_buf,
size_t in_buf_len);
#endif /* OC_CLOCK_UTIL_H */
|
/*
// Copyright (c) 2019 Intel Corporation
//
// 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 OC_CLOCK_UTIL_H
#define OC_CLOCK_UTIL_H
#include "oc_config.h"
#include <stddef.h>
size_t oc_clock_time_rfc3339(char *out_buf, size_t out_buf_len);
size_t oc_clock_encode_time_rfc3339(oc_clock_time_t time, char *out_buf,
size_t out_buf_len);
oc_clock_time_t oc_clock_parse_time_rfc3339(const char *in_buf,
size_t in_buf_len);
#endif /* OC_CLOCK_UTIL_H */
|
Fix unknown type name 'size_t' error
|
Fix unknown type name 'size_t' error
freertos build fails complaining that size_t is an unknown type.
'size_t' is defined in stddef.h so is is included in the
oc_clock_util header file to resolve the error.
Change-Id: I9cfe5daa7850ca33f920be6b276609ee659584c1
Signed-off-by: George Nash <acbdc39d528a4315fe0b532d55c50ae46f5c1667@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/27890
Tested-by: IoTivity Jenkins <6267f6022d49a8a37a7fe97da24aebfab797522c@iotivity.org>
Reviewed-by: Kishen Maloor <c62ddea3cd661a9268bff15f07fc2229cdc9ac02@intel.com>
|
C
|
apache-2.0
|
iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained,iotivity/iotivity-constrained
|
0630e7a6a475b03e1ea1a04de82d495acc839373
|
test/Driver/offloading-interoperability.c
|
test/Driver/offloading-interoperability.c
|
// REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: {{ld(.exe)?"}} {{.*}}"-m" "elf64lppc"
|
// REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary"{{( "--cuda")?}} "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le-unknown-linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: {{ld(.exe)?"}} {{.*}}"-m" "elf64lppc"
|
Revise test case due to the change from CUDA 10+.
|
Revise test case due to the change from CUDA 10+.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@362232 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
74337bcad01fa0cdf02b4df8bedce9c23177ccbc
|
linuxffbeffectfactory.h
|
linuxffbeffectfactory.h
|
#ifndef LINUXFFBEFFECTFACTORY_H
#define LINUXFFBEFFECTFACTORY_H
#include "globals.h"
#include "linuxffbconditioneffect.h"
#include "linuxffbconstanteffect.h"
#include "ffbnulleffect.h"
#include "linuxffbperiodiceffect.h"
#include "linuxffbrampeffect.h"
#include "linuxffbrumbleeffect.h"
class LinuxFFBEffectFactory
{
public:
static std::shared_ptr<FFBEffect> createEffect(FFBEffectTypes type);
private:
LinuxFFBEffectFactory() {};
};
#endif // LINUXFFBEFFECTFACTORY_H
|
#ifndef LINUXFFBEFFECTFACTORY_H
#define LINUXFFBEFFECTFACTORY_H
#include "globals.h"
#include "linuxffbconditioneffect.h"
#include "linuxffbconstanteffect.h"
#include "ffbnulleffect.h"
#include "linuxffbperiodiceffect.h"
#include "linuxffbrampeffect.h"
#include "linuxffbrumbleeffect.h"
class LinuxFFBEffectFactory
{
public:
static std::shared_ptr<FFBEffect> createEffect(FFBEffectTypes type);
LinuxFFBEffectFactory() = delete;
};
#endif // LINUXFFBEFFECTFACTORY_H
|
Use deleted instead of private constructors
|
Use deleted instead of private constructors
|
C
|
mit
|
MadCatX/FFBChecker,MadCatX/FFBChecker
|
d2b61ae1f672f6b0c6495d6571df298047e858f2
|
Tropos/Models/TRWeatherUpdate.h
|
Tropos/Models/TRWeatherUpdate.h
|
@class TRTemperature;
@interface TRWeatherUpdate : NSObject
@property (nonatomic, copy, readonly) NSString *city;
@property (nonatomic, copy, readonly) NSString *state;
@property (nonatomic, copy, readonly) NSString *conditionsDescription;
@property (nonatomic, readonly) TRTemperature *currentTemperature;
@property (nonatomic, readonly) TRTemperature *currentHigh;
@property (nonatomic, readonly) TRTemperature *currentLow;
@property (nonatomic, readonly) TRTemperature *yesterdaysTemperature;
@property (nonatomic, readonly) CGFloat windSpeed;
@property (nonatomic, readonly) CGFloat windBearing;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, copy, readonly) NSArray *dailyForecasts;
- (instancetype)initWithPlacemark:(CLPlacemark *)placemark currentConditionsJSON:(id)currentConditionsJSON yesterdaysConditionsJSON:(id)yesterdaysConditionsJSON;
@end
#import "TRAnalyticsEvent.h"
@interface TRWeatherUpdate (TRAnalytics) <TRAnalyticsEvent>
@end
|
@class CLPlacemark;
@class TRTemperature;
@interface TRWeatherUpdate : NSObject
@property (nonatomic, copy, readonly) NSString *city;
@property (nonatomic, copy, readonly) NSString *state;
@property (nonatomic, copy, readonly) NSString *conditionsDescription;
@property (nonatomic, readonly) TRTemperature *currentTemperature;
@property (nonatomic, readonly) TRTemperature *currentHigh;
@property (nonatomic, readonly) TRTemperature *currentLow;
@property (nonatomic, readonly) TRTemperature *yesterdaysTemperature;
@property (nonatomic, readonly) CGFloat windSpeed;
@property (nonatomic, readonly) CGFloat windBearing;
@property (nonatomic, readonly) NSDate *date;
@property (nonatomic, copy, readonly) NSArray *dailyForecasts;
- (instancetype)initWithPlacemark:(CLPlacemark *)placemark currentConditionsJSON:(id)currentConditionsJSON yesterdaysConditionsJSON:(id)yesterdaysConditionsJSON;
@end
#import "TRAnalyticsEvent.h"
@interface TRWeatherUpdate (TRAnalytics) <TRAnalyticsEvent>
@end
|
Fix compiler error about undeclared type
|
Fix compiler error about undeclared type
|
C
|
mit
|
hanpanpan200/Tropos,red3/Tropos,Ezimetzhan/Tropos,andreamazz/Tropos,red3/Tropos,hanpanpan200/Tropos,andreamazz/Tropos,thoughtbot/Tropos,tkafka/Tropos,kevinnguy/Tropos,coty/Tropos,ashfurrow/Tropos,Ezimetzhan/Tropos,tkafka/Tropos,ashfurrow/Tropos,lufeifan531/Tropos,thoughtbot/Tropos,kevinnguy/Tropos,lufeifan531/Tropos,andreamazz/Tropos,faimin/Tropos,iOSTestApps/Tropos,red3/Tropos,hanpanpan200/Tropos,faimin/Tropos,faimin/Tropos,iOSTestApps/Tropos,tkafka/Tropos,thoughtbot/Tropos,coty/Tropos,lufeifan531/Tropos,coty/Tropos,Ezimetzhan/Tropos,kevinnguy/Tropos
|
bc11202f53d082c559ff5d0ce1693c463b4777db
|
VisualPractice/auxiliary.h
|
VisualPractice/auxiliary.h
|
#ifndef TE_AUXILIARY_H
#define TE_AUXILIARY_H
struct SDL_Rect;
namespace te
{
struct Vector2i;
class Rectangle;
bool checkCollision(const SDL_Rect& a, const SDL_Rect& b);
bool checkCollision(const Rectangle& a, const Rectangle& b);
SDL_Rect getIntersection(const SDL_Rect& a, const SDL_Rect& b);
SDL_Rect getIntersection(const Rectangle& a, const Rectangle& b);
Vector2i getCenter(const SDL_Rect& rect);
Vector2i getCenter(const Rectangle& rect);
void handlePaddleCollision(Rectangle& ball, const Rectangle& paddle, float dt, float velocityScalar = 200.f);
void handleWallCollision(Rectangle& ball, const Rectangle& wall, float dt);
}
#endif
|
#ifndef TE_AUXILIARY_H
#define TE_AUXILIARY_H
#include <map>
struct SDL_Rect;
namespace te
{
struct Vector2i;
class Rectangle;
bool checkCollision(const SDL_Rect& a, const SDL_Rect& b);
bool checkCollision(const Rectangle& a, const Rectangle& b);
SDL_Rect getIntersection(const SDL_Rect& a, const SDL_Rect& b);
SDL_Rect getIntersection(const Rectangle& a, const Rectangle& b);
Vector2i getCenter(const SDL_Rect& rect);
Vector2i getCenter(const Rectangle& rect);
void handlePaddleCollision(Rectangle& ball, const Rectangle& paddle, float dt, float velocityScalar = 200.f);
void handleWallCollision(Rectangle& ball, const Rectangle& wall, float dt);
template <class K, class V>
void insertOrAssign(std::map<K,V>& map, std::pair<K, V>&& kvPair)
{
auto it = map.find(kvPair.first);
if (it == map.end())
{
map.insert(std::move(kvPair));
}
else
{
it->second = std::move(kvPair.second);
}
}
template <class K, class V>
void insertOrAssign(std::map<K, V>& map, const std::pair<K, V>& kvPair)
{
auto it = map.find(kvPair.first);
if (it != map.end())
{
map.insert(kvPair);
}
else
{
it->second = kvPair.second;
}
}
}
#endif
|
Add insertOrAssign helper for maps
|
Add insertOrAssign helper for maps
|
C
|
mit
|
evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngine,evinstk/TantechEngineOriginal,evinstk/TantechEngineOriginal,evinstk/TantechEngine
|
ee1c71c7abb67a59dd754a92989c9d18758b2eea
|
webkit/glue/form_data.h
|
webkit/glue/form_data.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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
FormData() : user_submitted(false) {}
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
|
Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site.
|
AutoFill: Add a default constructor for FormData. There are too many places
that create FormDatas, and we shouldn't need to initialize user_submitted for
each call site.
BUG=50423
TEST=none
Review URL: http://codereview.chromium.org/3074023
git-svn-id: http://src.chromium.org/svn/trunk/src@54641 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: a7f3d5712d54ae80ca6a2a747522f8ae65c0ed98
|
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
|
b3676dfdad184acc12b768f5c82e3ec7ccecbaf5
|
src/rtcmix/Instrument.h
|
src/rtcmix/Instrument.h
|
extern "C" {
#include <sys/types.h>
}
class Instrument {
public:
float start;
float dur;
int cursamp;
int chunksamps;
int endsamp;
int nsamps;
unsigned long chunkstart;
int sfile_on; // a soundfile is open (for closing later)
int fdIndex; // index into unix input file desc. table
int inputchans;
double inputsr;
off_t fileOffset; // current offset in file for this inst
int mytag; // for note tagging/rtupdate()
Instrument();
virtual ~Instrument();
virtual int init(float*, short);
virtual int run();
virtual float getstart();
virtual float getdur();
virtual int getendsamp();
virtual void setendsamp(int);
virtual void setchunk(int);
virtual void setchunkstart(int);
private:
void gone(); // decrements reference to input soundfile
};
extern void heapify(Instrument *Iptr);
extern void heapSched(Instrument *Iptr);
extern int rtsetoutput(float, float, Instrument*);
extern int rtsetinput(float, Instrument*);
extern int rtaddout(float*);
extern int rtbaddout(float*, int);
extern "C" int rtgetin(float*, Instrument*, int);
extern float rtupdate(int, int); // tag, p-field for return value
|
#include <sys/types.h>
class Instrument {
public:
float start;
float dur;
int cursamp;
int chunksamps;
int endsamp;
int nsamps;
unsigned long chunkstart;
int sfile_on; // a soundfile is open (for closing later)
int fdIndex; // index into unix input file desc. table
int inputchans;
double inputsr;
off_t fileOffset; // current offset in file for this inst
int mytag; // for note tagging/rtupdate()
Instrument();
virtual ~Instrument();
virtual int init(float*, short);
virtual int run();
virtual float getstart();
virtual float getdur();
virtual int getendsamp();
virtual void setendsamp(int);
virtual void setchunk(int);
virtual void setchunkstart(int);
private:
void gone(); // decrements reference to input soundfile
};
extern void heapify(Instrument *Iptr);
extern void heapSched(Instrument *Iptr);
extern int rtsetoutput(float, float, Instrument*);
extern int rtsetinput(float, Instrument*);
extern int rtaddout(float*);
extern int rtbaddout(float*, int);
extern int rtgetin(float*, Instrument*, int);
extern float rtupdate(int, int); // tag, p-field for return value
|
Remove apparently uneccessary extern C stuff
|
Remove apparently uneccessary extern C stuff
|
C
|
apache-2.0
|
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
|
39a1884968170f7ca948a236ebc5d510c0c45af5
|
test/Analysis/complex.c
|
test/Analysis/complex.c
|
// RUN: clang -checker-simple -verify %s
#include <stdlib.h>
int f1(int * p) {
// This branch should be infeasible
// because __imag__ p is 0.
if (!p && __imag__ (intptr_t) p)
*p = 1; // no-warning
// If p != 0 then this branch is feasible; otherwise it is not.
if (__real__ (intptr_t) p)
*p = 1; // no-warning
*p = 2; // expected-warning{{Dereference of null pointer}}
}
|
// RUN: clang -checker-simple -verify %s
#include <stdint.h>
int f1(int * p) {
// This branch should be infeasible
// because __imag__ p is 0.
if (!p && __imag__ (intptr_t) p)
*p = 1; // no-warning
// If p != 0 then this branch is feasible; otherwise it is not.
if (__real__ (intptr_t) p)
*p = 1; // no-warning
*p = 2; // expected-warning{{Dereference of null pointer}}
}
|
Include stdint.h instead of stdio.h.
|
Include stdint.h instead of stdio.h.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@52578 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
effc775ef0269be2600ec6ad61f905173ecfd428
|
src/util.h
|
src/util.h
|
/*
* The Homework Database
*
* Authors:
* Oliver Sharma and Joe Sventek
* {oliver, joe}@dcs.gla.ac.uk
*
* (c) 2009. All rights reserved.
*/
#ifndef OCLIB_UTIL_H
#define OCLIB_UTIL_H
#include "config.h"
#include "logdefs.h"
#include <stdio.h>
/* -------- [MESSAGE] -------- */
#ifdef NMSG
#define MSG (void)
#else
#define MSG printf("DBSERVER> "); printf
#endif
#endif
|
/*
* Copyright (c) 2013, Court of the University of Glasgow
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - 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.
*
* - Neither the name of the University of Glasgow nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
*/
/*
* The Homework Database
*
* Authors:
* Oliver Sharma and Joe Sventek
* {oliver, joe}@dcs.gla.ac.uk
*
*/
#ifndef OCLIB_UTIL_H
#define OCLIB_UTIL_H
#include "config.h"
#include "logdefs.h"
#include <stdio.h>
/* -------- [MESSAGE] -------- */
#ifdef NMSG
#define MSG (void)
#else
#define MSG printf("DBSERVER> "); printf
#endif
#endif
|
Add BSD 3-clause open source header
|
Add BSD 3-clause open source header
|
C
|
bsd-3-clause
|
jsventek/Cache,jsventek/Cache,fergul/Cache,fergul/Cache,fergul/Cache,jsventek/Cache
|
0d95270ddad8133f04047a15a6b8b2887a5d97a8
|
src/couv.c
|
src/couv.c
|
#include "couv-private.h"
static int couv_hrtime(lua_State *L) {
lua_pushnumber(L, uv_hrtime() / 1e9);
return 1;
}
static const struct luaL_Reg functions[] = {
{ "hrtime", couv_hrtime },
{ NULL, NULL }
};
int luaopen_couv_native(lua_State *L) {
lua_createtable(L, 0, ARRAY_SIZE(functions) - 1);
couvL_setfuncs(L, functions, 0);
luaopen_couv_loop(L);
luaopen_couv_buffer(L);
luaopen_couv_fs(L);
luaopen_couv_ipaddr(L);
luaopen_couv_handle(L);
luaopen_couv_pipe(L);
luaopen_couv_stream(L);
luaopen_couv_tcp(L);
luaopen_couv_timer(L);
luaopen_couv_tty(L);
luaopen_couv_udp(L);
return 1;
}
|
#include "couv-private.h"
static int couv_hrtime(lua_State *L) {
lua_pushnumber(L, uv_hrtime());
return 1;
}
static const struct luaL_Reg functions[] = {
{ "hrtime", couv_hrtime },
{ NULL, NULL }
};
int luaopen_couv_native(lua_State *L) {
lua_createtable(L, 0, ARRAY_SIZE(functions) - 1);
couvL_setfuncs(L, functions, 0);
luaopen_couv_loop(L);
luaopen_couv_buffer(L);
luaopen_couv_fs(L);
luaopen_couv_ipaddr(L);
luaopen_couv_handle(L);
luaopen_couv_pipe(L);
luaopen_couv_stream(L);
luaopen_couv_tcp(L);
luaopen_couv_timer(L);
luaopen_couv_tty(L);
luaopen_couv_udp(L);
return 1;
}
|
Change return value of hrtime from seconds to nano seconds.
|
Change return value of hrtime from seconds to nano seconds.
|
C
|
mit
|
hnakamur/couv,hnakamur/couv
|
01b0b70139f2378c410b089f843c61fb61583031
|
Utilities/vxl/v3p/netlib/libf2c/pow_ii.c
|
Utilities/vxl/v3p/netlib/libf2c/pow_ii.c
|
#include "v3p_f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef KR_headers
integer pow_ii(ap, bp) integer *ap, *bp;
#else
integer pow_ii(integer *ap, integer *bp)
#endif
{
integer pow, x, n;
unsigned long u;
x = *ap;
n = *bp;
if (n <= 0) {
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1/x : 0;
n = -n;
}
u = n;
for(pow = 1; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
return(pow);
}
#ifdef __cplusplus
}
#endif
|
#include "v3p_f2c.h"
#ifdef __cplusplus
extern "C" {
#endif
/* The divide by zero below appears to be perhaps on purpose to create
a numerical exception. */
#ifdef _MSC_VER
# pragma warning (disable: 4723) /* potential divide by 0 */
#endif
#ifdef KR_headers
integer pow_ii(ap, bp) integer *ap, *bp;
#else
integer pow_ii(integer *ap, integer *bp)
#endif
{
integer pow, x, n;
unsigned long u;
x = *ap;
n = *bp;
if (n <= 0) {
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1/x : 0;
n = -n;
}
u = n;
for(pow = 1; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
return(pow);
}
#ifdef __cplusplus
}
#endif
|
Disable divide by zero warning for VS6 to avoid modifying function implementation.
|
COMP: Disable divide by zero warning for VS6 to avoid modifying function implementation.
|
C
|
apache-2.0
|
InsightSoftwareConsortium/ITK,rhgong/itk-with-dom,LucHermitte/ITK,LucasGandel/ITK,cpatrick/ITK-RemoteIO,jcfr/ITK,paulnovo/ITK,blowekamp/ITK,eile/ITK,GEHC-Surgery/ITK,hjmjohnson/ITK,atsnyder/ITK,biotrump/ITK,richardbeare/ITK,jmerkow/ITK,blowekamp/ITK,vfonov/ITK,jcfr/ITK,malaterre/ITK,jmerkow/ITK,hjmjohnson/ITK,vfonov/ITK,msmolens/ITK,fbudin69500/ITK,fbudin69500/ITK,BlueBrain/ITK,fuentesdt/InsightToolkit-dev,wkjeong/ITK,jcfr/ITK,PlutoniumHeart/ITK,Kitware/ITK,cpatrick/ITK-RemoteIO,PlutoniumHeart/ITK,eile/ITK,daviddoria/itkHoughTransform,daviddoria/itkHoughTransform,GEHC-Surgery/ITK,GEHC-Surgery/ITK,zachary-williamson/ITK,rhgong/itk-with-dom,CapeDrew/DITK,zachary-williamson/ITK,blowekamp/ITK,fedral/ITK,thewtex/ITK,fbudin69500/ITK,paulnovo/ITK,paulnovo/ITK,eile/ITK,ajjl/ITK,blowekamp/ITK,CapeDrew/DITK,daviddoria/itkHoughTransform,hendradarwin/ITK,atsnyder/ITK,hendradarwin/ITK,biotrump/ITK,fedral/ITK,malaterre/ITK,hendradarwin/ITK,stnava/ITK,heimdali/ITK,fedral/ITK,InsightSoftwareConsortium/ITK,cpatrick/ITK-RemoteIO,zachary-williamson/ITK,CapeDrew/DITK,ajjl/ITK,LucHermitte/ITK,malaterre/ITK,ajjl/ITK,thewtex/ITK,InsightSoftwareConsortium/ITK,hendradarwin/ITK,spinicist/ITK,zachary-williamson/ITK,CapeDrew/DCMTK-ITK,atsnyder/ITK,rhgong/itk-with-dom,jmerkow/ITK,PlutoniumHeart/ITK,rhgong/itk-with-dom,LucasGandel/ITK,hinerm/ITK,fedral/ITK,rhgong/itk-with-dom,CapeDrew/DITK,eile/ITK,BlueBrain/ITK,fedral/ITK,wkjeong/ITK,wkjeong/ITK,BRAINSia/ITK,CapeDrew/DITK,wkjeong/ITK,hjmjohnson/ITK,spinicist/ITK,vfonov/ITK,msmolens/ITK,biotrump/ITK,jmerkow/ITK,fedral/ITK,daviddoria/itkHoughTransform,eile/ITK,fuentesdt/InsightToolkit-dev,BlueBrain/ITK,msmolens/ITK,Kitware/ITK,thewtex/ITK,ajjl/ITK,CapeDrew/DCMTK-ITK,paulnovo/ITK,blowekamp/ITK,cpatrick/ITK-RemoteIO,stnava/ITK,biotrump/ITK,itkvideo/ITK,CapeDrew/DCMTK-ITK,jmerkow/ITK,GEHC-Surgery/ITK,hinerm/ITK,cpatrick/ITK-RemoteIO,richardbeare/ITK,heimdali/ITK,jcfr/ITK,msmolens/ITK,biotrump/ITK,hjmjohnson/ITK,LucHermitte/ITK,PlutoniumHeart/ITK,malaterre/ITK,wkjeong/ITK,thewtex/ITK,hinerm/ITK,LucHermitte/ITK,stnava/ITK,jmerkow/ITK,heimdali/ITK,itkvideo/ITK,malaterre/ITK,atsnyder/ITK,CapeDrew/DITK,wkjeong/ITK,stnava/ITK,rhgong/itk-with-dom,LucHermitte/ITK,hjmjohnson/ITK,GEHC-Surgery/ITK,BRAINSia/ITK,fedral/ITK,LucasGandel/ITK,BlueBrain/ITK,BlueBrain/ITK,daviddoria/itkHoughTransform,hendradarwin/ITK,eile/ITK,LucHermitte/ITK,vfonov/ITK,heimdali/ITK,ajjl/ITK,CapeDrew/DITK,itkvideo/ITK,rhgong/itk-with-dom,hendradarwin/ITK,Kitware/ITK,itkvideo/ITK,BRAINSia/ITK,LucasGandel/ITK,CapeDrew/DCMTK-ITK,zachary-williamson/ITK,heimdali/ITK,blowekamp/ITK,CapeDrew/DCMTK-ITK,GEHC-Surgery/ITK,hendradarwin/ITK,fbudin69500/ITK,jcfr/ITK,hjmjohnson/ITK,itkvideo/ITK,thewtex/ITK,fuentesdt/InsightToolkit-dev,itkvideo/ITK,PlutoniumHeart/ITK,CapeDrew/DCMTK-ITK,zachary-williamson/ITK,hinerm/ITK,thewtex/ITK,msmolens/ITK,eile/ITK,eile/ITK,fuentesdt/InsightToolkit-dev,LucasGandel/ITK,stnava/ITK,jmerkow/ITK,hinerm/ITK,LucasGandel/ITK,spinicist/ITK,fuentesdt/InsightToolkit-dev,PlutoniumHeart/ITK,CapeDrew/DITK,itkvideo/ITK,atsnyder/ITK,msmolens/ITK,Kitware/ITK,wkjeong/ITK,stnava/ITK,vfonov/ITK,GEHC-Surgery/ITK,fbudin69500/ITK,BRAINSia/ITK,paulnovo/ITK,jcfr/ITK,vfonov/ITK,heimdali/ITK,zachary-williamson/ITK,jcfr/ITK,heimdali/ITK,biotrump/ITK,richardbeare/ITK,paulnovo/ITK,ajjl/ITK,itkvideo/ITK,InsightSoftwareConsortium/ITK,atsnyder/ITK,PlutoniumHeart/ITK,biotrump/ITK,zachary-williamson/ITK,fuentesdt/InsightToolkit-dev,stnava/ITK,blowekamp/ITK,zachary-williamson/ITK,spinicist/ITK,LucasGandel/ITK,hinerm/ITK,stnava/ITK,GEHC-Surgery/ITK,ajjl/ITK,LucHermitte/ITK,jmerkow/ITK,BlueBrain/ITK,hendradarwin/ITK,daviddoria/itkHoughTransform,InsightSoftwareConsortium/ITK,spinicist/ITK,heimdali/ITK,PlutoniumHeart/ITK,cpatrick/ITK-RemoteIO,fuentesdt/InsightToolkit-dev,thewtex/ITK,fedral/ITK,daviddoria/itkHoughTransform,atsnyder/ITK,spinicist/ITK,fbudin69500/ITK,fuentesdt/InsightToolkit-dev,msmolens/ITK,hinerm/ITK,spinicist/ITK,InsightSoftwareConsortium/ITK,fuentesdt/InsightToolkit-dev,wkjeong/ITK,daviddoria/itkHoughTransform,richardbeare/ITK,atsnyder/ITK,jcfr/ITK,biotrump/ITK,cpatrick/ITK-RemoteIO,richardbeare/ITK,malaterre/ITK,malaterre/ITK,InsightSoftwareConsortium/ITK,fbudin69500/ITK,BRAINSia/ITK,blowekamp/ITK,paulnovo/ITK,BlueBrain/ITK,LucasGandel/ITK,spinicist/ITK,BRAINSia/ITK,vfonov/ITK,richardbeare/ITK,fbudin69500/ITK,Kitware/ITK,Kitware/ITK,cpatrick/ITK-RemoteIO,paulnovo/ITK,msmolens/ITK,BRAINSia/ITK,daviddoria/itkHoughTransform,vfonov/ITK,CapeDrew/DCMTK-ITK,CapeDrew/DITK,spinicist/ITK,vfonov/ITK,Kitware/ITK,atsnyder/ITK,ajjl/ITK,hjmjohnson/ITK,malaterre/ITK,eile/ITK,CapeDrew/DCMTK-ITK,BlueBrain/ITK,LucHermitte/ITK,hinerm/ITK,CapeDrew/DCMTK-ITK,hinerm/ITK,malaterre/ITK,itkvideo/ITK,rhgong/itk-with-dom,richardbeare/ITK,stnava/ITK
|
f1de1efb2a910bc36656ae4691b647ada74f6f88
|
ios/OAuthManager/OAuthManager.h
|
ios/OAuthManager/OAuthManager.h
|
//
// OAuthManager.h
//
// Created by Ari Lerner on 5/31/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#if __has_include("RCTBridgeModule.h")
#import "RCTBridgeModule.h"
#else
#import <React/RCTBridgeModule.h>
#endif
#if __has_include("RCTLinkingManager.h")
#import "RCTLinkingManager.h"
#else
#import <React/RCTLinkingManager.h>
#endif
@class OAuthClient;
static NSString *kAuthConfig = @"OAuthManager";
@interface OAuthManager : NSObject <RCTBridgeModule, UIWebViewDelegate>
+ (instancetype) sharedManager;
+ (BOOL)setupOAuthHandler:(UIApplication *)application;
+ (BOOL)handleOpenUrl:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
- (BOOL) _configureProvider:(NSString *) name andConfig:(NSDictionary *) config;
- (NSDictionary *) getConfigForProvider:(NSString *)name;
@property (nonatomic, strong) NSDictionary *providerConfig;
@property (nonatomic, strong) NSArray *callbackUrls;
@end
|
//
// OAuthManager.h
//
// Created by Ari Lerner on 5/31/16.
// Copyright © 2016 Facebook. All rights reserved.
//
#import <Foundation/Foundation.h>
#if __has_include(<React/RCTBridgeModule.h>)
#import <React/RCTBridgeModule.h>
#else
#import "RCTBridgeModule.h"
#endif
#if __has_include(<React/RCTLinkingManager.h>)
#import <React/RCTLinkingManager.h>
#else
#import "RCTLinkingManager.h"
#endif
@class OAuthClient;
static NSString *kAuthConfig = @"OAuthManager";
@interface OAuthManager : NSObject <RCTBridgeModule, UIWebViewDelegate>
+ (instancetype) sharedManager;
+ (BOOL)setupOAuthHandler:(UIApplication *)application;
+ (BOOL)handleOpenUrl:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
- (BOOL) _configureProvider:(NSString *) name andConfig:(NSDictionary *) config;
- (NSDictionary *) getConfigForProvider:(NSString *)name;
@property (nonatomic, strong) NSDictionary *providerConfig;
@property (nonatomic, strong) NSArray *callbackUrls;
@end
|
Duplicate RCTMethodInfo while building iOS app
|
Fix: Duplicate RCTMethodInfo while building iOS app
|
C
|
mit
|
fullstackreact/react-native-oauth,fullstackreact/react-native-oauth,fullstackreact/react-native-oauth
|
46d5de0f96a81050a65aa72faabdb5554c906842
|
c/src/ta_data/ta_adddatasourceparam_priv.h
|
c/src/ta_data/ta_adddatasourceparam_priv.h
|
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H
#define TA_ADDDATASOURCEPARAM_PRIV_H
/* The following is a private copy of the user provided
* parameters for a TA_AddDataSource call.
*
* Code is in 'ta_data_interface.c'
*/
typedef struct
{
TA_SourceId id;
TA_SourceFlag flags;
TA_Period period;
TA_String *location;
TA_String *info;
TA_String *username;
TA_String *password;
TA_String *category;
TA_String *country;
TA_String *exchange;
TA_String *type;
TA_String *symbol;
} TA_AddDataSourceParamPriv;
/* Function to alloc/free a TA_AddDataSourceParamPriv. */
TA_AddDataSourceParamPriv *TA_AddDataSourceParamPrivAlloc( const TA_AddDataSourceParam *param );
TA_RetCode TA_AddDataSourceParamPrivFree( TA_AddDataSourceParamPriv *toBeFreed );
#endif
|
#ifndef TA_ADDDATASOURCEPARAM_PRIV_H
#define TA_ADDDATASOURCEPARAM_PRIV_H
/* The following is a private copy of the user provided
* parameters for a TA_AddDataSource call.
*
* Code is in 'ta_data_interface.c'
*/
typedef struct
{
TA_SourceId id;
TA_SourceFlag flags;
TA_Period period;
TA_String *location;
TA_String *info;
TA_String *username;
TA_String *password;
TA_String *category;
TA_String *country;
TA_String *exchange;
TA_String *type;
TA_String *symbol;
TA_String *name;
} TA_AddDataSourceParamPriv;
/* Function to alloc/free a TA_AddDataSourceParamPriv. */
TA_AddDataSourceParamPriv *TA_AddDataSourceParamPrivAlloc( const TA_AddDataSourceParam *param );
TA_RetCode TA_AddDataSourceParamPrivFree( TA_AddDataSourceParamPriv *toBeFreed );
#endif
|
Add "TA_String *name" to TA_AddDataSourceParamPriv
|
Add "TA_String *name" to TA_AddDataSourceParamPriv
git-svn-id: 33305d871a58cfd02b407b81d5206d2a785211eb@541 159cb52c-178a-4f3c-8eb8-d0aff033d058
|
C
|
bsd-3-clause
|
shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib,shamanland/ta-lib
|
f20b984aa6bffeaccdd9b789fc543c93f20271f9
|
protocols/groupwise/libgroupwise/tasks/getdetailstask.h
|
protocols/groupwise/libgroupwise/tasks/getdetailstask.h
|
//
// C++ Interface: getdetailstask
//
// Description:
//
//
// Author: SUSE AG <>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef GETDETAILSTASK_H
#define GETDETAILSTASK_H
#include "gwerror.h"
#include "requesttask.h"
/**
This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user.
@author SUSE AG
*/
using namespace GroupWise;
class GetDetailsTask : public RequestTask
{
Q_OBJECT
public:
GetDetailsTask( Task * parent );
~GetDetailsTask();
bool take( Transfer * transfer );
void userDNs( const QStringList & userDNs );
signals:
void gotContactUserDetails( const ContactDetails & );
protected:
GroupWise::ContactDetails extractUserDetails( Field::MultiField * details );
};
#endif
|
//
// C++ Interface: getdetailstask
//
// Description:
//
//
// Author: SUSE AG <>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef GETDETAILSTASK_H
#define GETDETAILSTASK_H
#include "gwerror.h"
#include "requesttask.h"
/**
This task fetches the details for a set of user IDs from the server. Sometimes we get an event that only has a DN, and we need other details before showing the event to the user.
@author SUSE AG
*/
using namespace GroupWise;
class GetDetailsTask : public RequestTask
{
Q_OBJECT
public:
GetDetailsTask( Task * parent );
~GetDetailsTask();
bool take( Transfer * transfer );
void userDNs( const QStringList & userDNs );
signals:
void gotContactUserDetails( const GroupWise::ContactDetails & );
protected:
GroupWise::ContactDetails extractUserDetails( Field::MultiField * details );
};
#endif
|
Fix broken signal connection CVS_SILENT
|
Fix broken signal connection
CVS_SILENT
svn path=/branches/groupwise_in_anger/kdenetwork/kopete/; revision=344030
|
C
|
lgpl-2.1
|
josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,josh-wambua/kopete,josh-wambua/kopete,josh-wambua/kopete,Jtalk/kopete-fork-xep0136,Jtalk/kopete-fork-xep0136,josh-wambua/kopete
|
3313382ec12352d9c7f2458cd293ed9f901aa38f
|
webkit/glue/form_data.h
|
webkit/glue/form_data.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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_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 WEBKIT_GLUE_FORM_DATA_H__
#define WEBKIT_GLUE_FORM_DATA_H__
#include <vector>
#include "base/string_util.h"
#include "googleurl/src/gurl.h"
#include "webkit/glue/form_field.h"
namespace webkit_glue {
// Holds information about a form to be filled and/or submitted.
struct FormData {
// The name of the form.
string16 name;
// GET or POST.
string16 method;
// The URL (minus query parameters) containing the form.
GURL origin;
// The action target of the form.
GURL action;
// true if this form was submitted by a user gesture and not javascript.
bool user_submitted;
// A vector of all the input fields in the form.
std::vector<FormField> fields;
FormData() : user_submitted(false) {}
// Used by FormStructureTest.
inline bool operator==(const FormData& form) const {
return (name == form.name &&
StringToLowerASCII(method) == StringToLowerASCII(form.method) &&
origin == form.origin &&
action == form.action &&
user_submitted == form.user_submitted &&
fields == form.fields);
}
};
} // namespace webkit_glue
#endif // WEBKIT_GLUE_FORM_DATA_H__
|
Add a default constructor for FormData. There are too many places that create FormDatas, and we shouldn't need to initialize user_submitted for each call site.
|
AutoFill: Add a default constructor for FormData. There are too many places
that create FormDatas, and we shouldn't need to initialize user_submitted for
each call site.
BUG=50423
TEST=none
Review URL: http://codereview.chromium.org/3074023
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@54641 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
rogerwang/chromium,anirudhSK/chromium,anirudhSK/chromium,rogerwang/chromium,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,rogerwang/chromium,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,rogerwang/chromium,timopulkkinen/BubbleFish,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,anirudhSK/chromium,ltilve/chromium,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,patrickm/chromium.src,Just-D/chromium-1,zcbenz/cefode-chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,robclark/chromium,chuan9/chromium-crosswalk,robclark/chromium,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,anirudhSK/chromium,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,dednal/chromium.src,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,ltilve/chromium,M4sse/chromium.src,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,keishi/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Just-D/chromium-1,jaruba/chromium.src,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,rogerwang/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,krieger-od/nwjs_chromium.src,keishi/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,keishi/chromium,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,keishi/chromium,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,Jonekee/chromium.src,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk-efl,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,robclark/chromium,nacl-webkit/chrome_deps,littlstar/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,ltilve/chromium,jaruba/chromium.src,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,ltilve/chromium,M4sse/chromium.src,keishi/chromium,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,dednal/chromium.src,ltilve/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,ltilve/chromium,dushu1203/chromium.src,keishi/chromium,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,Just-D/chromium-1,nacl-webkit/chrome_deps,jaruba/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,M4sse/chromium.src,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,dednal/chromium.src,hgl888/chromium-crosswalk-efl,keishi/chromium,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,ltilve/chromium,jaruba/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,anirudhSK/chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk-efl,ltilve/chromium,hujiajie/pa-chromium,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,dednal/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,jaruba/chromium.src,littlstar/chromium.src,zcbenz/cefode-chromium,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,robclark/chromium,Just-D/chromium-1,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,dednal/chromium.src,littlstar/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,rogerwang/chromium,bright-sparks/chromium-spacewalk,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,M4sse/chromium.src,keishi/chromium,fujunwei/chromium-crosswalk,robclark/chromium,patrickm/chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,rogerwang/chromium,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,robclark/chromium,rogerwang/chromium,ltilve/chromium,patrickm/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,rogerwang/chromium,patrickm/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,nacl-webkit/chrome_deps,robclark/chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk,dushu1203/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,robclark/chromium,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,keishi/chromium,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,dushu1203/chromium.src,keishi/chromium,axinging/chromium-crosswalk,Chilledheart/chromium,mogoweb/chromium-crosswalk,Just-D/chromium-1
|
3d432822d5b0d14c7f661bbc8cadb287f4531528
|
3RVX/MeterWnd/Animation.h
|
3RVX/MeterWnd/Animation.h
|
#pragma once
#include "MeterWnd.h"
class Animation {
public:
virtual bool Animate(MeterWnd *meterWnd) = 0;
virtual void Reset(MeterWnd *meterWnd) = 0;
};
|
#pragma once
class MeterWnd;
class Animation {
public:
virtual bool Animate(MeterWnd *meterWnd) = 0;
virtual void Reset(MeterWnd *meterWnd) = 0;
};
|
Use forward declaration for MeterWnd
|
Use forward declaration for MeterWnd
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,Soulflare3/3RVX,malensek/3RVX,Soulflare3/3RVX,Soulflare3/3RVX
|
0e363dd05530ea6d0fe407bfbeb0eff4706301cc
|
tests/apps/barrier/barrier_test.c
|
tests/apps/barrier/barrier_test.c
|
/****************************************************
* This is a test that will test barriers *
****************************************************/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include "carbon_user.h"
#include "capi.h"
#include "sync_api.h"
carbon_barrier_t my_barrier;
// Functions executed by threads
void* test_wait_barrier(void * threadid);
int main(int argc, char* argv[]) // main begins
{
CarbonStartSim();
const unsigned int num_threads = 5;
carbon_thread_t threads[num_threads];
barrierInit(&my_barrier, num_threads);
for(unsigned int i = 0; i < num_threads; i++)
threads[i] = CarbonSpawnThread(test_wait_barrier, (void *) i);
for(unsigned int i = 0; i < num_threads; i++)
CarbonJoinThread(threads[i]);
printf("Finished running barrier test!.\n");
CarbonStopSim();
return 0;
} // main ends
void* test_wait_barrier(void *threadid)
{
for (unsigned int i = 0; i < 50; i++)
barrierWait(&my_barrier);
return NULL;
}
|
/****************************************************
* This is a test that will test barriers *
****************************************************/
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include "carbon_user.h"
#include "capi.h"
#include "sync_api.h"
carbon_barrier_t my_barrier;
// Functions executed by threads
void* test_wait_barrier(void * threadid);
int main(int argc, char* argv[]) // main begins
{
CarbonStartSim();
const unsigned int num_threads = 5;
carbon_thread_t threads[num_threads];
CarbonBarrierInit(&my_barrier, num_threads);
for(unsigned int i = 0; i < num_threads; i++)
threads[i] = CarbonSpawnThread(test_wait_barrier, (void *) i);
for(unsigned int i = 0; i < num_threads; i++)
CarbonJoinThread(threads[i]);
printf("Finished running barrier test!.\n");
CarbonStopSim();
return 0;
} // main ends
void* test_wait_barrier(void *threadid)
{
for (unsigned int i = 0; i < 50; i++)
CarbonBarrierWait(&my_barrier);
return NULL;
}
|
Update barrier test to new api.
|
[tests] Update barrier test to new api.
|
C
|
mit
|
victorisildur/Graphite,mit-carbon/Graphite-Cycle-Level,mit-carbon/Graphite-Cycle-Level,mit-carbon/Graphite,mit-carbon/Graphite-Cycle-Level,8l/Graphite,victorisildur/Graphite,8l/Graphite,nkawahara/Graphite,fhijaz/Graphite,8l/Graphite,8l/Graphite,mit-carbon/Graphite-Cycle-Level,nkawahara/Graphite,nkawahara/Graphite,mit-carbon/Graphite,mit-carbon/Graphite,mit-carbon/Graphite,nkawahara/Graphite,fhijaz/Graphite,victorisildur/Graphite,fhijaz/Graphite,victorisildur/Graphite,fhijaz/Graphite
|
135c7668abe9b92fc103fda87f4f1ad255951184
|
src/utils/path_helper.h
|
src/utils/path_helper.h
|
#ifndef SRC_UTILS_PATH_HELPER_H_
#define SRC_UTILS_PATH_HELPER_H_
#include <QFile>
#include <QUrl>
#include <QDir>
#include <QCoreApplication>
#include <string>
inline QString absolutePathOfRelativeUrl(QUrl url)
{
return QDir(QCoreApplication::applicationDirPath())
.absoluteFilePath(url.toLocalFile());
}
inline std::string absolutePathOfRelativePath(std::string relativePath)
{
return QDir(QCoreApplication::applicationDirPath())
.absoluteFilePath(QString(relativePath.c_str()))
.toStdString();
}
#endif // SRC_UTILS_PATH_HELPER_H_
|
#ifndef SRC_UTILS_PATH_HELPER_H_
#define SRC_UTILS_PATH_HELPER_H_
#include <QFile>
#include <QUrl>
#include <QDir>
#include <QCoreApplication>
#include <string>
#include "./project_root.h"
inline QString relativeApplicationToProjectRootPath()
{
return QDir(QCoreApplication::applicationDirPath())
.relativeFilePath(QString(PROJECT_ROOT));
}
inline QString absolutePathOfRelativeUrl(QUrl url)
{
return QDir(QCoreApplication::applicationDirPath())
.absoluteFilePath(url.toLocalFile());
}
inline QString absolutePathOfProjectRelativePath(QString path)
{
return QDir(QDir(QCoreApplication::applicationDirPath())
.absoluteFilePath(relativeApplicationToProjectRootPath()))
.absoluteFilePath(path);
}
inline QString absolutePathOfProjectRelativeUrl(QUrl url)
{
return absolutePathOfProjectRelativePath(url.toLocalFile());
}
inline std::string absolutePathOfRelativePath(std::string relativePath)
{
return QDir(QCoreApplication::applicationDirPath())
.absoluteFilePath(QString(relativePath.c_str()))
.toStdString();
}
inline std::string absolutePathOfProjectRelativePath(std::string relativePath)
{
return absolutePathOfProjectRelativePath(QString(relativePath.c_str()))
.toStdString();
}
#endif // SRC_UTILS_PATH_HELPER_H_
|
Add path helpers which handle paths relative to project root.
|
Add path helpers which handle paths relative to project root.
|
C
|
mit
|
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
|
754de119506d573be99d8538554999bd24801311
|
test/common.h
|
test/common.h
|
#ifndef NEOVIM_QT_TEST_COMMON
#define NEOVIM_QT_TEST_COMMON
// This is just a fix for QSignalSpy::wait
// http://stackoverflow.com/questions/22390208/google-test-mock-with-qt-signals
#define SPYWAIT(spy) (spy.count()>0||spy.wait())
#define SPYWAIT2(spy, time) (spy.count()>0||spy.wait(time))
#endif
|
#ifndef NEOVIM_QT_TEST_COMMON
#define NEOVIM_QT_TEST_COMMON
// This is just a fix for QSignalSpy::wait
// http://stackoverflow.com/questions/22390208/google-test-mock-with-qt-signals
bool SPYWAIT(QSignalSpy &spy, int timeout=10000)
{
return spy.count()>0||spy.wait(timeout);
}
bool SPYWAIT2(QSignalSpy &spy, int timeout=5000)
{
return spy.count()>0||spy.wait(timeout);
}
#endif
|
Fix bug in SPYWAIT helpers
|
Fix bug in SPYWAIT helpers
SPYWAIT was a macro that could evaluate an expression twice, which is
not what we want to do.
|
C
|
isc
|
equalsraf/neovim-qt,equalsraf/neovim-qt,equalsraf/neovim-qt,equalsraf/neovim-qt
|
e4ed1011d2e111381a8279d53a0c9c14f8f6a5b8
|
pw_sync_threadx/public/pw_sync_threadx/interrupt_spin_lock_native.h
|
pw_sync_threadx/public/pw_sync_threadx/interrupt_spin_lock_native.h
|
// Copyright 2020 The Pigweed Authors
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
#pragma once
#include "tx_api.h"
namespace pw::sync::backend {
struct NativeInterruptSpinLock {
enum class State {
kUnlocked = 1,
kLockedFromInterrupt = 2,
kLockedFromThread = 3,
};
State state; // Used to detect recursion and interrupt context escapes.
UINT saved_interrupt_mask;
UINT saved_preemption_threshold;
};
using NativeInterruptSpinLockHandle = NativeInterruptSpinLock&;
} // namespace pw::sync::backend
|
// Copyright 2020 The Pigweed Authors
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
#pragma once
#include "tx_api.h"
namespace pw::sync::backend {
struct NativeInterruptSpinLock {
enum class State {
kUnlocked = 0,
kLockedFromInterrupt = 1,
kLockedFromThread = 2,
};
State state; // Used to detect recursion and interrupt context escapes.
UINT saved_interrupt_mask;
UINT saved_preemption_threshold;
};
using NativeInterruptSpinLockHandle = NativeInterruptSpinLock&;
} // namespace pw::sync::backend
|
Adjust ISL enum to make it bss eligible
|
pw_sync_threadx: Adjust ISL enum to make it bss eligible
Adjusts an enum's values to ensure that a value of 0 is used in the
constexpr constructor to ensure that the object is bss eligible
instead of requiring placement in data.
Change-Id: Ied32426852661b5b534b6e4682a0e52fa28a57ae
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/55027
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
|
C
|
apache-2.0
|
google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed
|
ac0393e3d447ec3a36d4967b4fd2cc9144cd7010
|
src/util.h
|
src/util.h
|
#ifndef LACO_UTIL_H
#define LACO_UTIL_H
struct LacoState;
/**
* Load a line into the lua stack to be evaluated later
*
* param pointer to LacoState
*
* return -1 if there is no line input to load
*/
int laco_load_line(struct LacoState* laco);
/**
* Called after laco_load_line, this evaluated the line as a function and
* hands of the result for printing
*
* param pointer to LacoState
*/
void laco_handle_line(struct LacoState* laco);
/**
* Kills the loop with exiting message if specified
*
* param pointer to LacoState
* param exit with status
* param error message
*/
void laco_kill(struct LacoState* laco, int status, const char* message);
/**
* When there is a value on the lua stack, it will print out depending on
* the type it is
*
* param pointer to lua_State
*
* return LUA_ERRSYNTAX if the value has some error
*/
int laco_print_type(struct LacoState* laco);
/**
* Prints out and pops off errors pushed into the lua stack
*
* param pointer to lua_State
* param incoming lua stack status
*/
void laco_report_error(struct LacoState* laco, int status);
int laco_is_match(const char** matches, const char* test_string);
#endif /* LACO_UTIL_H */
|
#ifndef LACO_UTIL_H
#define LACO_UTIL_H
struct LacoState;
/**
* Load a line into the lua stack to be evaluated later
*
* param pointer to LacoState
*
* return -1 if there is no line input to load
*/
int laco_load_line(struct LacoState* laco);
/**
* Called after laco_load_line, this evaluated the line as a function and
* hands of the result for printing
*
* param pointer to LacoState
*/
void laco_handle_line(struct LacoState* laco);
/**
* Kills the loop with exiting message if specified
*
* param pointer to LacoState
* param exit with status
* param error message
*/
void laco_kill(struct LacoState* laco, int status, const char* message);
/**
* When there is a value on the lua stack, it will print out depending on
* the type it is
*
* param pointer to LacoState
*
* return LUA_ERRSYNTAX if the value has some error
*/
int laco_print_type(struct LacoState* laco);
/**
* Prints out and pops off errors pushed into the lua stack
*
* param pointer to LacoState
* param incoming lua stack status
*/
void laco_report_error(struct LacoState* laco, int status);
int laco_is_match(const char** matches, const char* test_string);
#endif /* LACO_UTIL_H */
|
Update documentation for pointer type change
|
Update documentation for pointer type change
|
C
|
bsd-2-clause
|
sourrust/laco
|
dba0f35781d063f35d0074a075927a866615665e
|
network/network-common.h
|
network/network-common.h
|
#pragma once
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
#define emsg(s, d) \
fprintf(stderr, "%s(%d): %s %s\n", __func__, __LINE__, s, strerror(d))
#define err(s) emsg(s, errno)
#define err2(fmt, ...) \
do { \
int errno_tmp__ = errno; \
fprintf(stderr, "%s(%d): %s " fmt "\n", __func__, __LINE__, \
strerror(errno_tmp__), __VA_ARGS__); \
} while (0)
#define errstring(s) fprintf(stderr, "%s(%d): %s\n", __func__, __LINE__, s)
void server_usage(void);
int get_accept_fds(const char *host, const char *port, int **fds);
int init_fdset(const int *const fds, size_t nfds, fd_set *fdset);
struct addrinfo *get_connect_addr(const char *host, const char *port);
int open_socket(const char *host, const char *port);
const char * hostname(struct sockaddr * sa, socklen_t length);
|
#pragma once
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <netdb.h>
#include <string.h>
#include <errno.h>
#define emsg(s, d) \
fprintf(stderr, "%s(%d): %s %s\n", __func__, __LINE__, s, strerror(d))
#define err(s) emsg(s, errno)
#define err2(fmt, ...) \
do { \
int errno_tmp__ = errno; \
fprintf(stderr, "%s(%d): %s " fmt "\n", __func__, __LINE__, \
strerror(errno_tmp__), __VA_ARGS__); \
} while (0)
#define errstring(s) fprintf(stderr, "%s(%d): %s\n", __func__, __LINE__, s)
void server_usage(void);
int get_accept_fds(const char *host, const char *port, int **fds);
int init_fdset(const int *const fds, size_t nfds, fd_set *fdset);
struct addrinfo *get_connect_addr(const char *host, const char *port);
int open_socket(const char *host, const char *port);
const char * hostname(struct sockaddr * sa, socklen_t length);
|
Add missing include for fd_set declaration
|
Add missing include for fd_set declaration
|
C
|
unlicense
|
hannesweisbach/ccourse
|
178c839c82e248bd8c8187ad1a57d05137449eb3
|
constants.h
|
constants.h
|
#ifndef CONSTANTS_INCLUDED
#define WORDLENGTH 11
#define NUMWORDS 65536
#define WORDFILE "words.txt"
#define HEX_CHUNK_LENGTH 4
#define CONSTANTS_INCLUDED
#endif
|
#ifndef CONSTANTS_INCLUDED
#define WORDLENGTH 11
#define NUMWORDS 65536
#define WORDFILE "words.txt"
#define HEX_CHUNK_LENGTH 4
#define HEX_CHUNK_FORMAT "%04X"
#define CONSTANTS_INCLUDED
#endif
|
Add constant formatting string for creating hexadecimal chunks.
|
Add constant formatting string for creating hexadecimal chunks.
|
C
|
agpl-3.0
|
ryepdx/keyphrase,ryepdx/keyphrase
|
dfd1a6192961f88408a34c21c3ab82d144ebc2ee
|
net.h
|
net.h
|
#ifndef NET_H
#define NET_H
typedef enum Command {GET_STATE = 'S',
SHOOT = 'F', GET_MAP = 'M', ERROR = 'E'} Command;
#define PORTNUM 7979 /* Port Number */
#define MAXRCVLEN 128 /* Maximal Length of Received Value */
#endif /* NET_H */
|
#ifndef NET_H
#define NET_H
/*
* command args reply
*
* GET_MAP none map_seed map_length map_height
*/
typedef enum Command {GET_STATE = 'S',
SHOOT = 'F', GET_MAP = 'M', ERROR = 'E'} Command;
#define PORTNUM 7979 /* Port Number */
#define MAXRCVLEN 128 /* Maximal Length of Received Value */
#endif /* NET_H */
|
Add documentation for GET_MAP command
|
Add documentation for GET_MAP command
|
C
|
mit
|
AwesomePatrol/ncursed-tanks
|
a6d291f001b40c83d5b88bc648c61524c66240b4
|
src/Config.h
|
src/Config.h
|
#ifndef CTCONFIG_H
#define CTCONFIG_H
//#define ENABLE_ASSERT_CHECKS
//#define CT_NODE_DEBUG
//#define ENABLE_INTEGRITY_CHECK
//#define ENABLE_COUNTERS
//#define ENABLE_PAGING
//#define SNAPPY_COMPRESSION
#endif // CTCONFIG_H
|
#ifndef CTCONFIG_H
#define CTCONFIG_H
//#define ENABLE_ASSERT_CHECKS
//#define CT_NODE_DEBUG
//#define ENABLE_INTEGRITY_CHECK
//#define ENABLE_COUNTERS
//#define ENABLE_PAGING
#define ENABLE_COMPRESSION
//#define SNAPPY_COMPRESSION
#endif // CTCONFIG_H
|
Add new option to enable/disable compression
|
Add new option to enable/disable compression
|
C
|
mit
|
sopwithcamel/cbt,sopwithcamel/cbt
|
9ffe537cb523373b72f463b7fecac840589db264
|
hardware/zpuino/zpu20/cores/zpuino/crt-c.c
|
hardware/zpuino/zpu20/cores/zpuino/crt-c.c
|
extern unsigned int __bss_start__,__bss_end__;
extern unsigned int ___ctors, ___ctors_end;
extern char __end__;
static char *start_brk = &__end__;
extern void _Z4loopv();
extern void _Z5setupv();
void ___clear_bss()
{
unsigned int *ptr = &__bss_start__;
while (ptr!=&__bss_end__) {
*ptr = 0;
ptr++;
}
}
void ___do_global_ctors()
{
unsigned int *ptr = &___ctors;
while (ptr!=&___ctors_end) {
((void(*)(void))(*ptr))();
ptr++;
}
}
void __cxa_pure_virtual()
{
// Abort here.
}
void exit(){
}
#ifndef NOMAIN
int main(int argc, char **argv)
{
_Z5setupv();
while (1) {
_Z4loopv();
}
}
#endif
void __attribute__((noreturn)) _premain(void)
{
___clear_bss();
___do_global_ctors();
main(0,0);
while(1);
}
void *sbrk(int inc)
{
start_brk+=inc;
return start_brk;
}
|
extern unsigned int __bss_start__,__bss_end__;
extern unsigned int ___ctors, ___ctors_end;
extern char __end__;
static char *start_brk = &__end__;
extern void _Z4loopv();
extern void _Z5setupv();
void ___clear_bss()
{
unsigned int *ptr = &__bss_start__;
while (ptr!=&__bss_end__) {
*ptr = 0;
ptr++;
}
}
void ___do_global_ctors()
{
unsigned int *ptr = &___ctors;
while (ptr!=&___ctors_end) {
((void(*)(void))(*ptr))();
ptr++;
}
}
void __cxa_pure_virtual()
{
// Abort here.
}
void exit(){
}
#ifndef NOMAIN
int main(int argc, char **argv)
{
_Z5setupv();
while (1) {
_Z4loopv();
}
}
#endif
void __attribute__((noreturn)) _premain(void)
{
#ifndef NOCLEARBSS
___clear_bss();
#endif
___do_global_ctors();
main(0,0);
while(1);
}
void *sbrk(int inc)
{
start_brk+=inc;
return start_brk;
}
|
Add conditional for BSS cleanup
|
Add conditional for BSS cleanup
|
C
|
lgpl-2.1
|
rcook/DesignLab,rcook/DesignLab,rcook/DesignLab,rcook/DesignLab,rcook/DesignLab,rcook/DesignLab,rcook/DesignLab
|
3fe765a96b95467327e9cc1cfcdabcdfea1d3818
|
src/parser.h
|
src/parser.h
|
#ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING,
PART_PYINT,
PART_ERROR,
} part_type;
typedef enum {
TYPE_SINGLE_VALUE,
TYPE_LIST_OF_SINGLE_VALUES,
TYPE_LIST_OF_TUPLES
} result_type;
typedef struct {
long parts_count, current_part, next_part_size;
part_type expected_type;
PyObject *result_root, *list;
int result_type;
Py_ssize_t list_length, list_filled;
} parser_state;
PyObject *parser_get_results();
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer);
#endif // _PARSER_H_
|
#ifndef _PARSER_H_
#define _PARSER_H_
#include <Python.h>
#include "circular_buffer.h"
typedef enum {
COMPLETE_DATA,
MISSING_DATA,
INVALID_DATA,
PARSE_FATAL_ERROR,
} parse_result;
typedef enum {
PART_CHOOSER,
PART_SINGLE_SIZED,
PART_COUNT,
PART_INLINE,
PART_SIZE,
PART_PYSTRING,
PART_PYINT,
PART_ERROR,
} part_type;
typedef enum {
TYPE_SINGLE_VALUE,
TYPE_LIST_OF_SINGLE_VALUES,
TYPE_LIST_OF_TUPLES
} result_type;
typedef struct {
long parts_count, current_part, next_part_size;
part_type expected_type;
PyObject *result_root, *list;
int result_type;
Py_ssize_t list_length, list_filled;
} parser_state;
PyObject *parser_get_results(void);
parse_result parser_parse_part(parser_state *s, circular_buffer *buffer);
parse_result parser_parse_unit(parser_state *s, circular_buffer *buffer);
#endif // _PARSER_H_
|
Replace empty arguments definition with void for compatibility
|
Replace empty arguments definition with void for compatibility
|
C
|
mit
|
gviot/nadis,gviot/nadis,gviot/nadis
|
0fc0754e655a0628c4b25da4fe2ddf261208deb3
|
gio/tests/appinfo-test.c
|
gio/tests/appinfo-test.c
|
#include <stdlib.h>
#include <gio/gio.h>
int
main (int argc, char *argv[])
{
const gchar *envvar;
gint pid_from_env;
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
g_assert_cmpstr (envvar, ==, g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL));
return 0;
}
|
#include <stdlib.h>
#include <gio/gio.h>
int
main (int argc, char *argv[])
{
const gchar *envvar;
g_test_init (&argc, &argv, NULL);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE");
if (envvar != NULL)
{
gchar *expected;
gint pid_from_env;
expected = g_test_build_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
g_assert_cmpstr (envvar, ==, expected);
g_free (expected);
envvar = g_getenv ("GIO_LAUNCHED_DESKTOP_FILE_PID");
g_assert (envvar != NULL);
pid_from_env = atoi (envvar);
g_assert_cmpint (pid_from_env, ==, getpid ());
}
return 0;
}
|
Fix up the appinfo test
|
Fix up the appinfo test
One testcase was launching appinfo-test from a GAppInfo that
does not have a filename. In this case, the G_LAUNCHED_DESKTOP_FILE
envvar is not exported. Make appinfo-test deal with that, without
spewing warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=711178
|
C
|
lgpl-2.1
|
endlessm/glib,mzabaluev/glib,tamaskenez/glib,cention-sany/glib,gale320/glib,lukasz-skalski/glib,krichter722/glib,endlessm/glib,endlessm/glib,ieei/glib,gale320/glib,ieei/glib,tamaskenez/glib,MathieuDuponchelle/glib,tamaskenez/glib,tchakabam/glib,krichter722/glib,mzabaluev/glib,ieei/glib,Distrotech/glib,johne53/MB3Glib,MathieuDuponchelle/glib,tamaskenez/glib,endlessm/glib,lukasz-skalski/glib,johne53/MB3Glib,ieei/glib,Distrotech/glib,tchakabam/glib,tchakabam/glib,Distrotech/glib,gale320/glib,johne53/MB3Glib,tamaskenez/glib,ieei/glib,cention-sany/glib,Distrotech/glib,MathieuDuponchelle/glib,tchakabam/glib,krichter722/glib,MathieuDuponchelle/glib,cention-sany/glib,mzabaluev/glib,krichter722/glib,tchakabam/glib,johne53/MB3Glib,johne53/MB3Glib,mzabaluev/glib,lukasz-skalski/glib,krichter722/glib,endlessm/glib,gale320/glib,Distrotech/glib,lukasz-skalski/glib,cention-sany/glib,MathieuDuponchelle/glib,johne53/MB3Glib,lukasz-skalski/glib,mzabaluev/glib,cention-sany/glib,gale320/glib
|
df5d139a828fbac2f919c7278163f12e0d4b01c7
|
include/inputeventdata.h
|
include/inputeventdata.h
|
/*
-----------------------------------------------------------------------------
Copyright (c) 2010 Nigel Atkinson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef INPUTEVENTDATA_H_INCLUDED
#define INPUTEVENTDATA_H_INCLUDED
struct InputEventData : public EventData
{
float x, y;
OIS::KeyCode key;
unsigned int parm;
};
#endif // INPUTEVENTDATA_H_INCLUDED
|
/*
-----------------------------------------------------------------------------
Copyright (c) 2010 Nigel Atkinson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef INPUTEVENTDATA_H_INCLUDED
#define INPUTEVENTDATA_H_INCLUDED
struct InputEventData : public EventData
{
short x, y;
OIS::KeyCode key;
unsigned int parm;
};
#endif // INPUTEVENTDATA_H_INCLUDED
|
Use a more suitable type for mouse co-ordinates.
|
Use a more suitable type for mouse co-ordinates.
|
C
|
mit
|
merlinblack/Game-Engine-Testbed,merlinblack/Game-Engine-Testbed,merlinblack/Game-Engine-Testbed,merlinblack/Game-Engine-Testbed
|
98b8a0eb22fbc4012f9c9ac0a793a4822822f208
|
Sources/MCKNetworkMock.h
|
Sources/MCKNetworkMock.h
|
//
// MCKNetworkMock.h
// mocka
//
// Created by Markus Gasser on 26.10.2013.
// Copyright (c) 2013 konoma GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@class MCKNetworkMock;
@class MCKNetworkRequestMatcher;
@class MCKMockingContext;
typedef MCKNetworkRequestMatcher*(^MCKNetworkActivity)(id url);
@interface MCKNetworkMock : NSObject
#pragma mark - Initialization
- (instancetype)initWithMockingContext:(MCKMockingContext *)context;
#pragma mark - Network Control
@property (nonatomic, readonly, getter = isEnabled) BOOL enabled;
- (void)disable;
- (void)enable;
- (void)startObservingNetworkCalls;
#pragma mark - Stubbing and Verification DSL
@property (nonatomic, readonly) MCKNetworkActivity GET;
@property (nonatomic, readonly) MCKNetworkActivity PUT;
@property (nonatomic, readonly) MCKNetworkActivity POST;
@property (nonatomic, readonly) MCKNetworkActivity DELETE;
@end
#define MCKNetwork _mck_getNetworkMock(self, __FILE__, __LINE__)
#ifndef MCK_DISABLE_NICE_SYNTAX
#define Network MCKNetwork
#endif
extern MCKNetworkMock* _mck_getNetworkMock(id testCase, const char *fileName, NSUInteger lineNumber);
|
//
// MCKNetworkMock.h
// mocka
//
// Created by Markus Gasser on 26.10.2013.
// Copyright (c) 2013 konoma GmbH. All rights reserved.
//
#import <Foundation/Foundation.h>
@class MCKNetworkMock;
@class MCKNetworkRequestMatcher;
@class MCKMockingContext;
typedef MCKNetworkRequestMatcher*(^MCKNetworkActivity)(id url);
@interface MCKNetworkMock : NSObject
#pragma mark - Initialization
- (instancetype)initWithMockingContext:(MCKMockingContext *)context;
#pragma mark - Network Control
@property (nonatomic, readonly, getter = isEnabled) BOOL enabled;
- (void)disable;
- (void)enable;
- (void)startObservingNetworkCalls;
#pragma mark - Stubbing and Verification DSL
@property (nonatomic, readonly) MCKNetworkActivity GET;
@property (nonatomic, readonly) MCKNetworkActivity PUT;
@property (nonatomic, readonly) MCKNetworkActivity POST;
@property (nonatomic, readonly) MCKNetworkActivity DELETE;
@end
#define MCKNetwork (id)_mck_getNetworkMock(self, __FILE__, __LINE__)
#ifndef MCK_DISABLE_NICE_SYNTAX
#define Network MCKNetwork
#endif
extern MCKNetworkMock* _mck_getNetworkMock(id testCase, const char *fileName, NSUInteger lineNumber);
|
Make the network mock play nice with stubCall (…)
|
Make the network mock play nice with stubCall (…)
|
C
|
mit
|
frenetisch-applaudierend/mocka,frenetisch-applaudierend/mocka
|
54562ec9471222010cded42de16bc23286d873cd
|
test/CodeGen/2008-01-04-WideBitfield.c
|
test/CodeGen/2008-01-04-WideBitfield.c
|
// RUN: %clang_cc1 -emit-llvm -o - %s
// PR1386
typedef unsigned long uint64_t;
struct X {
unsigned char pad : 4;
uint64_t a : 64;
} __attribute__((packed)) x;
uint64_t f(void)
{
return x.a;
}
|
// RUN: %clang_cc1 -emit-llvm -o - %s
// PR1386
typedef unsigned long long uint64_t;
struct X {
unsigned char pad : 4;
uint64_t a : 64;
} __attribute__((packed)) x;
uint64_t f(void)
{
return x.a;
}
|
Use unsigned long long for uint64_t. Fixes part of the windows buildbot.
|
Use unsigned long long for uint64_t. Fixes part of the windows buildbot.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136160 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
00fa5d47e3900f290b1673ce99a899713c011300
|
bandit/reporters/colored_reporter.h
|
bandit/reporters/colored_reporter.h
|
#ifndef BANDIT_COLORED_REPORTER_H
#define BANDIT_COLORED_REPORTER_H
#include <ostream>
#include <bandit/reporters/colorizer.h>
#include <bandit/reporters/progress_reporter.h>
namespace bandit { namespace detail {
struct colored_reporter : public progress_reporter
{
colored_reporter(std::ostream& stm,
const failure_formatter& failure_formatter,
const colorizer& colorizer)
: progress_reporter(failure_formatter), stm_(stm), colorizer_(colorizer)
{}
protected:
std::ostream& stm_;
const detail::colorizer& colorizer_;
};
}}
#endif
|
#ifndef BANDIT_COLORED_REPORTER_H
#define BANDIT_COLORED_REPORTER_H
#include <ostream>
#include <bandit/reporters/colorizer.h>
#include <bandit/reporters/progress_reporter.h>
namespace bandit { namespace detail {
struct colored_reporter : public progress_reporter
{
colored_reporter(std::ostream& stm,
const failure_formatter& failure_formatter,
const colorizer& colorizer)
: progress_reporter(failure_formatter), stm_(stm), colorizer_(colorizer)
{}
virtual ~colored_reporter()
{
stm_ << colorizer_.reset();
}
protected:
std::ostream& stm_;
const detail::colorizer& colorizer_;
};
}}
#endif
|
Make sure the colorizer is reset
|
Make sure the colorizer is reset
This is done using the colored_reporter destructor.
This should fix the part of #90, i.e., that colors are changed when the
code exits unexpectedly, or in case the reporter simply does not reset
the colorizer.
|
C
|
mit
|
ogdf/bandit,ogdf/bandit,joakimkarlsson/bandit,joakimkarlsson/bandit,joakimkarlsson/bandit
|
a66f471fe91dbfcf659762565185e6ba903210f0
|
src/os/emscripten/open.c
|
src/os/emscripten/open.c
|
#include "os_common.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
FILE *os_fopen(const char *path, const char *mode)
{
FILE *f = NULL;
if (path[0] == '/' && strncmp(path, "/dev", 4)) {
// absolute path, needs to be construed relative to mountpoint
size_t need = 1 + snprintf(NULL, 0, MOUNT_POINT "%s", path);
char *buf = malloc(need);
snprintf(buf, need, MOUNT_POINT "%s", path);
f = fopen(buf, mode);
free(buf);
} else {
// either a relative path or a device path -- don't mangle path
// default behaviour, os_preamble() has already chdir()ed correctly
f = fopen(path, mode);
}
return f;
}
|
#include "os_common.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
FILE *os_fopen(const char *path, const char *mode)
{
FILE *f = NULL;
if (path[0] == '/' && strncmp(path, "/dev", 4)) {
// absolute path, needs to be construed relative to mountpoint
int need = 1 + snprintf(NULL, 0, MOUNT_POINT "%s", path);
char *buf = malloc((size_t)need);
snprintf(buf, (size_t)need, MOUNT_POINT "%s", path);
f = fopen(buf, mode);
free(buf);
} else {
// either a relative path or a device path -- don't mangle path
// default behaviour, os_preamble() has already chdir()ed correctly
f = fopen(path, mode);
}
return f;
}
|
Address -Wsign-conversion in emscripten build
|
Address -Wsign-conversion in emscripten build
|
C
|
mit
|
kulp/tenyr,kulp/tenyr,kulp/tenyr
|
25ac6c78271d734772ed59058b9d29b5c6b08ddf
|
src/compat/posix/include/posix_errno.h
|
src/compat/posix/include/posix_errno.h
|
/**
* @file
* @brief
*
* @author Anton Kozlov
* @date 25.06.2012
*/
#ifndef COMPAT_POSIX_POSIX_ERRNO_H_
#define COMPAT_POSIX_POSIX_ERRNO_H_
#include <kernel/task/resource/errno.h>
#define errno (*task_self_resource_errno())
#define SET_ERRNO(e) \
({ errno = e; -1; /* to let 'return SET_ERRNO(...)' */ })
#endif /* COMPAT_POSIX_POSIX_ERRNO_H_ */
|
/**
* @file
* @brief
*
* @author Anton Kozlov
* @date 25.06.2012
*/
#ifndef COMPAT_POSIX_POSIX_ERRNO_H_
#define COMPAT_POSIX_POSIX_ERRNO_H_
#include <kernel/task/resource/errno.h>
#include <compiler.h>
#define errno (*task_self_resource_errno())
static inline int SET_ERRNO(int err) {
errno = err;
return -1;
}
#endif /* COMPAT_POSIX_POSIX_ERRNO_H_ */
|
Change SET_ERRNO to be inline function
|
Change SET_ERRNO to be inline function
|
C
|
bsd-2-clause
|
mike2390/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,Kakadu/embox,embox/embox,Kakadu/embox,gzoom13/embox,Kakadu/embox,Kefir0192/embox,embox/embox,Kefir0192/embox,mike2390/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,Kakadu/embox,embox/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,gzoom13/embox,Kefir0192/embox,mike2390/embox,embox/embox,Kakadu/embox,embox/embox,embox/embox,gzoom13/embox
|
5753352c3f560801c975cea7df03956833d3303f
|
tardis/montecarlo/src/io.h
|
tardis/montecarlo/src/io.h
|
#define _POSIX_C_SOURCE 1
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
#define STATUS_FORMAT "\r\033[2K\t[%" PRId64 "%%] Packets(finished/total): %" PRId64 "/%" PRId64
#define STATUS_FORMAT_FI "\r\033[2K\t[%" PRId64 "%%] Rays(finished/total): %" PRId64 "/%" PRId64
static inline void
print_progress (const int64_t current, const int64_t total)
{
if (isatty(fileno(stderr)))
{
fprintf(stderr, STATUS_FORMAT,
current * 100 / total,
current,
total);
}
}
static inline void
print_progress_fi (const int64_t current, const int64_t total)
{
if (isatty(fileno(stderr)))
{
fprintf(stderr, STATUS_FORMAT_FI,
current * 100 / total,
current,
total);
}
}
|
#define _POSIX_C_SOURCE 1
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
#define STATUS_FORMAT "\r\033[2K\t[%" PRId64 "%%] Packets(finished/total): %" PRId64 "/%" PRId64
#define STATUS_FORMAT_FI "\r\033[2K\t[%" PRId64 "%%] Bins(finished/total): %" PRId64 "/%" PRId64
static inline void
print_progress (const int64_t current, const int64_t total)
{
if (isatty(fileno(stderr)))
{
fprintf(stderr, STATUS_FORMAT,
current * 100 / total,
current,
total);
}
}
static inline void
print_progress_fi (const int64_t current, const int64_t total)
{
if (isatty(fileno(stderr)))
{
fprintf(stderr, STATUS_FORMAT_FI,
current * 100 / total,
current,
total);
}
}
|
Correct status printout for FI
|
Correct status printout for FI
|
C
|
bsd-3-clause
|
kaushik94/tardis,kaushik94/tardis,kaushik94/tardis,kaushik94/tardis
|
462e57739769909d72cda50355e2ccc055386816
|
include/dg/PointerAnalysis/PointsToSet.h
|
include/dg/PointerAnalysis/PointsToSet.h
|
#ifndef DG_POINTS_TO_SET_H_
#define DG_POINTS_TO_SET_H_
#include "dg/PointerAnalysis/PointsToSets/OffsetsSetPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SimplePointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SeparateOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/PointerIdPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SmallOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/AlignedSmallOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/AlignedPointerIdPointsToSet.h"
namespace dg {
namespace pta {
//using PointsToSetT = OffsetsSetPointsToSet;
using PointsToSetT = PointerIdPointsToSet;
using PointsToMapT = std::map<Offset, PointsToSetT>;
} // namespace pta
} // namespace dg
#endif
|
#ifndef DG_POINTS_TO_SET_H_
#define DG_POINTS_TO_SET_H_
#include "dg/PointerAnalysis/PointsToSets/OffsetsSetPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SimplePointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SeparateOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/PointerIdPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/SmallOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/AlignedSmallOffsetsPointsToSet.h"
#include "dg/PointerAnalysis/PointsToSets/AlignedPointerIdPointsToSet.h"
namespace dg {
namespace pta {
using PointsToSetT = OffsetsSetPointsToSet;
using PointsToMapT = std::map<Offset, PointsToSetT>;
} // namespace pta
} // namespace dg
#endif
|
Revert "PTA: use bitvector-based points-to set representation"
|
Revert "PTA: use bitvector-based points-to set representation"
This reverts commit 74f5d133452018f5e933ab864446bdb720fa84b9.
|
C
|
mit
|
mchalupa/dg,mchalupa/dg,mchalupa/dg,mchalupa/dg
|
7a2e8ee731e707612983c6f1dd85651077d92052
|
include/OgreHeadlessApi.h
|
include/OgreHeadlessApi.h
|
/* Copyright 2013 Jonne Nauha / jonne@adminotech.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(OGRE_STATIC_LIB)
# ifdef RenderSystem_Headless_EXPORTS
# define _OgreHeadlessExport __declspec(dllexport)
# else
# if defined(__MINGW32__)
# define _OgreHeadlessExport
# else
# define _OgreHeadlessExport __declspec(dllimport)
# endif
# endif
#elif defined (OGRE_GCC_VISIBILITY)
# define _OgreHeadlessExport __attribute__ ((visibility("default")))
#else
# define _OgreHeadlessExport
#endif
|
/* Copyright 2013 Jonne Nauha / jonne@adminotech.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include "OgrePrerequisites.h"
#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(OGRE_STATIC_LIB)
# ifdef RenderSystem_Headless_EXPORTS
# define _OgreHeadlessExport __declspec(dllexport)
# else
# if defined(__MINGW32__)
# define _OgreHeadlessExport
# else
# define _OgreHeadlessExport __declspec(dllimport)
# endif
# endif
#elif defined (OGRE_GCC_VISIBILITY)
# define _OgreHeadlessExport __attribute__ ((visibility("default")))
#else
# define _OgreHeadlessExport
#endif
|
Fix compilation on non-windows, had not tested this before and was missinga platform include.
|
Fix compilation on non-windows, had not tested this before and was missinga platform include.
|
C
|
apache-2.0
|
jonnenauha/ogre-headless-renderer
|
491451e9a3437f068fc9d7a3692a584673030f99
|
tree/treeplayer/inc/DataFrameLinkDef.h
|
tree/treeplayer/inc/DataFrameLinkDef.h
|
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __ROOTCLING__
// All these are there for the autoloading
#pragma link C++ class ROOT::Experimental::TDataFrame-;
#pragma link C++ class ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TFilterBase>-;
#pragma link C++ class ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TCustomColumnBase>-;
#pragma link C++ class ROOT::Detail::TLoopManager-;
#endif
|
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __ROOTCLING__
// All these are there for the autoloading
#pragma link C++ class ROOT::Experimental::TDataFrame-;
#pragma link C++ class ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TFilterBase>-;
#pragma link C++ class ROOT::Experimental::TDF::TInterface<ROOT::Detail::TDF::TCustomColumnBase>-;
#pragma link C++ class ROOT::Detail::TDF::TLoopManager-;
#endif
|
Solve undefined symbol issue spelling the right class name in the linkdef.
|
[TDF] Solve undefined symbol issue spelling the right class name in the linkdef.
|
C
|
lgpl-2.1
|
agarciamontoro/root,mhuwiler/rootauto,simonpf/root,olifre/root,zzxuanyuan/root,karies/root,agarciamontoro/root,zzxuanyuan/root,agarciamontoro/root,karies/root,zzxuanyuan/root,karies/root,simonpf/root,karies/root,simonpf/root,karies/root,simonpf/root,zzxuanyuan/root,mhuwiler/rootauto,karies/root,olifre/root,root-mirror/root,zzxuanyuan/root,olifre/root,simonpf/root,zzxuanyuan/root,agarciamontoro/root,karies/root,agarciamontoro/root,mhuwiler/rootauto,simonpf/root,agarciamontoro/root,agarciamontoro/root,olifre/root,simonpf/root,agarciamontoro/root,root-mirror/root,root-mirror/root,root-mirror/root,root-mirror/root,agarciamontoro/root,simonpf/root,agarciamontoro/root,mhuwiler/rootauto,mhuwiler/rootauto,karies/root,olifre/root,zzxuanyuan/root,simonpf/root,mhuwiler/rootauto,root-mirror/root,zzxuanyuan/root,olifre/root,simonpf/root,root-mirror/root,zzxuanyuan/root,karies/root,olifre/root,mhuwiler/rootauto,root-mirror/root,zzxuanyuan/root,agarciamontoro/root,mhuwiler/rootauto,olifre/root,olifre/root,mhuwiler/rootauto,olifre/root,simonpf/root,zzxuanyuan/root,karies/root,mhuwiler/rootauto,mhuwiler/rootauto,root-mirror/root,root-mirror/root,olifre/root,karies/root,root-mirror/root,zzxuanyuan/root
|
ac9bbd3283e587ba309e9eec84ff76fb19fa7f94
|
lib/fdpgen/clusteredges.h
|
lib/fdpgen/clusteredges.h
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CLUSTEREDGES_H
#define CLUSTEREDGES_H
#include <render.h>
extern int compoundEdges(graph_t * g, double SEP, int splines);
#endif
#ifdef __cplusplus
}
#endif
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CLUSTEREDGES_H
#define CLUSTEREDGES_H
#include <render.h>
#include <adjust.h>
extern int compoundEdges(graph_t * g, expand_t* pm, int splines);
#endif
#ifdef __cplusplus
}
#endif
|
Fix the sep and esep attributes to allow additive margins in addition to scaled margins.
|
Fix the sep and esep attributes to allow additive margins in addition
to scaled margins.
|
C
|
epl-1.0
|
tkelman/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,ellson/graphviz,kbrock/graphviz,pixelglow/graphviz,BMJHayward/graphviz,jho1965us/graphviz,tkelman/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,pixelglow/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,MjAbuz/graphviz,jho1965us/graphviz,kbrock/graphviz,kbrock/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,jho1965us/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,pixelglow/graphviz,jho1965us/graphviz,ellson/graphviz,tkelman/graphviz,pixelglow/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,jho1965us/graphviz,pixelglow/graphviz,tkelman/graphviz,kbrock/graphviz,pixelglow/graphviz,pixelglow/graphviz,kbrock/graphviz,tkelman/graphviz,MjAbuz/graphviz,kbrock/graphviz
|
6a51f3d903433eb69bef145fa8fd4d30b762ee01
|
new/lidar.h
|
new/lidar.h
|
#ifndef _LIDAR_H_
#define _LIDAR_H_
#ifdef __cplusplus
extern "C" {
#endif
const int LIDAR_DATA_PORT = 2368;
const int LIDAR_SYNC_PORT = 8308;
const int LIDAR_TIME_PORT = 10110;
typedef void (* LidarDataProcessor)(char *p, int start, int len);
typedef void * LIDAR;
LIDAR lidar_send_init(int port);
LIDAR lidar_receive_init(int port);
void lidar_dispose(LIDAR p);
void lidar_read_data(LIDAR p, LidarDataProcessor processor);
void lidar_write_data(LIDAR p, char * data, int start, int len);
#ifdef __cplusplus
}
#endif
#endif
|
#ifndef _LIDAR_H_
#define _LIDAR_H_
#ifdef __cplusplus
extern "C" {
#endif
#define LIDAR_DATA_PORT 2368
#define LIDAR_SYNC_PORT 8308
#define LIDAR_TIME_PORT 10110
typedef void (* LidarDataProcessor)(char *p, int start, int len);
typedef void * LIDAR;
LIDAR lidar_send_init(int port);
LIDAR lidar_receive_init(int port);
void lidar_dispose(LIDAR p);
void lidar_read_data(LIDAR p, LidarDataProcessor processor);
void lidar_write_data(LIDAR p, char * data, int start, int len);
#ifdef __cplusplus
}
#endif
#endif
|
Update LIDAR const to preprocessor macros
|
Update LIDAR const to preprocessor macros
|
C
|
apache-2.0
|
yystju/lidar,yystju/lidar,yystju/lidar,yystju/lidar,yystju/lidar,yystju/lidar
|
b591e8ce438094b3f2af77621fcfaf77eaccbcd8
|
src/main.c
|
src/main.c
|
#include <stdio.h>
int main(void)
{
printf("Hello world!");
return 0;
}
|
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
|
Add missing new line character
|
Add missing new line character
|
C
|
mit
|
rafaltrzop/NoughtsAndCrosses
|
72a29a96d123990adef08b392d0efccb6c5ecd69
|
src/util.h
|
src/util.h
|
#ifndef PL_ZERO_UTIL_H
#define PL_ZERO_UTIL_H
#include <sstream>
namespace pl0 {
#if defined(_MSC_VER) || defined(__GNUC__)
namespace polyfill {
template <typename T, typename... Args>
void fold_write_stream(std::ostringstream &oss, T value, Args... args) {
oss << value;
fold_write_stream(oss, args...);
}
template <typename T>
void fold_write_stream(std::ostringstream &oss, T value) {
oss << value;
}
}
#endif
class general_error {
std::string message_;
public:
template <typename... Args>
general_error(Args... args) {
std::ostringstream oss;
#if defined(_MSC_VER) || defined(__GNUC__)
// Visual Studio 2017 does not support fold expression now.
// We need to make a polyfill.
polyfill::fold_write_stream(oss, args...);
#else
oss << ... << args;
#endif
message_ = oss.str();
}
const std::string &what() const { return message_; }
};
}
#endif
|
#ifndef PL_ZERO_UTIL_H
#define PL_ZERO_UTIL_H
#include <sstream>
namespace pl0 {
#if defined(_MSC_VER) || defined(__GNUC__)
namespace polyfill {
template <typename T>
void fold_write_stream(std::ostringstream &oss, T value) {
oss << value;
}
template <typename T, typename... Args>
void fold_write_stream(std::ostringstream &oss, T value, Args... args) {
oss << value;
fold_write_stream(oss, args...);
}
}
#endif
class general_error {
std::string message_;
public:
template <typename... Args>
general_error(Args... args) {
std::ostringstream oss;
#if defined(_MSC_VER) || defined(__GNUC__)
// Visual Studio 2017 does not support fold expression now.
// We need to make a polyfill.
polyfill::fold_write_stream(oss, args...);
#else
oss << ... << args;
#endif
message_ = oss.str();
}
const std::string &what() const { return message_; }
};
}
#endif
|
Swap two overloads to make g++ happy.
|
Swap two overloads to make g++ happy.
Hmmmm.
|
C
|
mit
|
chengluyu/PL0
|
8bcf51be4fa4dfa6654c92ba7ba2482a8a945235
|
include/mega/version.h
|
include/mega/version.h
|
#ifndef MEGA_MAJOR_VERSION
#define MEGA_MAJOR_VERSION 4
#endif
#ifndef MEGA_MINOR_VERSION
#define MEGA_MINOR_VERSION 4
#endif
#ifndef MEGA_MICRO_VERSION
#define MEGA_MICRO_VERSION 0
#endif
|
#ifndef MEGA_MAJOR_VERSION
#define MEGA_MAJOR_VERSION 4
#endif
#ifndef MEGA_MINOR_VERSION
#define MEGA_MINOR_VERSION 4
#endif
#ifndef MEGA_MICRO_VERSION
#define MEGA_MICRO_VERSION 0
#endif
|
Apply 1 suggestion(s) to 1 file(s)
|
Apply 1 suggestion(s) to 1 file(s)
|
C
|
bsd-2-clause
|
meganz/sdk,meganz/sdk,meganz/sdk,meganz/sdk,meganz/sdk,meganz/sdk,meganz/sdk
|
24acb5ee218e20c7e7af477bcbe8d3b339ab63fe
|
std/stack.c
|
std/stack.c
|
#include "std/list.h"
#include "std/memory.h"
#include "std/stack.h"
struct Stack {
NodeT *list;
AtomPoolT *pool;
};
StackT *NewStack(AtomPoolT *pool) {
StackT *stack = NEW_S(StackT);
stack->list = NewList();
stack->pool = pool;
StackPushNew(stack);
return stack;
}
void DeleteStack(StackT *stack) {
if (stack) {
DeleteList(stack->list);
DeleteAtomPool(stack->pool);
DELETE(stack);
}
}
void StackReset(StackT *stack) {
ResetList(stack->list);
ResetAtomPool(stack->pool);
}
void StackRemove(StackT *stack) {
AtomFree(stack->pool, ListPopFront(stack->list));
}
PtrT StackPeek(StackT *stack, size_t index) {
return ListGetNth(stack->list, index);
}
PtrT StackTop(StackT *stack) {
return ListGetNth(stack->list, 0);
}
PtrT StackPushNew(StackT *stack) {
PtrT item = AtomNew0(stack->pool);
ListPushFront(stack->list, item);
return item;
}
size_t StackSize(StackT *stack) {
return ListSize(stack->list);
}
|
#include "std/list.h"
#include "std/memory.h"
#include "std/stack.h"
struct Stack {
ListT *list;
AtomPoolT *pool;
};
StackT *NewStack(AtomPoolT *pool) {
StackT *stack = NEW_S(StackT);
stack->list = NewList();
stack->pool = pool;
StackPushNew(stack);
return stack;
}
void DeleteStack(StackT *stack) {
if (stack) {
DeleteList(stack->list);
DeleteAtomPool(stack->pool);
DELETE(stack);
}
}
void StackReset(StackT *stack) {
ResetList(stack->list);
ResetAtomPool(stack->pool);
}
void StackRemove(StackT *stack) {
AtomFree(stack->pool, ListPopFront(stack->list));
}
PtrT StackPeek(StackT *stack, size_t index) {
return ListGet(stack->list, index);
}
PtrT StackTop(StackT *stack) {
return ListGet(stack->list, 0);
}
PtrT StackPushNew(StackT *stack) {
PtrT item = AtomNew0(stack->pool);
ListPushFront(stack->list, item);
return item;
}
size_t StackSize(StackT *stack) {
return ListSize(stack->list);
}
|
Correct after list API changes.
|
Correct after list API changes.
|
C
|
artistic-2.0
|
cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene,cahirwpz/demoscene
|
7f57422d19d088d4bb8d96ed202c27383ae760cb
|
DigitalSynthVRA8M/synth.h
|
DigitalSynthVRA8M/synth.h
|
#pragma once
// #define private public // for tests
#include "common.h"
// associations of units
#define IVCO VCO
#define IVCF VCF
#define IVCA VCA
#define IEG EG
#define ILFO LFO
#define ISlewRateLimiter SlewRateLimiter
#define IVoice Voice
#define ISynthCore SynthCore
#include "vco.h"
#include "vcf.h"
#include "vca.h"
#include "eg.h"
#include "lfo.h"
#include "slew-rate-limiter.h"
#include "voice.h"
#include "synth-core.h"
template <uint8_t T>
class Synth {
public:
INLINE static void initialize() {
ISynthCore<0>::initialize();
}
INLINE static void receive_midi_byte(uint8_t b) {
return ISynthCore<0>::receive_midi_byte(b);
}
INLINE static int8_t clock() {
return ISynthCore<0>::clock();
}
};
|
#pragma once
// #define private public // for tests
#include "common.h"
// associations of units
#define IVCO VCO
#define IVCF VCF
#define IVCA VCA
#define IEG EG
#define ILFO LFO
#define ISlewRateLimiter SlewRateLimiter
#define IVoice Voice
#define ISynthCore SynthCore
#include "vco.h"
#include "vcf.h"
#include "vca.h"
#include "eg.h"
#include "lfo.h"
#include "slew-rate-limiter.h"
#include "voice.h"
#include "synth-core.h"
template <uint8_t T>
class Synth {
public:
INLINE static void initialize() {
ISynthCore<0>::initialize();
}
INLINE static void receive_midi_byte(uint8_t b) {
ISynthCore<0>::receive_midi_byte(b);
}
INLINE static int8_t clock() {
return ISynthCore<0>::clock();
}
};
|
Fix a type of return value
|
Fix a type of return value
|
C
|
cc0-1.0
|
risgk/digital-synth-vra8-m,risgk/digital-synth-vra8-m,risgk/digital-synth-vra8-m,risgk/digital-synth-vra8-m
|
2965d004d35d8541bc48f761cf554fc643465462
|
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: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@4320 a9d63959-f2ad-4865-b262-bf0e56cfafb6
|
C
|
bsd-3-clause
|
daviddoria/PCLMirror,otherlab/pcl,otherlab/pcl,daviddoria/PCLMirror,patmarion/PCL,otherlab/pcl,otherlab/pcl,patmarion/PCL,daviddoria/PCLMirror,daviddoria/PCLMirror,patmarion/PCL,daviddoria/PCLMirror,otherlab/pcl,patmarion/PCL,patmarion/PCL
|
9488a6285b44d32645b44327d1582a0a607581dc
|
Fleet/ObjC/FleetSwizzle.h
|
Fleet/ObjC/FleetSwizzle.h
|
#import <Foundation/Foundation.h>
void memorySafeExecuteSelector(Class klass, SEL selector);
|
#import <Foundation/Foundation.h>
/**
Internal Fleet use only
*/
void memorySafeExecuteSelector(Class klass, SEL selector);
|
Mark ObjC magic as "internal use only"
|
Mark ObjC magic as "internal use only"
|
C
|
apache-2.0
|
jwfriese/Fleet,jwfriese/Fleet,jwfriese/Fleet,jwfriese/Fleet
|
37d85d86ce4cba0cf80f36b6f6e0cdacd7c472e9
|
hw/bsp/stm32f429discovery/include/bsp/cmsis_nvic.h
|
hw/bsp/stm32f429discovery/include/bsp/cmsis_nvic.h
|
/* mbed Microcontroller Library - cmsis_nvic
* Copyright (c) 2009-2011 ARM Limited. All rights reserved.
*
* CMSIS-style functionality to support dynamic vectors
*/
#ifndef MBED_CMSIS_NVIC_H
#define MBED_CMSIS_NVIC_H
#include <stdint.h>
#define NVIC_NUM_VECTORS (16 + 81) // CORE + MCU Peripherals
#define NVIC_USER_IRQ_OFFSET 16
#include "stm32f429xx.h"
#ifdef __cplusplus
extern "C" {
#endif
void NVIC_Relocate(void);
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
uint32_t NVIC_GetVector(IRQn_Type IRQn);
#ifdef __cplusplus
}
#endif
#endif
|
/* mbed Microcontroller Library - cmsis_nvic
* Copyright (c) 2009-2011 ARM Limited. All rights reserved.
*
* CMSIS-style functionality to support dynamic vectors
*/
#ifndef MBED_CMSIS_NVIC_H
#define MBED_CMSIS_NVIC_H
#include <stdint.h>
#define NVIC_NUM_VECTORS (16 + 91) // CORE + MCU Peripherals
#define NVIC_USER_IRQ_OFFSET 16
#include "stm32f429xx.h"
#ifdef __cplusplus
extern "C" {
#endif
void NVIC_Relocate(void);
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
uint32_t NVIC_GetVector(IRQn_Type IRQn);
#ifdef __cplusplus
}
#endif
#endif
|
Fix nvic vectors number to 16 + 91
|
bsp/stm32f429: Fix nvic vectors number to 16 + 91
From st datasheet page 24:
The devices embed a nested vectored interrupt controller
able to manage 16 priority levels, and handle up to 91
maskable interrupt channels plus the 16 interrupt lines
of the Cortex®-M4 with FPU core.
|
C
|
apache-2.0
|
andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,IMGJulian/incubator-mynewt-core,mlaz/mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,IMGJulian/incubator-mynewt-core,wes3/incubator-mynewt-core,wes3/incubator-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core
|
b40fdbd9d35757b0a5d0b4e69033d8daa9c15d0e
|
inputGen/include/types.h
|
inputGen/include/types.h
|
#ifndef TYPES_H
#define TYPES_H
#include "primitive.h"
#include <vector>
#include "eigen3/Eigen/StdVector"
namespace InputGen{
namespace Application{
typedef double Scalar;
typedef typename InputGen::LinearPrimitive<InputGen::Application::Scalar> Primitive;
//! \brief sample storing a position and its assignment
struct Sample: public Primitive::vec{
typedef Primitive::vec Base;
typedef Base::Scalar Scalar;
int primitiveId;
inline Sample(): Base(), primitiveId(-1) {}
template <class Derived>
inline Sample(const Derived&v): Base(v), primitiveId(-1) {}
inline Sample(const Scalar&x,
const Scalar&y,
const Scalar&z): Base(x,y,z), primitiveId(-1) {}
};
typedef std::vector<Sample,
Eigen::aligned_allocator<Sample> > PointSet;
}
}
#endif // TYPES_H
|
#ifndef TYPES_H
#define TYPES_H
#include "primitive.h"
#include <vector>
#include "eigen3/Eigen/StdVector"
namespace InputGen{
namespace Application{
typedef double Scalar;
typedef typename InputGen::LinearPrimitive<InputGen::Application::Scalar> Primitive;
//! \brief sample storing a position and its assignment
struct Sample: public Primitive::vec{
typedef Primitive::vec Base;
typedef Base::Scalar Scalar;
int primitiveId;
inline Sample(int id = -1): Base(), primitiveId(id) {}
template <class Derived>
inline Sample(const Derived&v, int id = -1): Base(v), primitiveId(id) {}
inline Sample(const Scalar&x,
const Scalar&y,
const Scalar&z,
int id = -1): Base(x,y,z), primitiveId(id) {}
};
typedef std::vector<Sample,
Eigen::aligned_allocator<Sample> > PointSet;
}
}
#endif // TYPES_H
|
Add new optionnal constructor parameter to set Sample::primitiveId at construction time
|
Add new optionnal constructor parameter to set Sample::primitiveId at construction time
|
C
|
apache-2.0
|
amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,amonszpart/globOpt,amonszpart/globOpt,amonszpart/globOpt,NUAAXXY/globOpt,NUAAXXY/globOpt,amonszpart/globOpt,NUAAXXY/globOpt
|
2ffb003a00726ad2bdd0a666f08fb6ed743f5b08
|
You-DataStore/datastore.h
|
You-DataStore/datastore.h
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static boost::variant<bool, SerializedTask> get(TaskId);
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& getInstance();
bool isServing = false;
std::deque<IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
#pragma once
#ifndef YOU_DATASTORE_DATASTORE_H_
#define YOU_DATASTORE_DATASTORE_H_
#include <deque>
#include <functional>
#include "boost/variant.hpp"
#include "task_typedefs.h"
#include "internal/operation.h"
namespace You {
namespace DataStore {
namespace UnitTests {}
class Transaction;
class DataStore {
friend class Transaction;
public:
static bool begin();
// Modifying methods
static bool post(TaskId, SerializedTask&);
static bool put(TaskId, SerializedTask&);
static bool erase(TaskId);
static boost::variant<bool, SerializedTask> get(TaskId);
static std::vector<SerializedTask>
filter(const std::function<bool(SerializedTask)>&);
private:
static DataStore& getInstance();
bool isServing = false;
std::deque<Internal::IOperation> operationsQueue;
};
} // namespace DataStore
} // namespace You
#endif // YOU_DATASTORE_DATASTORE_H_
|
Update reference to IOperation to include Internal namespace
|
Update reference to IOperation to include Internal namespace
|
C
|
mit
|
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
|
e341885c0d4b93b95f446ab4440459125404e75d
|
src/virtual_secondary/virtualsecondary.h
|
src/virtual_secondary/virtualsecondary.h
|
#ifndef PRIMARY_VIRTUALSECONDARY_H_
#define PRIMARY_VIRTUALSECONDARY_H_
#include <string>
#include "libaktualizr/types.h"
#include "managedsecondary.h"
namespace Primary {
class VirtualSecondaryConfig : public ManagedSecondaryConfig {
public:
VirtualSecondaryConfig() : ManagedSecondaryConfig(Type) {}
VirtualSecondaryConfig(const Json::Value& json_config);
static std::vector<VirtualSecondaryConfig> create_from_file(const boost::filesystem::path& file_full_path);
void dump(const boost::filesystem::path& file_full_path) const;
public:
static const char* const Type;
};
class VirtualSecondary : public ManagedSecondary {
public:
explicit VirtualSecondary(Primary::VirtualSecondaryConfig sconfig_in);
~VirtualSecondary() override = default;
std::string Type() const override { return VirtualSecondaryConfig::Type; }
data::InstallationResult putMetadata(const Uptane::Target& target) override;
data::InstallationResult putRoot(const std::string& root, bool director) override;
data::InstallationResult sendFirmware(const Uptane::Target& target) override;
data::InstallationResult install(const Uptane::Target& target) override;
bool ping() const override { return true; }
};
} // namespace Primary
#endif // PRIMARY_VIRTUALSECONDARY_H_
|
#ifndef PRIMARY_VIRTUALSECONDARY_H_
#define PRIMARY_VIRTUALSECONDARY_H_
#include <string>
#include "libaktualizr/types.h"
#include "managedsecondary.h"
namespace Primary {
class VirtualSecondaryConfig : public ManagedSecondaryConfig {
public:
VirtualSecondaryConfig() : ManagedSecondaryConfig(Type) {}
explicit VirtualSecondaryConfig(const Json::Value& json_config);
static std::vector<VirtualSecondaryConfig> create_from_file(const boost::filesystem::path& file_full_path);
void dump(const boost::filesystem::path& file_full_path) const;
public:
static const char* const Type;
};
class VirtualSecondary : public ManagedSecondary {
public:
explicit VirtualSecondary(Primary::VirtualSecondaryConfig sconfig_in);
~VirtualSecondary() override = default;
std::string Type() const override { return VirtualSecondaryConfig::Type; }
data::InstallationResult putMetadata(const Uptane::Target& target) override;
data::InstallationResult putRoot(const std::string& root, bool director) override;
data::InstallationResult sendFirmware(const Uptane::Target& target) override;
data::InstallationResult install(const Uptane::Target& target) override;
bool ping() const override { return true; }
};
} // namespace Primary
#endif // PRIMARY_VIRTUALSECONDARY_H_
|
Add 'explicit' keyword to single argument ctor
|
Add 'explicit' keyword to single argument ctor
Avoid a potential implicit Json::Value -> VirtualSecondaryConfig conversion.
Signed-off-by: Phil Wise <e888d2bd6f13f82caa51a37c03d034c76f661ba3@phil-wise.com>
|
C
|
mpl-2.0
|
advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/aktualizr
|
a796fa547fc85f48d761cf3181887c5188ebe148
|
test/FrontendC/2011-03-18-StructReturn.c
|
test/FrontendC/2011-03-18-StructReturn.c
|
// RUN: %llvmgcc %s -S -O0 -o - | FileCheck %s
// REQUIRES: disabled
// Radar 9156771
typedef struct RGBColor {
unsigned short red;
unsigned short green;
unsigned short blue;
} RGBColor;
RGBColor func();
RGBColor X;
void foo() {
//CHECK: store i48
X = func();
}
|
// RUN: %llvmgcc %s -S -O0 -o - | FileCheck %s
// XTARGET: x86_64-apple-darwin
// Radar 9156771
typedef struct RGBColor {
unsigned short red;
unsigned short green;
unsigned short blue;
} RGBColor;
RGBColor func();
RGBColor X;
void foo() {
//CHECK: store i48
X = func();
}
|
Enable this test only for Darwin.
|
Enable this test only for Darwin.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@128017 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap
|
193b0544566e6d3e123bf7e303c9d0c87bdd83cb
|
HTMLAttributedString/HTMLAttributedString.h
|
HTMLAttributedString/HTMLAttributedString.h
|
//
// HTMLAttributedString.h
// HTMLAttributedStringExample
//
// Created by Mohammed Islam on 3/31/14.
// Copyright (c) 2014 KSI Technology. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTMLAttributedString : NSObject
{
NSMutableArray *_cssAttributes;
NSString *_bodyFontCss;
}
- (id)initWithText:(NSString *)text withBodyFont:(UIFont *)font;
+ (NSAttributedString *)stringWithText:(NSString *)text andBodyFont:(UIFont *)font;
@property (nonatomic, readonly) NSArray *cssAttributes;
@property (nonatomic, readonly) NSAttributedString *attributedText;
@property (nonatomic, readonly) NSString *text;
@property (nonatomic, strong) UIFont *bodyFont;
- (void)addCssAttribute:(NSString *)cssAttribute;
- (void)removeCssAttribute:(NSString *)cssAttribute;
- (void)clear;
@end
|
//
// HTMLAttributedString.h
// HTMLAttributedStringExample
//
// Created by Mohammed Islam on 3/31/14.
// Copyright (c) 2014 KSI Technology. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTMLAttributedString : NSObject
{
NSMutableArray *_cssAttributes;
NSString *_bodyFontCss;
}
- (id)initWithText:(NSString *)text withBodyFont:(UIFont *)font;
+ (NSAttributedString *)stringWithText:(NSString *)text andBodyFont:(UIFont *)font;
@property (nonatomic, readonly) NSArray *cssAttributes;
@property (nonatomic, readonly) NSAttributedString *attributedText;
@property (nonatomic, strong) NSString *text;
@property (nonatomic, strong) UIFont *bodyFont;
- (void)addCssAttribute:(NSString *)cssAttribute;
- (void)removeCssAttribute:(NSString *)cssAttribute;
- (void)clear;
@end
|
Allow text to be edited
|
Allow text to be edited
|
C
|
unlicense
|
mmislam101/HTMLAttributedString,yichizhang/HTMLAttributedString
|
5fd855c6987b30989bb07c455708c4b6cb90cf02
|
doc/examples/08_segv/mytest.c
|
doc/examples/08_segv/mytest.c
|
/*
* Copyright 2011-2013 Gregory Banks
*
* 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.
*/
#include <np.h>
#include <stdio.h>
static void test_segv(void)
{
fprintf(stderr, "About to do follow a NULL pointer\n");
*(char *)0 = 0;
}
|
/*
* Copyright 2011-2013 Gregory Banks
*
* 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.
*/
#include <np.h>
#include <stdio.h>
static void test_segv(void)
{
fprintf(stderr, "About to follow a NULL pointer\n");
*(char *)0 = 0;
}
|
Fix grammar bug in example
|
Fix grammar bug in example
|
C
|
apache-2.0
|
loom-project/novaprova,loom-project/novaprova,gnb/novaprova,greig-hamilton/novaprova,greig-hamilton/novaprova,loom-project/novaprova,novaprova/novaprova,loom-project/novaprova,greig-hamilton/novaprova,greig-hamilton/novaprova,gnb/novaprova,gnb/novaprova,greig-hamilton/novaprova,gnb/novaprova,novaprova/novaprova,novaprova/novaprova,gnb/novaprova,novaprova/novaprova,novaprova/novaprova
|
e72748b18f797c9474178f11bb3d5783fa39cde2
|
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
|
Demo/ARM7_LPC2368_Eclipse/RTOSDemo/webserver/EMAC_ISR.c
|
#include "FreeRTOS.h"
#include "Semphr.h"
#include "task.h"
/* The interrupt entry point. */
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
/* The handler that does the actual work. */
void vEMAC_ISR_Handler( void );
extern xSemaphoreHandle xEMACSemaphore;
void vEMAC_ISR_Handler( void )
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Clear the interrupt. */
MAC_INTCLEAR = 0xffff;
VICVectAddr = 0;
/* Ensure the uIP task is not blocked as data has arrived. */
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
/* Giving the semaphore woke a task. */
portYIELD_FROM_ISR();
}
}
/*-----------------------------------------------------------*/
void vEMAC_ISR_Wrapper( void )
{
/* Save the context of the interrupted task. */
portSAVE_CONTEXT();
/* Call the handler. This must be a separate function unless you can
guarantee that no stack will be used. */
vEMAC_ISR_Handler();
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();
}
|
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
/* The interrupt entry point. */
void vEMAC_ISR_Wrapper( void ) __attribute__((naked));
/* The handler that does the actual work. */
void vEMAC_ISR_Handler( void );
extern xSemaphoreHandle xEMACSemaphore;
void vEMAC_ISR_Handler( void )
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Clear the interrupt. */
MAC_INTCLEAR = 0xffff;
VICVectAddr = 0;
/* Ensure the uIP task is not blocked as data has arrived. */
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
if( xHigherPriorityTaskWoken )
{
/* Giving the semaphore woke a task. */
portYIELD_FROM_ISR();
}
}
/*-----------------------------------------------------------*/
void vEMAC_ISR_Wrapper( void )
{
/* Save the context of the interrupted task. */
portSAVE_CONTEXT();
/* Call the handler. This must be a separate function unless you can
guarantee that no stack will be used. */
vEMAC_ISR_Handler();
/* Restore the context of whichever task is going to run next. */
portRESTORE_CONTEXT();
}
|
Correct case of include file to build on Linux.
|
Correct case of include file to build on Linux.
|
C
|
mit
|
FreeRTOS/FreeRTOS-Kernel,FreeRTOS/FreeRTOS-Kernel
|
6d0c9b749aad4a1801783d4a170542139792ebdd
|
src/alloc.h
|
src/alloc.h
|
#ifndef MCLISP_ALLOC_H_
#define MCLISP_ALLOC_H_
#include <array>
#include <cstddef>
#include <list>
#include "cons.h"
namespace mclisp
{
class ConsAllocator
{
public:
typedef std::size_t size_type;
ConsAllocator();
ConsCell* Allocate();
std::list<ConsCell*> Allocate(size_type n);
void Deallocate(ConsCell* p);
inline size_type max_size() const { return free_list_.size(); }
inline const ConsCell* oob_pointer() const { return &heap_.front() - 1; }
static constexpr size_type max_heap_size() { return kMaxHeapSize; }
private:
static constexpr size_type kMaxHeapSize = 1500;
std::list<ConsCell*> free_list_;
std::array<ConsCell, kMaxHeapSize> heap_;
};
namespace Alloc
{
void Init();
void Shutdown();
const mclisp::ConsCell* AtomMagic();
mclisp::ConsCell* Allocate();
} // namespace Alloc
} // namespace mclisp
#endif // MCLISP_ALLOC_H_
|
#ifndef MCLISP_ALLOC_H_
#define MCLISP_ALLOC_H_
#include <array>
#include <cstddef>
#include <list>
#include "cons.h"
namespace mclisp
{
class ConsAllocator
{
public:
typedef std::size_t size_type;
ConsAllocator();
ConsCell* Allocate();
std::list<ConsCell*> Allocate(size_type n);
void Deallocate(ConsCell* p);
inline size_type max_size() const { return free_list_.size(); }
inline const ConsCell* oob_pointer() const { return &heap_.front() - 1; }
static constexpr size_type max_heap_size() { return kMaxHeapSize; }
private:
static constexpr size_type kMaxHeapSize = 15000;
std::list<ConsCell*> free_list_;
std::array<ConsCell, kMaxHeapSize> heap_;
};
namespace Alloc
{
void Init();
void Shutdown();
const mclisp::ConsCell* AtomMagic();
mclisp::ConsCell* Allocate();
} // namespace Alloc
} // namespace mclisp
#endif // MCLISP_ALLOC_H_
|
Increase max heap size to 15,000 ConsCells.
|
Increase max heap size to 15,000 ConsCells.
Unit tests were running out of heap, due to GC not being implemented
yet. Also, 15,000 is the value mentioned by McCarthy in the paper.
|
C
|
mit
|
appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp
|
c567c3de9d697c332bdb934204cd2bbd79810312
|
c/anagram.c
|
c/anagram.c
|
#include <stdio.h>
#include <stdlib.h>
#include "list.h"
typedef struct _hash_t {
int sum;
int len;
} hash_t;
hash_t hash(char word[]) {
hash_t ret = {0,0};
int i;
for (i = 0; word[i] != '\0'; i++) {
ret.sum += word[i];
}
ret.len = i;
return ret;
}
int eq(hash_t h1, hash_t h2) {
return (h1.sum == h2.sum) && (h1.len == h2.len);
}
int is_anagram(char w1[], char w2[]) {
return eq(hash(w1), hash(w2));
}
char** collect_anagrams(char* anagrams[], int len) {
char** ret = (char**) malloc(len * sizeof(char));
return ret;
}
int main(int argc, char* argv[]) {
char* input[] = {"lol", "llo"};
char* output[2];
collect_anagrams(input, 2);
list_t* list = list_new();
list = list_append(list, "lol");
pretty_print(list);
}
|
#include <stdio.h>
#include <stdlib.h>
#include "list.h"
typedef struct _hash_t {
int sum;
int len;
} hash_t;
hash_t hash(char word[]) {
hash_t ret = {0,0};
int i;
for (i = 0; word[i] != '\0'; i++) {
ret.sum += word[i];
}
ret.len = i;
return ret;
}
int eq(hash_t h1, hash_t h2) {
return (h1.sum == h2.sum) && (h1.len == h2.len);
}
int is_anagram(char w1[], char w2[]) {
return eq(hash(w1), hash(w2));
}
char** collect_anagrams(char* anagrams[], int len) {
char** ret = (char**) malloc(len * sizeof(char));
return ret;
}
int main(int argc, char* argv[]) {
char* input[] = {"lol", "llo"};
char* output[2];
collect_anagrams(input, 2);
list_t* list = list_new();
list = list_append(list, "lol");
list = list_append(list, "lool");
pretty_print(list);
}
|
Check it out with two items!
|
Check it out with two items!
|
C
|
unlicense
|
OniOni/anagram,OniOni/anagram,OniOni/anagram
|
83b72ec023f2c1f1f0cdd4b000e5f084d913fb7f
|
t/my_cons.h
|
t/my_cons.h
|
/*
SMAL
Copyright (c) 2011 Kurt A. Stephens
*/
#include "smal/smal.h"
#include "smal/thread.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h> /* memset() */
#include <unistd.h> /* getpid() */
#include <assert.h>
typedef void *my_oop;
typedef struct my_cons {
my_oop car, cdr;
} my_cons;
static smal_type *my_cons_type;
static void * my_cons_mark (void *ptr)
{
#if 0
smal_mark_ptr_n(ptr, 2, (void**) &((my_cons *) ptr)->car);
return 0;
#else
smal_mark_ptr(ptr, ((my_cons *) ptr)->car);
return ((my_cons *) ptr)->cdr;
#endif
}
void my_print_stats()
{
smal_stats stats = { 0 };
int i;
smal_global_stats(&stats);
for ( i = 0; smal_stats_names[i]; ++ i ) {
fprintf(stdout, " %16lu %s\n", (unsigned long) (((size_t*) &stats)[i]), smal_stats_names[i]);
}
fprintf(stderr, "\n");
}
|
/*
SMAL
Copyright (c) 2011 Kurt A. Stephens
*/
#include "smal/smal.h"
#include "smal/thread.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h> /* memset() */
#include <unistd.h> /* getpid() */
#include <assert.h>
typedef void *my_oop;
typedef struct my_cons {
my_oop car, cdr;
} my_cons;
static smal_type *my_cons_type;
static void * my_cons_mark (void *ptr)
{
smal_mark_ptr(ptr, ((my_cons *) ptr)->car);
return ((my_cons *) ptr)->cdr;
}
void my_print_stats()
{
smal_stats stats = { 0 };
int i;
smal_global_stats(&stats);
for ( i = 0; smal_stats_names[i]; ++ i ) {
fprintf(stdout, " %16lu %s\n", (unsigned long) (((size_t*) &stats)[i]), smal_stats_names[i]);
}
fprintf(stderr, "\n");
}
|
Return cdr for mark continuation.
|
Return cdr for mark continuation.
|
C
|
mit
|
kstephens/smal,kstephens/smal,kstephens/smal
|
409c411a09aae60b6011da0c2fca025f76a5d19f
|
csrc/uname.c
|
csrc/uname.c
|
#include <sys/utsname.h>
#include <wchar.h>
#include <stdlib.h>
#define OS_VERSION_MAX_SIZE 128
wchar_t* getOS() {
struct utsname system_info;
if (uname(&system_info) != 0) return NULL;
wchar_t* os = malloc(sizeof(os) * OS_VERSION_MAX_SIZE);
#ifdef __APPLE__
int version = atoi(system_info.release);
// Since Darwin 5.1 (released 2001), Darwin xx corresponds to Mac OS X 10.(xx - 4)
const wchar_t* format;
if (version < 5) {
format = L"Mac OS X";
} else {
format = L"Mac OS X 10.%d";
}
if (swprintf(os, OS_VERSION_MAX_SIZE, format, version - 4) == -1) {
#else
if (swprintf(os, OS_VERSION_MAX_SIZE, L"%s %s", system_info.sysname, system_info.release) == -1) {
#endif
free(os);
os = NULL;
}
return os;
}
|
#include <sys/utsname.h>
#include <wchar.h>
#include <stdlib.h>
#define OS_VERSION_MAX_SIZE 128
wchar_t* getOS() {
struct utsname system_info;
if (uname(&system_info) != 0) return NULL;
wchar_t* os = malloc(sizeof(os) * OS_VERSION_MAX_SIZE);
#ifdef __APPLE__
int major_version = atoi(system_info.release);
int minor_version = atoi(system_info.release + 3);
// Since Darwin 5.1 (released 2001), Darwin xx corresponds to Mac OS X 10.(xx - 4)
// Since Darwin 20.1 (released 2020), Darwin xx.yy corresponds to Mac OS X (xx - 9).(yy - 1)
const wchar_t* format;
if (major_version < 5) {
format = L"Mac OS X";
} else if (major_version < 20) {
format = L"Mac OS X %d.%d";
minor_version = major_version - 4;
major_version = 10;
} else {
format = L"Mac OS X %d.%d";
minor_version = minor_version - 1;
major_version = major_version - 9;
}
if (swprintf(os, OS_VERSION_MAX_SIZE, format, major_version, minor_version) == -1) {
#else
if (swprintf(os, OS_VERSION_MAX_SIZE, L"%s %s", system_info.sysname, system_info.release) == -1) {
#endif
free(os);
os = NULL;
}
return os;
}
|
Update the versioning for macOS Big Sur
|
Update the versioning for macOS Big Sur
|
C
|
mit
|
ChaosGroup/system-info
|
1f45c183f1eb11cb6496d5deb89a2d05d314e754
|
src/cpu/register.h
|
src/cpu/register.h
|
#ifndef EMULATOR_REGISTER_H
#define EMULATOR_REGISTER_H
#include <cstdint>
template <typename T>
class Register {
public:
Register() {};
void set(const T new_value) { val = new_value; };
T value() const { return val; };
void increment() { val += 1; };
void decrement() { val -= 1; };
private:
T val;
};
typedef Register<uint8_t> ByteRegister;
typedef Register<uint16_t> WordRegister;
class RegisterPair {
public:
RegisterPair(ByteRegister& low, ByteRegister& high);
void set_low(const uint8_t byte);
void set_high(const uint8_t byte);
void set_low(const ByteRegister& byte);
void set_high(const ByteRegister& byte);
void set(const uint16_t word);
uint8_t low() const;
uint8_t high() const;
uint16_t value() const;
void increment();
void decrement();
private:
ByteRegister& low_byte;
ByteRegister& high_byte;
};
class Offset {
public:
Offset(uint8_t val) : val(val) {};
Offset(ByteRegister& reg) : val(reg.value()) {};
uint8_t value() { return val; }
private:
uint8_t val;
};
#endif
|
#ifndef EMULATOR_REGISTER_H
#define EMULATOR_REGISTER_H
#include <cstdint>
template <typename T>
class Register {
public:
Register() {};
void set(const T new_value) { val = new_value; };
T value() const { return val; };
void increment() { val += 1; };
void decrement() { val -= 1; };
private:
T val;
};
using ByteRegister = Register<uint8_t>;
using WordRegister = Register<uint16_t>;
class RegisterPair {
public:
RegisterPair(ByteRegister& low, ByteRegister& high);
void set_low(const uint8_t byte);
void set_high(const uint8_t byte);
void set_low(const ByteRegister& byte);
void set_high(const ByteRegister& byte);
void set(const uint16_t word);
uint8_t low() const;
uint8_t high() const;
uint16_t value() const;
void increment();
void decrement();
private:
ByteRegister& low_byte;
ByteRegister& high_byte;
};
class Offset {
public:
Offset(uint8_t val) : val(val) {};
Offset(ByteRegister& reg) : val(reg.value()) {};
uint8_t value() { return val; }
private:
uint8_t val;
};
#endif
|
Convert to 'using' syntax for type aliases
|
Convert to 'using' syntax for type aliases
|
C
|
bsd-3-clause
|
jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator
|
1e77c60bc8374947012a73eab0fdfb90df804184
|
src/byteswap.c
|
src/byteswap.c
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include "config.h"
#if !defined(HAVE_HTONLL) && !defined(WORDS_BIGENDIAN)
uint64_t couchstore_byteswap64(uint64_t val)
{
size_t ii;
uint64_t ret = 0;
for (ii = 0; ii < sizeof(uint64_t); ii++) {
ret <<= 8;
ret |= val & 0xff;
val >>= 8;
}
return ret;
}
#endif
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#include "config.h"
#if !defined(HAVE_HTONLL) && !defined(WORDS_BIGENDIAN)
uint64_t couchstore_byteswap64(uint64_t val)
{
size_t ii;
uint64_t ret = 0;
for (ii = 0; ii < sizeof(uint64_t); ii++) {
ret <<= 8;
ret |= val & 0xff;
val >>= 8;
}
return ret;
}
#elif defined(__GNUC__)
// solaris boxes contains a ntohll/htonll method, but
// it seems like the gnu linker doesn't like to use
// an archive without _any_ symbols in it ;)
int unreferenced_symbol_to_satisfy_the_linker;
#endif
|
Add a small hack to satisfy build with gcc on smartos64
|
Add a small hack to satisfy build with gcc on smartos64
Solaris boxes contains a ntohll/htonll method, but
it seems like the gnu linker doesn't like to use
an archive without _any_ symbols in it ;)
Change-Id: Id3b3ae5ad055ed50a10e8e514b8266f659fb92c3
Reviewed-on: http://review.couchbase.org/15737
Reviewed-by: Jens Alfke <21e2afd93d5ce53123476032b5dca8a79b546094@couchbase.com>
Tested-by: Jens Alfke <21e2afd93d5ce53123476032b5dca8a79b546094@couchbase.com>
|
C
|
apache-2.0
|
vmx/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore,jimwwalker/couchstore,couchbaselabs/couchstore-specials,hsharsha/couchstore,abhinavdangeti/couchstore,t3rm1n4l/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore,jimwwalker/couchstore,couchbaselabs/couchstore-specials,abhinavdangeti/couchstore,vmx/couchstore,couchbaselabs/couchstore-specials,hsharsha/couchstore,t3rm1n4l/couchstore,hsharsha/couchstore,couchbaselabs/couchstore,jimwwalker/couchstore,t3rm1n4l/couchstore,vmx/couchstore,abhinavdangeti/couchstore,hsharsha/couchstore
|
d0593d880573052e6ae2790328a336a6a9865cc3
|
src/CPlusPlusMangle.h
|
src/CPlusPlusMangle.h
|
#ifndef HALIDE_CPLUSPLUS_MANGLE_H
#define HALIDE_CPLUSPLUS_MANGLE_H
/** \file
*
* A simple function to get a C++ mangled function name for a function.
*/
#include <string>
#include "IR.h"
#include "Target.h"
namespace Halide {
namespace Internal {
/** Return the mangled C++ name for a function.
* The target parameter is used to decide on the C++
* ABI/mangling style to use.
*/
std::string cplusplus_function_mangled_name(const std::string &name, const std::vector<std::string> &namespaces,
Type return_type, const std::vector<ExternFuncArgument> &args,
const Target &target);
void cplusplus_mangle_test();
}
}
#endif
|
#ifndef HALIDE_CPLUSPLUS_MANGLE_H
#define HALIDE_CPLUSPLUS_MANGLE_H
/** \file
*
* A simple function to get a C++ mangled function name for a function.
*/
#include <string>
#include "IR.h"
#include "Target.h"
namespace Halide {
namespace Internal {
/** Return the mangled C++ name for a function.
* The target parameter is used to decide on the C++
* ABI/mangling style to use.
*/
EXPORT std::string cplusplus_function_mangled_name(const std::string &name, const std::vector<std::string> &namespaces,
Type return_type, const std::vector<ExternFuncArgument> &args,
const Target &target);
EXPORT void cplusplus_mangle_test();
}
}
#endif
|
Add some EXPORT qualifiers for msvc
|
Add some EXPORT qualifiers for msvc
|
C
|
mit
|
kgnk/Halide,psuriana/Halide,ronen/Halide,ronen/Halide,tdenniston/Halide,tdenniston/Halide,ronen/Halide,ronen/Halide,kgnk/Halide,jiawen/Halide,jiawen/Halide,jiawen/Halide,psuriana/Halide,jiawen/Halide,ronen/Halide,jiawen/Halide,psuriana/Halide,ronen/Halide,psuriana/Halide,psuriana/Halide,psuriana/Halide,ronen/Halide,jiawen/Halide,kgnk/Halide,tdenniston/Halide,kgnk/Halide,psuriana/Halide,kgnk/Halide,tdenniston/Halide,tdenniston/Halide,ronen/Halide,tdenniston/Halide,kgnk/Halide,kgnk/Halide,tdenniston/Halide,jiawen/Halide,kgnk/Halide,tdenniston/Halide
|
edabbb718abb7539a05b9eebc453feec695746c0
|
schedule/schedule_stop.c
|
schedule/schedule_stop.c
|
/* *
* This file is part of Feng
*
* Copyright (C) 2007 by LScube team <team@streaming.polito.it>
* See AUTHORS for more details
*
* Feng 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.
*
* Feng 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 Feng; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* */
#include <fenice/schedule.h>
#include <fenice/rtp.h>
#include <fenice/rtcp.h>
extern schedule_list sched[ONE_FORK_MAX_CONNECTION];
void schedule_stop(int id)
{
RTCP_send_packet(sched[id].rtp_session,SR);
RTCP_send_packet(sched[id].rtp_session,BYE);
sched[id].rtp_session->pause=1;
sched[id].rtp_session->started=0;
//sched[id].rtsp_session->cur_state=READY_STATE;
}
|
/* *
* This file is part of Feng
*
* Copyright (C) 2007 by LScube team <team@streaming.polito.it>
* See AUTHORS for more details
*
* Feng 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.
*
* Feng 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 Feng; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* */
#include <fenice/schedule.h>
#include <fenice/rtp.h>
#include <fenice/rtcp.h>
extern schedule_list sched[ONE_FORK_MAX_CONNECTION];
void schedule_stop(int id)
{
RTCP_send_packet(sched[id].rtp_session,SR);
RTCP_send_packet(sched[id].rtp_session,BYE);
RTCP_flush(sched[id].session);
sched[id].rtp_session->pause=1;
sched[id].rtp_session->started=0;
//sched[id].rtsp_session->cur_state=READY_STATE;
}
|
Make sure the rtcp BYE gets sent
|
Make sure the rtcp BYE gets sent
|
C
|
lgpl-2.1
|
winlinvip/feng,lscube/feng,lscube/feng,winlinvip/feng,winlinvip/feng,lscube/feng
|
1a8f66919b91e6892ed446276e601ce9efac08e7
|
AsyncDisplayKitTests/ASSnapshotTestCase.h
|
AsyncDisplayKitTests/ASSnapshotTestCase.h
|
/* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <FBSnapshotTestCase/FBSnapshotTestCase.h>
#import <AsyncDisplayKit/ASDisplayNode.h>
#define ASSnapshotVerifyNode(node__, identifier__) \
{ \
[ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \
FBSnapshotVerifyLayer(node__.layer, identifier__); \
}
@interface ASSnapshotTestCase : FBSnapshotTestCase
/**
* Hack for testing. ASDisplayNode lacks an explicit -render method, so we manually hit its layout & display codepaths.
*/
+ (void)hackilySynchronouslyRecursivelyRenderNode:(ASDisplayNode *)node;
@end
|
/* Copyright (c) 2014-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <FBSnapshotTestCase/FBSnapshotTestCase.h>
#import <AsyncDisplayKit/ASDisplayNode.h>
#define ASSnapshotVerifyNode(node__, identifier__) \
{ \
[ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \
FBSnapshotVerifyLayer(node__.layer, identifier__); \
[node__ setShouldRasterizeDescendants:YES]; \
[ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \
FBSnapshotVerifyLayer(node__.layer, identifier__); \
[node__ setShouldRasterizeDescendants:NO]; \
[ASSnapshotTestCase hackilySynchronouslyRecursivelyRenderNode:node__]; \
FBSnapshotVerifyLayer(node__.layer, identifier__); \
}
@interface ASSnapshotTestCase : FBSnapshotTestCase
/**
* Hack for testing. ASDisplayNode lacks an explicit -render method, so we manually hit its layout & display codepaths.
*/
+ (void)hackilySynchronouslyRecursivelyRenderNode:(ASDisplayNode *)node;
@end
|
Add tests for enabling / disabling shouldRasterize
|
Add tests for enabling / disabling shouldRasterize
|
C
|
bsd-3-clause
|
rcancro/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,rmls/AsyncDisplayKit,rcancro/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,george-gw/AsyncDisplayKit,rcancro/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,samhsiung/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,jellenbogen/AsyncDisplayKit,JetZou/AsyncDisplayKit,marmelroy/AsyncDisplayKit,marmelroy/AsyncDisplayKit,levi/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,levi/AsyncDisplayKit,facebook/AsyncDisplayKit,lappp9/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,rmls/AsyncDisplayKit,lappp9/AsyncDisplayKit,levi/AsyncDisplayKit,romyilano/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,dskatz22/AsyncDisplayKit,levi/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,Xinchi/AsyncDisplayKit,programming086/AsyncDisplayKit,JetZou/AsyncDisplayKit,romyilano/AsyncDisplayKit,george-gw/AsyncDisplayKit,maicki/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,marmelroy/AsyncDisplayKit,eanagel/AsyncDisplayKit,facebook/AsyncDisplayKit,yufenglv/AsyncDisplayKit,maicki/AsyncDisplayKit,harryworld/AsyncDisplayKit,facebook/AsyncDisplayKit,flovouin/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,paulyoung/AsyncDisplayKit,maicki/AsyncDisplayKit,gazreese/AsyncDisplayKit,rcancro/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,romyilano/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,samhsiung/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,paulyoung/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,lappp9/AsyncDisplayKit,maicki/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,rmls/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,marmelroy/AsyncDisplayKit,Xinchi/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,facebook/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,Xinchi/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,bimawa/AsyncDisplayKit,harryworld/AsyncDisplayKit,dskatz22/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,dskatz22/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,samhsiung/AsyncDisplayKit,harryworld/AsyncDisplayKit,rcancro/AsyncDisplayKit,Xinchi/AsyncDisplayKit,flovouin/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,eanagel/AsyncDisplayKit,smyrgl/AsyncDisplayKit,bimawa/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,flovouin/AsyncDisplayKit,Teino1978-Corp/Teino1978-Corp-AsyncDisplayKit,hannahmbanana/AsyncDisplayKit,lappp9/AsyncDisplayKit,garrettmoon/AsyncDisplayKit,yufenglv/AsyncDisplayKit,programming086/AsyncDisplayKit,harryworld/AsyncDisplayKit,yufenglv/AsyncDisplayKit,smyrgl/AsyncDisplayKit,programming086/AsyncDisplayKit,bimawa/AsyncDisplayKit,JetZou/AsyncDisplayKit,eanagel/AsyncDisplayKit,eanagel/AsyncDisplayKit,maicki/AsyncDisplayKit,Xinchi/AsyncDisplayKit,tomizimobile/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,paulyoung/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,jellenbogen/AsyncDisplayKit,paulyoung/AsyncDisplayKit,smyrgl/AsyncDisplayKit,levi/AsyncDisplayKit,dskatz22/AsyncDisplayKit,paulyoung/AsyncDisplayKit,yufenglv/AsyncDisplayKit,eanagel/AsyncDisplayKit,rahul-malik/AsyncDisplayKit,JetZou/AsyncDisplayKit,dskatz22/AsyncDisplayKit,RuiAAPeres/AsyncDisplayKit,programming086/AsyncDisplayKit,yufenglv/AsyncDisplayKit,aaronschubert0/AsyncDisplayKit,rmls/AsyncDisplayKit,nivanchikov/AsyncDisplayKit,flovouin/AsyncDisplayKit,gazreese/AsyncDisplayKit,gazreese/AsyncDisplayKit,rmls/AsyncDisplayKit,Adlai-Holler/AsyncDisplayKit,programming086/AsyncDisplayKit,romyilano/AsyncDisplayKit,nrcmedia/AsyncDisplayKit,george-gw/AsyncDisplayKit,gazreese/AsyncDisplayKit,bimawa/AsyncDisplayKit,chrisdanford/AsyncDisplayKit,harryworld/AsyncDisplayKit,smyrgl/AsyncDisplayKit,JetZou/AsyncDisplayKit,flovouin/AsyncDisplayKit,george-gw/AsyncDisplayKit,samhsiung/AsyncDisplayKit,hannahmbanana/AsyncDisplayKit
|
1b09b8a72d68109ec842581aeba2bc9cd7cbb87a
|
3RVX/Error.h
|
3RVX/Error.h
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <string>
#include <unordered_map>
#define GENERR 0x100
#define SKINERR 0x200
#define SYSERR 0x400
#define GENERR_NOTFOUND GENERR + 1
#define GENERR_SETTINGSFILE GENERR + 2
#define GENERR_MISSING_XML GENERR + 3
#define SKINERR_INVALID_SKIN SKINERR + 1
#define SKINERR_INVALID_OSD SKINERR + 2
#define SKINERR_INVALID_METER SKINERR + 3
#define SKINERR_INVALID_SLIDER SKINERR + 4
#define SKINERR_INVALID_BG SKINERR + 5
#define SKINERR_INVALID_SLIDERTYPE SKINERR + 7
#define SKINERR_NOTFOUND SKINERR + 8
#define SKINERR_MISSING_XML SKINERR + 9
#define SKINERR_READERR SKINERR + 10
#define SYSERR_REGISTERCLASS SYSERR + 1
#define SYSERR_CREATEWINDOW SYSERR + 2
class Error {
public:
static void ErrorMessage(unsigned int error, std::wstring detail = L"");
static void ErrorMessageDie(unsigned int error, std::wstring detail = L"");
private:
static std::unordered_map<int, std::wstring> errorMap;
static wchar_t *ErrorType(unsigned int error);
};
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <string>
#include <unordered_map>
class Error {
public:
static void ErrorMessage(unsigned int error, std::wstring detail = L"");
static void ErrorMessageDie(unsigned int error, std::wstring detail = L"");
private:
static std::unordered_map<int, std::wstring> errorMap;
static wchar_t *ErrorType(unsigned int error);
public:
static const int GENERR = 0x100;
static const int SKINERR = 0x200;
static const int SYSERR = 0x300;
static const int GENERR_NOTFOUND = GENERR + 1;
static const int GENERR_MISSING_XML = GENERR + 3;
static const int SKINERR_INVALID_SKIN = SKINERR + 1;
static const int SKINERR_INVALID_SLIDERTYPE = SKINERR + 7;
static const int SKINERR_NOTFOUND = SKINERR + 8;
static const int SKINERR_MISSING_XML = SKINERR + 9;
static const int SKINERR_XMLPARSE = SKINERR + 10;
static const int SYSERR_REGISTERCLASS = SYSERR + 1;
static const int SYSERR_CREATEWINDOW = SYSERR + 2;
};
|
Redefine error codes as consts
|
Redefine error codes as consts
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
a76075d352b4f48bb53f8d8c9accee841394d47c
|
rgmanager/src/clulib/gettid.c
|
rgmanager/src/clulib/gettid.c
|
#include <sys/types.h>
#include <linux/unistd.h>
#include <gettid.h>
_syscall0(pid_t,gettid)
|
#include <sys/types.h>
#include <linux/unistd.h>
#include <gettid.h>
#include <errno.h>
_syscall0(pid_t,gettid)
|
Fix build bug on slackware
|
Fix build bug on slackware
|
C
|
lgpl-2.1
|
stevenraspudic/resource-agents,stevenraspudic/resource-agents,asp24/resource-agents,asp24/resource-agents,asp24/resource-agents,stevenraspudic/resource-agents
|
7803ef3d413f336e40f8b20e256e02902fb9f395
|
SwiftColors/SwiftColors.h
|
SwiftColors/SwiftColors.h
|
#import <UIKit/UIKit.h>
//! Project version number for SwiftColors.
FOUNDATION_EXPORT double SwiftColorsVersionNumber;
//! Project version string for SwiftColors.
FOUNDATION_EXPORT const unsigned char SwiftColorsVersionString[];
|
#import <Foundation/Foundation.h>
//! Project version number for SwiftColors.
FOUNDATION_EXPORT double SwiftColorsVersionNumber;
//! Project version string for SwiftColors.
FOUNDATION_EXPORT const unsigned char SwiftColorsVersionString[];
|
Fix build error for OSX
|
Fix build error for OSX
|
C
|
mit
|
thii/SwiftHEXColors,thii/SwiftColors,thii/SwiftColors,thii/SwiftHEXColors
|
02815ad97a1a9cac9e580452c9dd24580f277062
|
lib/fuzzer/FuzzerRandom.h
|
lib/fuzzer/FuzzerRandom.h
|
//===- FuzzerRandom.h - Internal header for the Fuzzer ----------*- C++ -* ===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// fuzzer::Random
//===----------------------------------------------------------------------===//
#ifndef LLVM_FUZZER_RANDOM_H
#define LLVM_FUZZER_RANDOM_H
#include <random>
namespace fuzzer {
class Random : public std::minstd_rand {
public:
Random(unsigned int seed) : std::minstd_rand(seed) {}
result_type operator()() { return this->std::minstd_rand::operator()(); }
size_t Rand() { return this->operator()(); }
size_t RandBool() { return Rand() % 2; }
size_t operator()(size_t n) { return n ? Rand() % n : 0; }
intptr_t operator()(intptr_t From, intptr_t To) {
assert(From < To);
intptr_t RangeSize = To - From + 1;
return operator()(RangeSize) + From;
}
};
} // namespace fuzzer
#endif // LLVM_FUZZER_RANDOM_H
|
//===- FuzzerRandom.h - Internal header for the Fuzzer ----------*- C++ -* ===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// fuzzer::Random
//===----------------------------------------------------------------------===//
#ifndef LLVM_FUZZER_RANDOM_H
#define LLVM_FUZZER_RANDOM_H
#include <random>
namespace fuzzer {
class Random : public std::mt19937 {
public:
Random(unsigned int seed) : std::mt19937(seed) {}
result_type operator()() { return this->std::mt19937::operator()(); }
size_t Rand() { return this->operator()(); }
size_t RandBool() { return Rand() % 2; }
size_t operator()(size_t n) { return n ? Rand() % n : 0; }
intptr_t operator()(intptr_t From, intptr_t To) {
assert(From < To);
intptr_t RangeSize = To - From + 1;
return operator()(RangeSize) + From;
}
};
} // namespace fuzzer
#endif // LLVM_FUZZER_RANDOM_H
|
Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand
|
Revert r352732: [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand
This causes a failure on the following bot as well as our internal ones:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fuzzer/builds/23103
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@352747 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
|
2a422dcba1302b65a4a69bf70aa8e6f8ac6e8d71
|
src/hooks.h
|
src/hooks.h
|
/*
* hooks.h
* StatusSpec project
*
* Copyright (c) 2014 thesupremecommander
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#pragma once
#include "stdafx.h"
#include <map>
#define CLIENT_DLL
#define GLOWS_ENABLE
#include "cdll_int.h"
#include "KeyValues.h"
#include "igameresources.h"
#include "vgui/vgui.h"
#include "vgui/IPanel.h"
#include "cbase.h"
#include "c_basecombatcharacter.h"
#include "glow_outline_effect.h"
#include <sourcehook/sourcehook_impl.h>
#include <sourcehook/sourcehook.h>
using namespace vgui;
class C_TFPlayer;
#if defined _WIN32
#define OFFSET_GETGLOWOBJECT 220
#define OFFSET_GETGLOWEFFECTCOLOR 221
#define OFFSET_UPDATEGLOWEFFECT 222
#define OFFSET_DESTROYGLOWEFFECT 223
#endif
static std::map<EHANDLE, int> onDataChangedHooks;
extern SourceHook::ISourceHook *g_SHPtr;
extern int g_PLID;
|
/*
* hooks.h
* StatusSpec project
*
* Copyright (c) 2014 thesupremecommander
* BSD 2-Clause License
* http://opensource.org/licenses/BSD-2-Clause
*
*/
#pragma once
#include "stdafx.h"
#include <map>
#define CLIENT_DLL
#define GLOWS_ENABLE
#include "cdll_int.h"
#include "KeyValues.h"
#include "igameresources.h"
#include "vgui/vgui.h"
#include "vgui/IPanel.h"
#include "cbase.h"
#include "c_basecombatcharacter.h"
#include "glow_outline_effect.h"
#include <sourcehook/sourcehook_impl.h>
#include <sourcehook/sourcehook.h>
using namespace vgui;
class C_TFPlayer;
#if defined _WIN32
#define OFFSET_GETGLOWEFFECTCOLOR 223
#define OFFSET_UPDATEGLOWEFFECT 224
#define OFFSET_DESTROYGLOWEFFECT 225
#endif
static std::map<EHANDLE, int> onDataChangedHooks;
extern SourceHook::ISourceHook *g_SHPtr;
extern int g_PLID;
|
Update vtable offsets for 2014-06-11 TF2 update.
|
Update vtable offsets for 2014-06-11 TF2 update.
|
C
|
bsd-2-clause
|
fwdcp/StatusSpec,fwdcp/StatusSpec
|
8a8e7bb8f5de8c86d4e06ba934253bd355fa98dc
|
libc/sysdeps/linux/m68k/ptrace.c
|
libc/sysdeps/linux/m68k/ptrace.c
|
#include <errno.h>
#include <asm/ptrace.h>
#include <sys/syscall.h>
int
ptrace(int request, int pid, int addr, int data)
{
long ret;
long res;
if (request > 0 && request < 4) (long *)data = &ret;
__asm__ volatile ("movel %1,%/d0\n\t"
"movel %2,%/d1\n\t"
"movel %3,%/d2\n\t"
"movel %4,%/d3\n\t"
"movel %5,%/d4\n\t"
"trap #0\n\t"
"movel %/d0,%0"
:"=g" (res)
:"i" (__NR_ptrace), "g" (request), "g" (pid),
"g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4");
if (res >= 0) {
if (request > 0 && request < 4) {
__set_errno(0);
return (ret);
}
return (int) res;
}
__set_errno(-res);
return -1;
}
|
#include <errno.h>
#include <asm/ptrace.h>
#include <sys/syscall.h>
int
ptrace(int request, int pid, int addr, int data)
{
long ret;
long res;
if (request > 0 && request < 4) data = (int)&ret;
__asm__ volatile ("movel %1,%/d0\n\t"
"movel %2,%/d1\n\t"
"movel %3,%/d2\n\t"
"movel %4,%/d3\n\t"
"movel %5,%/d4\n\t"
"trap #0\n\t"
"movel %/d0,%0"
:"=g" (res)
:"i" (__NR_ptrace), "g" (request), "g" (pid),
"g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4");
if (res >= 0) {
if (request > 0 && request < 4) {
__set_errno(0);
return (ret);
}
return (int) res;
}
__set_errno(-res);
return -1;
}
|
Patch from Bernardo Innocenti: Remove use of cast-as-l-value extension, removed in GCC 3.5.
|
Patch from Bernardo Innocenti:
Remove use of cast-as-l-value extension, removed in GCC 3.5.
|
C
|
lgpl-2.1
|
joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc
|
d0436f27fd7bc254715e1b3b9cc6aae5ff9d4783
|
src/shims.c
|
src/shims.c
|
/*
* Copyright (c) 2013-2016 Apple Inc. All rights reserved.
*
* @APPLE_APACHE_LICENSE_HEADER_START@
*
* 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.
*
* @APPLE_APACHE_LICENSE_HEADER_END@
*/
#include "internal.h"
#include "shims.h"
#if !HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t size) {
size_t res = strlen(dst) + strlen(src) + 1;
if (size > 0) {
size_t n = size - 1;
strncpy(dst, src, n);
dst[n] = 0;
}
return res;
}
#endif
|
/*
* Copyright (c) 2013-2016 Apple Inc. All rights reserved.
*
* @APPLE_APACHE_LICENSE_HEADER_START@
*
* 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.
*
* @APPLE_APACHE_LICENSE_HEADER_END@
*/
#include "internal.h"
#include "shims.h"
#if !HAVE_STRLCPY
size_t strlcpy(char *dst, const char *src, size_t size)
{
size_t res = strlen(dst) + strlen(src) + 1;
if (size > 0) {
size_t n = size - 1;
strncpy(dst, src, n);
dst[n] = 0;
}
return res;
}
#endif
|
Fix formatting to match libdispatch coding style.
|
Fix formatting to match libdispatch coding style.
Signed-off-by: Daniel A. Steffen <bc823475b60dbcbd7be1bbdfe095b5f1939d5bd2@apple.com>
|
C
|
apache-2.0
|
apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch,apple/swift-corelibs-libdispatch
|
952c546f11ca06f572a25b6b85a8b49523a580f9
|
src/lib/lib.h
|
src/lib/lib.h
|
#ifndef __LIB_H
#define __LIB_H
/* default lib includes */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
/* default system includes - keep these at minimum.. */
#include <string.h> /* strcmp() etc. */
#ifdef HAVE_STRINGS_H
# include <strings.h> /* strcasecmp() etc. */
#endif
#include <stdarg.h> /* va_list is used everywhere */
#include <limits.h> /* INT_MAX, etc. */
#include <errno.h> /* error checking is good */
#include <sys/types.h> /* many other includes want this */
#ifdef HAVE_STDINT_H
# include <stdint.h> /* C99 int types, we mostly need uintmax_t */
#endif
#include "compat.h"
#include "macros.h"
#include "failures.h"
#include "data-stack.h"
#include "mempool.h"
#include "imem.h"
typedef struct buffer buffer_t;
typedef struct buffer string_t;
struct istream;
struct ostream;
#include "array-decl.h" /* ARRAY_DEFINE()s may exist in any header */
#include "strfuncs.h"
size_t nearest_power(size_t num);
void lib_init(void);
void lib_deinit(void);
#endif
|
#ifndef __LIB_H
#define __LIB_H
/* default lib includes */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
/* default system includes - keep these at minimum.. */
#include <stddef.h> /* Solaris defines NULL wrong unless this is used */
#include <string.h> /* strcmp() etc. */
#ifdef HAVE_STRINGS_H
# include <strings.h> /* strcasecmp() etc. */
#endif
#include <stdarg.h> /* va_list is used everywhere */
#include <limits.h> /* INT_MAX, etc. */
#include <errno.h> /* error checking is good */
#include <sys/types.h> /* many other includes want this */
#ifdef HAVE_STDINT_H
# include <stdint.h> /* C99 int types, we mostly need uintmax_t */
#endif
#include "compat.h"
#include "macros.h"
#include "failures.h"
#include "data-stack.h"
#include "mempool.h"
#include "imem.h"
typedef struct buffer buffer_t;
typedef struct buffer string_t;
struct istream;
struct ostream;
#include "array-decl.h" /* ARRAY_DEFINE()s may exist in any header */
#include "strfuncs.h"
size_t nearest_power(size_t num);
void lib_init(void);
void lib_deinit(void);
#endif
|
Include stddef.h always to make NULL expand correctly in Solaris.
|
Include stddef.h always to make NULL expand correctly in Solaris.
|
C
|
mit
|
LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot
|
d6f1a139af99a84b70db7aa21f19b355a7743c1c
|
java/include/pstore-jni.h
|
java/include/pstore-jni.h
|
#ifndef PSTOREJNI_H
#define PSTOREJNI_H
#include <inttypes.h>
#ifdef __i386__
#define LONG_TO_PTR(ptr) (void *) (uint32_t) ptr
#elif __X86_64__
#define LONG_TO_PTR(ptr) (void *) ptr
#endif
#define PTR_TO_LONG(ptr) (long) ptr
#endif
|
#ifndef PSTOREJNI_H
#define PSTOREJNI_H
#include <inttypes.h>
#ifdef __i386__
#define LONG_TO_PTR(ptr) (void *) (uint32_t) ptr
#elif __x86_64__
#define LONG_TO_PTR(ptr) (void *) ptr
#endif
#define PTR_TO_LONG(ptr) (long) ptr
#endif
|
Use '__x86_64__' instead of '__X86_64__'
|
java: Use '__x86_64__' instead of '__X86_64__'
This fixes compilation error on Mac OS X.
Signed-off-by: Kare Nuorteva <9ddc85c347529f7b35a7cd6b44bef03c7222a8be@reaktor.fi>
Signed-off-by: Karim Osman <94396faf6cc817be76165477038b3cfa832e89a4@reaktor.fi>
Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@kernel.org>
|
C
|
lgpl-2.1
|
penberg/pstore,penberg/pstore,penberg/pstore,penberg/pstore
|
34ea5331f8e05dacf356096dfc1b63682fa78654
|
Wikipedia/Code/BITHockeyManager+WMFExtensions.h
|
Wikipedia/Code/BITHockeyManager+WMFExtensions.h
|
#import <HockeySDK/HockeySDK.h>
@interface BITHockeyManager (WMFExtensions) <BITHockeyManagerDelegate>
/**
* Configure and startup in one line.
* This will call the methods below as part of the configuration process.
* This method will use the current bundle id of the app
*/
- (void)wmf_setupAndStart;
/**
* Configure the alert to be displayed when a user is prompeted to send a crash report
*/
- (void)wmf_setupCrashNotificationAlert;
@end
|
@import HockeySDK;
@interface BITHockeyManager (WMFExtensions) <BITHockeyManagerDelegate>
/**
* Configure and startup in one line.
* This will call the methods below as part of the configuration process.
* This method will use the current bundle id of the app
*/
- (void)wmf_setupAndStart;
/**
* Configure the alert to be displayed when a user is prompeted to send a crash report
*/
- (void)wmf_setupCrashNotificationAlert;
@end
|
Revert "use old import syntax for HockeySDK"
|
Revert "use old import syntax for HockeySDK"
This reverts commit 0babdd70b3ab330f032790521002f2e171fcf3e6.
|
C
|
mit
|
wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,wikimedia/apps-ios-wikipedia,wikimedia/wikipedia-ios,wikimedia/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,montehurd/apps-ios-wikipedia,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,julienbodet/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia
|
70961ee3265e37813c4fb89dfd7a5660ae4b189a
|
src/include/sys/interrupt.h
|
src/include/sys/interrupt.h
|
// IBM_PROLOG_BEGIN_TAG
// This is an automatically generated prolog.
//
// $Source: src/include/sys/interrupt.h $
//
// IBM CONFIDENTIAL
//
// COPYRIGHT International Business Machines Corp. 2011
//
// p1
//
// Object Code Only (OCO) source materials
// Licensed Internal Code Source Materials
// IBM HostBoot Licensed Internal Code
//
// The source code for this program is not published or other-
// wise divested of its trade secrets, irrespective of what has
// been deposited with the U.S. Copyright Office.
//
// Origin: 30
//
// IBM_PROLOG_END
#ifndef __INTERRUPT_H
#define __INTERRUPT_H
extern const char* INTR_MSGQ;
/**
* INTR constants
*/
enum
{
ICPBAR_SCOM_ADDR = 0x020109c9, //!< for P8, P7 = 0x02011C09
// This BAR value agrees with simics (for now)
ICPBAR_VAL = 0x03FBFF90, //!< ICPBAR value bits[0:29]>>34
};
#endif
|
// IBM_PROLOG_BEGIN_TAG
// This is an automatically generated prolog.
//
// $Source: src/include/sys/interrupt.h $
//
// IBM CONFIDENTIAL
//
// COPYRIGHT International Business Machines Corp. 2011
//
// p1
//
// Object Code Only (OCO) source materials
// Licensed Internal Code Source Materials
// IBM HostBoot Licensed Internal Code
//
// The source code for this program is not published or other-
// wise divested of its trade secrets, irrespective of what has
// been deposited with the U.S. Copyright Office.
//
// Origin: 30
//
// IBM_PROLOG_END
#ifndef __INTERRUPT_H
#define __INTERRUPT_H
extern const char* INTR_MSGQ;
/**
* INTR constants
*/
enum
{
ICPBAR_SCOM_ADDR = 0x020109ca, //!< for P8, P7 = 0x02011C09
// This BAR value agrees with simics (for now)
ICPBAR_VAL = 0x03FBFF90, //!< ICPBAR value bits[0:29]>>34
};
#endif
|
Fix IPC BAR scom address
|
Fix IPC BAR scom address
Change-Id: Ib3e13d892e58faa12082d6a09a1f6b504af44ae5
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1058
Reviewed-by: Thi N. Tran <25a2bca7ae5a8ea03be09ca8d282480c08c13052@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Mark W. Wenning <32e1305d9513301b64a3e92b63a7c80399d0fb59@us.ibm.com>
Reviewed-by: A. Patrick Williams III <c87e37b1a4035affd737b461af89fb722d635f4d@us.ibm.com>
|
C
|
apache-2.0
|
Over-enthusiastic/hostboot,csmart/hostboot,Over-enthusiastic/hostboot,csmart/hostboot,alvintpwang/hostboot,Over-enthusiastic/hostboot,open-power/hostboot,alvintpwang/hostboot,open-power/hostboot,alvintpwang/hostboot,Over-enthusiastic/hostboot,Over-enthusiastic/hostboot,alvintpwang/hostboot,open-power/hostboot,open-power/hostboot,csmart/hostboot,alvintpwang/hostboot,open-power/hostboot,csmart/hostboot,csmart/hostboot
|
077a4fb5a3055d6d681bdd885bc58a3b3c0830aa
|
Classes/Model/VKVotable.h
|
Classes/Model/VKVotable.h
|
//
// VKVotable.h
// VoatKit
//
// Created by Amar Ramachandran on 6/26/15.
// Copyright © 2015 AmarJayR. All rights reserved.
//
#import "VKCreated.h"
typedef NS_ENUM(NSUInteger, VKVoteStatus) {
VKVoteStatusUpvoted,
VKVoteStatusDownvoted,
VKVoteStatusNone
};
@interface VKVotable : VKCreated
/**
The total number of upvotes.
*/
@property (nonatomic, assign, readonly) NSNumber* upvotes;
/**
The total number of downvotes.
*/
@property (nonatomic, assign, readonly) NSNumber* downvotes;
/**
The object's score.
*/
@property (nonatomic, assign, readonly) NSNumber* score;
/**
The current user's vote status for this object.
*/
@property (nonatomic, assign, readonly) VKVoteStatus voteStatus;
/**
Whether the current user has upvoted this object.
*/
- (BOOL)upvoted;
/**
Whether the current user has downvoted this object.
*/
- (BOOL)downvoted;
/**
Whether the current user has voted on this object.
*/
- (BOOL)voted;
@end
|
//
// VKVotable.h
// VoatKit
//
// Created by Amar Ramachandran on 6/26/15.
// Copyright © 2015 AmarJayR. All rights reserved.
//
#import "VKCreated.h"
typedef NS_ENUM(NSUInteger, VKVoteStatus) {
VKVoteStatusNone,
VKVoteStatusUpvoted,
VKVoteStatusDownvoted
};
@interface VKVotable : VKCreated
/**
The total number of upvotes.
*/
@property (nonatomic, assign, readonly) NSNumber* upvotes;
/**
The total number of downvotes.
*/
@property (nonatomic, assign, readonly) NSNumber* downvotes;
/**
The object's score.
*/
@property (nonatomic, assign, readonly) NSNumber* score;
/**
The current user's vote status for this object.
*/
@property (nonatomic, assign, readonly) VKVoteStatus voteStatus;
/**
Whether the current user has upvoted this object.
*/
- (BOOL)upvoted;
/**
Whether the current user has downvoted this object.
*/
- (BOOL)downvoted;
/**
Whether the current user has voted on this object.
*/
- (BOOL)voted;
@end
|
Change the default VKVoteStatus value to VKVoteStatusNone This is necessary because unvoted items don't send a "voteValue" field so the voteStatusJSONTransformer is never called
|
Change the default VKVoteStatus value to VKVoteStatusNone
This is necessary because unvoted items don't send a "voteValue" field so the voteStatusJSONTransformer is never called
|
C
|
mit
|
nuudles/VoatKit,AmarJayR/VoatKit
|
1c996d94ec09d367d45c4a37ec1485ea7ff724f4
|
src/ingredientpropertylist.h
|
src/ingredientpropertylist.h
|
/***************************************************************************
* Copyright (C) 2003 by Unai Garro *
* ugarro@users.sourceforge.net *
* *
* 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. *
***************************************************************************/
#ifndef INGREDIENTPROPERTYLIST_H
#define INGREDIENTPROPERTYLIST_H
#include <qptrlist.h>
#include "ingredientproperty.h"
/**
@author Unai Garro
*/
class PropertyPtrList: public QPtrList <IngredientProperty>
{
public:
PropertyPtrList(){};
~PropertyPtrList(){};
protected:
virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2){return (*((int*)item1)-*((int*)item2));};
};
class IngredientPropertyList{
public:
IngredientPropertyList();
~IngredientPropertyList();
IngredientProperty* getFirst(void);
IngredientProperty* getNext(void);
IngredientProperty* getElement(int index);
void clear(void);
bool isEmpty(void);
void add(IngredientProperty &element);
void append(IngredientProperty *property);
int find(IngredientProperty* it);
IngredientProperty* at(int pos);
private:
PropertyPtrList list;
};
#endif
|
/***************************************************************************
* Copyright (C) 2003 by Unai Garro *
* ugarro@users.sourceforge.net *
* *
* 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. *
***************************************************************************/
#ifndef INGREDIENTPROPERTYLIST_H
#define INGREDIENTPROPERTYLIST_H
#include <qptrlist.h>
#include "ingredientproperty.h"
/**
@author Unai Garro
*/
class PropertyPtrList: public QPtrList <IngredientProperty>
{
public:
PropertyPtrList(){};
~PropertyPtrList(){};
protected:
virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2){return (((IngredientProperty*)item1)->id-((IngredientProperty*)item2)->id);};
};
class IngredientPropertyList{
public:
IngredientPropertyList();
~IngredientPropertyList();
IngredientProperty* getFirst(void);
IngredientProperty* getNext(void);
IngredientProperty* getElement(int index);
void clear(void);
bool isEmpty(void);
void add(IngredientProperty &element);
void append(IngredientProperty *property);
int find(IngredientProperty* it);
IngredientProperty* at(int pos);
private:
PropertyPtrList list;
};
#endif
|
Fix comparison between properties (compare the ID)
|
Fix comparison between properties (compare the ID)
svn path=/trunk/kdeextragear-3/krecipes/; revision=237720
|
C
|
lgpl-2.1
|
eliovir/krecipes,eliovir/krecipes,eliovir/krecipes,eliovir/krecipes
|
72d08adcc89f72f2243c063b4ec3f7202574807f
|
3RVX/Controllers/Volume/VolumeTransformation.h
|
3RVX/Controllers/Volume/VolumeTransformation.h
|
#pragma once
class VolumeTransformation {
public:
virtual float Transform(float vol) = 0;
};
|
#pragma once
class VolumeTransformation {
public:
/// <summary>
/// Transforms a given volume level to a new ("virtual") level based on a
/// formula or set of rules (e.g., a volume curve transformation).
/// </summary>
virtual float ToVirtual(float vol) = 0;
/// <summary>
/// Given a transformed ("virtual") volume value, this function reverts it
/// back to its original value (assuming the given value was produced
/// by the ToVirtual() function).
/// </summary>
virtual float FromVirtual(float vol) = 0;
};
|
Split transform methods into to/from
|
Split transform methods into to/from
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
2954136a1da999c3a5b6662e96368c073643509b
|
libraries/FreeIMU/calibration.h
|
libraries/FreeIMU/calibration.h
|
/**
* FreeIMU calibration header. Automatically generated by octave AccMagnCalib.m.
* Do not edit manually unless you know what you are doing.
*/
/* // following example of calibration.h
#define CALIBRATION_H
const int acc_off_x = 205;
const int acc_off_y = -39;
const int acc_off_z = 1063;
const float acc_scale_x = 7948.565970;
const float acc_scale_y = 8305.469320;
const float acc_scale_z = 8486.650841;
const int magn_off_x = 67;
const int magn_off_y = -59;
const int magn_off_z = 26;
const float magn_scale_x = 527.652115;
const float magn_scale_y = 569.016790;
const float magn_scale_z = 514.710857;
*/
|
/**
* FreeIMU calibration header. Automatically generated by FreeIMU_GUI.
* Do not edit manually unless you know what you are doing.
*/
#define CALIBRATION_H
const int acc_off_x = 163;
const int acc_off_y = 119;
const int acc_off_z = -622;
const float acc_scale_x = 16387.035965;
const float acc_scale_y = 16493.176991;
const float acc_scale_z = 16517.294625;
const int magn_off_x = 26;
const int magn_off_y = -128;
const int magn_off_z = 43;
const float magn_scale_x = 528.171092;
const float magn_scale_y = 485.462478;
const float magn_scale_z = 486.973938;
|
Update for Arduino Due and refresh of files to make sure they are the latest
|
Update for Arduino Due and refresh of files to make sure they are the latest
|
C
|
mit
|
tokk250/FreeIMU-Updates,mjs513/FreeIMU-Updates,bmweller/FreeIMU-Updates,tokk250/FreeIMU-Updates,bmweller/FreeIMU-Updates,tokk250/FreeIMU-Updates,bmweller/FreeIMU-Updates,bmweller/FreeIMU-Updates,mjs513/FreeIMU-Updates,bmweller/FreeIMU-Updates,mjs513/FreeIMU-Updates,tokk250/FreeIMU-Updates,tokk250/FreeIMU-Updates,tokk250/FreeIMU-Updates,mjs513/FreeIMU-Updates,tokk250/FreeIMU-Updates,mjs513/FreeIMU-Updates,mjs513/FreeIMU-Updates,bmweller/FreeIMU-Updates,bmweller/FreeIMU-Updates,mjs513/FreeIMU-Updates,mjs513/FreeIMU-Updates,bmweller/FreeIMU-Updates,tokk250/FreeIMU-Updates
|
a39bade0af5ec329970865cd016175441c0d4a8e
|
src/imap/cmd-create.c
|
src/imap/cmd-create.c
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(Client *client)
{
const char *mailbox;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
if (!client_verify_mailbox_name(client, mailbox, FALSE, TRUE))
return TRUE;
if (mailbox[strlen(mailbox)-1] == client->storage->hierarchy_sep) {
/* name ends with hierarchy separator - client is just
informing us that it wants to create a mailbox under
this name. we don't need that information. */
} else if (!client->storage->create_mailbox(client->storage, mailbox)) {
client_send_storage_error(client);
return TRUE;
}
client_send_tagline(client, "OK Create completed.");
return TRUE;
}
|
/* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "commands.h"
int cmd_create(Client *client)
{
const char *mailbox;
int ignore;
/* <mailbox> */
if (!client_read_string_args(client, 1, &mailbox))
return FALSE;
ignore = mailbox[strlen(mailbox)-1] == client->storage->hierarchy_sep;
if (ignore) {
/* name ends with hierarchy separator - client is just
informing us that it wants to create a mailbox under
this name. we don't need that information, but verify
that the mailbox name is valid */
mailbox = t_strndup(mailbox, strlen(mailbox)-1);
}
if (!client_verify_mailbox_name(client, mailbox, FALSE, !ignore))
return TRUE;
if (!ignore &&
!client->storage->create_mailbox(client->storage, mailbox)) {
client_send_storage_error(client);
return TRUE;
}
client_send_tagline(client, "OK Create completed.");
return TRUE;
}
|
CREATE mailbox<hierarchy separator> failed always.
|
CREATE mailbox<hierarchy separator> failed always.
|
C
|
mit
|
Distrotech/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,Distrotech/dovecot,damoxc/dovecot,LTD-Beget/dovecot,damoxc/dovecot,LTD-Beget/dovecot,LTD-Beget/dovecot,damoxc/dovecot,damoxc/dovecot,Distrotech/dovecot,Distrotech/dovecot,LTD-Beget/dovecot
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.