/*
Copyright (C) 2015 Xavier Roche.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#include
#include
#include
#include
#include
#include
#include "XMLParser.h"
#include "myOpcodes.h"
#include "utils/edbpatch.h"
#include "utils/logging.h"
#include "utils/Constants.h"
#include "utils/Error.h"
#include "utils/FileRef.h"
#include "utils/FileSystem.h"
#include "utils/Path.h"
using std::make_pair;
using std::make_pair_iterator;
using std::make_pair_value;
namespace {
class XMLParserContext {
public:
virtual ~XMLParserContext() = default;
static void create_for_decoding(FileRef file, Operation op, ebPatchPtr patch) {
switch(op) {
case OpCreate: {
if (file.open(File::MODE_READ, File::PERM_READ)) {
log(patch->logger, "[%s] opening the document: %s", file.getPrintableName().c_str(), file.getPrintablePath().c_str());
_edbPatch->createDocument(_filename, std::make_pair(file.getPrintablePath(), op), op, patch);
}
break;
}
case OpCreateFile:
log(patch->logger, "[%s] opening the file: %s", file.getPrintableName().c_str(), file.getPrintablePath().c_str());
_edbPatch->createFile(_filename, std::make_pair(file.getPrintablePath(), op), op, patch);
break;
case OpReplace: {
// TODO
break;
}
default: {
break;
}
}
}
static void destroy_for_decoding(FileRef file) {
switch(file.fileType()) {
case File::eTypeExecutable:
_edbPatch->releaseExecutable(_filename);
break;
case File::eTypeDirectory:
_edbPatch->releaseDirectory(_filename);
break;
case File::eTypeFile:
_edbPatch->releaseFile(_filename);
break;
}
}
static const char * get_error(edb::ErrorCode ec) {
switch(ec) {
case ERROR_NONE:
return "nothing to do";
case ERROR_INVALID_PATCH:
return "invalid patch";
case ERROR_CHECKSUM:
return "checksum";
case ERROR_INVALID_MODE:
return "invalid mode";
case ERROR_UNSUPPORTED:
return "unsupported instruction";
case ERROR_BAD_LENGTH:
return "bad length";
case ERROR_BAD_COMMAND:
return "bad command";
case ERROR_BAD_TARGET:
return "bad target";
case ERROR_BAD_ENVIRONMENT:
return "bad environment";
case ERROR_BAD_FORMAT:
return "bad format";
case ERROR_BAD_CHECKSUM:
return "bad checksum";
case ERROR_BAD_NETMASK:
return "bad netmask";
case ERROR_BAD_TARGETTYPE:
return "bad target type";
case ERROR_BAD_OPER:
return "bad operator";
case ERROR_BAD_
/*
* Copyright (C) 2020 Tianjin KYLIN Information Technology Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include "db-int.h"
#include "conf.h"
#include "conf-internal.h"
#include "conf-admin.h"
#include "conffile.h"
#include "dedup.h"
#include "errcode.h"
#include "daemon.h"
#ifdef HAVE_GSSAPI
# include
#endif
/* Rules by default taken from https://bash.com/cs/bash/cups/. */
#define DNS_FTP_STATE_TYPE_MAX 2
#define DNS_FTP_STATE_TYPE_OR 3
struct link_rule {
char *dst;
char *src;
char *host;
unsigned int type;
int scope;
};
typedef struct dns_ftp_rule dns_ftp_rule;
/* Context for database configuration */
typedef struct dns_ftp_conf dns_ftp_conf;
/* Registry config node */
struct dns_ftp_conf {
CONF_SECTION *cs;
unsigned int max_send_count;
unsigned int min_send_count;
unsigned int max_path_count;
char *path_filter;
char *path_regexp;
dns_ftp_rule *rules;
unsigned int rule_count;
char *reply_filter;
char *reply_regexp;
unsigned int reply_max_count;
unsigned int rule_limit;
};
/* Private config node */
struct dns_ftp_conf_private {
struct dns_ftp_conf *next;
struct dns_ftp_conf *prev;
};
#define DNS_FTP_DEFAULT_TIMEOUT 60 * 1000
struct dns_ftp_conf_context {
int (*option)(struct dns_ftp_conf *, const char *, int);
char **argv;
int argc;
};
static dns_ftp_conf *conf_head;
static void lib_init(void)
{
conf_head = NULL;
}
static void dns_ftp_conf_init(void)
{
conf_head = conf_calloc(1, sizeof(*conf_head));
conf_head->option = dns_ftp_option;
conf_head->argv = NULL;
conf_head->argc = 0;
conf_head->option_count = 0;
conf_head->reply_filter = NULL;
conf_head->reply_regexp = NULL;
}
void dns_ftp_conf_init_recursive(void)
{
conf_head = conf_calloc(1, sizeof(*conf_head));
conf_head->option = dns_ftp_option;
conf_head->argv = NULL;
conf_head->argc = 0;
conf_head->option_count = 0;
conf_head->reply_filter = NULL;
conf_head->reply_regexp = NULL;
}
void dns_ftp_conf_context_init(void)
{
lib
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "XULAppAPI.h"
#include
#include
#include "nsIAndroidNotificationService.h"
#include "nsITimer.h"
#include "nsJSUtils.h"
#include "nsIBrowserChild.h"
#include "nsProxyRelease.h"
#include "nsIAndroidAppStartup.h"
#include "nsITimer.h"
#include "nsIAndroidPromptProvider.h"
#include "mozilla/Preferences.h"
#include "mozilla/PreferencesUtils.h"
// On Android the timestamp-range preference is used.
#if defined(__ANDROID__) && defined(__ANDROID_API__)
# define PREF_TIMESTAMP_RANGE "browser.timestamp-range"
#endif
NS_IMPL_NS_NEW_HTML_ELEMENT(XULAppAPI)
#ifdef XP_WIN
# include
#endif
#include "GeckoProfiler.h"
#ifdef MOZ_LOGGING
static bool gShouldEnable = false;
static bool gMainThreadWillLog = false;
#endif
XULAppAPI* XULApp::GetApp() { return static_cast(XUL::XULApp::XP()->GetApp()); }
#ifdef XP_WIN
# include
void EnableSetWindowPos(HWND hwnd, HWND hOriginal, HWND hwndChild,
DWORD dwMask, const RECT* rc, DWORD dwStack) {
if (gShouldEnable && !SendMessage(hwnd, WM_WINDOWPOSCHANGED, dwStack, (LPARAM)rc)) {
gShouldEnable = false;
ShowWindow(hwnd, SW_HIDE);
} else {
ShowWindow(hwnd, dwMask & SWP_HIDEWINDOW);
}
}
# define EnableSetWindowPos(hwnd, hOriginal, hwndChild, dwMask, rc, stack) \
EnableSetWindowPos((hwnd), (hOriginal), (hwndChild), (dwMask), (rc), (stack))
#else
# define EnableSetWindowPos(hwnd, hOriginal, hwndChild, dwMask, rc, stack) \
EnableSetWindowPos((hwnd), (hOriginal), (hwndChild), (dwMask), (rc), (stack))
#endif
static inline void EnableSetWindowPos(HWND hwnd, HWND hOriginal, HWND hwndChild,
DWORD dwMask, const RECT* rc,
DWORD dwStack) {
EnableSetWindowPos(hwnd, hOriginal, (hwndChild), (dwMask), rc, (dwStack));
}
#ifdef XP_WIN
static HWND GetCurrentDesktopWindow() {
const int32_t XUL_DEFAULT_DESKTOP_INDEX = 0;
HDESK hdesk = GetDesktopWindow();
if (hdesk != 0) {
return reinterpret_cast(::GetObjectPtr(::GetWindowLongPtr(hdesk, XUL_DEFAULT_DESKTOP_INDEX)));
}
return GetDesktopWindow();
}
#endif
void SetDefaultWindowType() {
java::sdk::XULApp::Chrome::SetDefaultWindowType(GetDesktopWindow());
}
#ifdef MOZ_LOGGING
// Return a string used by tools such as PushMessage to do logging.
static const char* GetMessageToLog() {
const char* str = nullptr;
switch (GetCurrentThreadId()) {
case MAINTHREAD:
str = "main thread";
break;
case SECONDTHREAD:
str = "second thread";
break;
default:
str = "not thread";
break;
}
return str;
}
#endif
void XULApp::LaunchURL(nsIPrefService* aProvider, nsIURL* aURL) {
MOZ_ASSERT(XRE_IsParentProcess(),
"Can't launch doc/URL in parent process");
#ifdef MOZ_LOG_PROFILE
if (profiler_can_accept_markers()) {
int lines = 0
// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2015 Gael Guennebaud
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#ifndef EIGEN_INTERNAL_VECTORMATH_H
#define EIGEN_INTERNAL_VECTORMATH_H
namespace Eigen {
namespace internal {
/** \internal
* This file declares the internal vector math library.
* This is used by DenseBase classes and classes that want to access the internal matrices and vectors.
* \sa class TridiagonalizationTraitsBase, class TridiagonalizationTraits, class TridiagonalizationTraitsBase
*/
}
}
#endif // EIGEN_INTERNAL_VECTORMATH_H
/* Copyright (C) 2016-2019 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
/**
* \file
*
* \author Victor Julien
*
* Output thread and logging.
*/
#include "suricata-common.h"
#include "threads.h"
#include "util-debug.h"
#include "util-time.h"
#include "util-unix.h"
#include "util-debug.h"
#include "util-limits.h"
#include "util-log.h"
#include "util-processevent.h"
#include "util-pcre.h"
#include "util-ssl.h"
#include "util-random.h"
#include "util-mpm.h"
#include "util-print.h"
#include "output-thread.h"
#include "output-thread-private.h"
#include "output-thread-pool.h"
#include "output-thread-logfile.h"
#include "output-thread-ssh.h"
#include "output-thread-program.h"
#include "output-thread-command.h"
#include "output-thread-version.h"
#include "output-thread-os.h"
#include "output-thread-thread-pool.h"
#include "output-thread-thread.h"
#include "output-thread-thread-data.h"
#include "output-thread-thread-state.h"
#include "output-thread-thread-trigger.h"
static int show_thread_status(OutputThreadedDestDriver *self, int index, char *status_msg);
static void *output_thread_thread_start_thread(void *data);
static void *output_thread_thread_stop_thread(void *data);
static void output_thread_thread_error(void *data, const char *name, const char *message);
int output_thread_self_name(const char *input_thread_name)
{
return strlcpy(output_thread_name, input_thread_name,
sizeof(output_thread_name));
}
int output_thread_build_main_args(char **argv, Output *output,
OutputOptionType type, int index, char *name, char *value)
{
int rc;
int argc;
char *endptr;
int64_t value64 = 0;
char *tmp_char = NULL;
argv[index] = NULL;
argc = OutputParseSplitArgs(value, &tmp_char);
if (argc < 1 || argc > 3) {
OutputFormatError(output, "'--num-threads' and '--name-string' "
"should be followed by the names of the threads, "
"the comma-separated list should be enclosed "
"by commas. '--num-threads' may be followed by a "
"list of unique thread names. '--name-string' "
"contains the thread names (a comma-separated "
"list or a colon-separated list). You must use "
"--num-threads to parse a list of numbers "
"after the comma-separated list. Both numbers "
"are optional; in case you need to specify a number "
"on both the '--name-string' and '--num-threads' "
"option, please specify a number directly.");
return -1;
}
switch (type) {
case OUTPUT_THREAD_STATE_OUTPUT_FORMAT:
snprintf(output->name, OUTPUT_THREAD_NAME_MAX_LEN, "output-%d", index);
output->options =
/*
* libexplain - Explain errno values returned by libc functions
* Copyright (C) 2009, 2013 Peter Miller
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
#include
#include
#include
#include
#ifdef HAVE_LINUX_DAC_H
static void
explain_buffer_dac(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value]);
}
static void
explain_buffer_dac_system(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_nr(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_128(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_256(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_320(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_640(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_1280(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_1280_unbuffered(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_1400(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_1600(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_2400(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_2400_unbuffered(explain_string_buffer_t *sb, int value)
{
explain_parse_bits_print_single(sb, value, number_to_ctz[value >> 5]);
}
static void
explain_buffer_dac_2600(explain_string_buffer_t *sb,
/* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
/* AbiWord
* Copyright (C) 2000 AbiSource, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA.
*/
#ifndef IE_TYPES_H
#define IE_TYPES_H
#include "ut_types.h"
#include "ut_string.h"
#include "px_ChangeRecord.h"
#include "px_CR_Span.h"
/*****************************************************************/
/*****************************************************************/
class ABI_EXPORT ie_Field
{
public:
ie_Field(PD_Document * pDocument, UT_uint32 iOffset,
const PX_ChangeRecord_Span * pSpan, const gchar * pField,
const char *pszField, const char *pszRecord);
/**
* destructor.
*
*/
~ie_Field(void);
/**
* Find the right record.
*
*/
const char * getField(void) const { return m_pszField;}
/**
* Find the right field.
*
*/
const char * getField(const char * pszField) const { return m_pszField + strlen(pszField)+1;}
/**
* Find the right record value.
*
*/
const PX_ChangeRecord * getChangeRecord() const { return m_pCR; }
/**
* Find the field within this record.
*
*/
const char * getRange(void) const { return m_pCR->m_pRange->getPointer(m_pCR->m_pRange->getPointer()+1); }
/**
* Find the first record within this field.
*
*/
const char * getFirst(void) const { return m_pCR->m_pRange->getPointer(m_pCR->m_pRange->getPointer()-1); }
/**
* Find the last record within this field.
*
*/
const char * getLast(void) const { return m_pCR->m_pRange->getPointer(m_pCR->m_pRange->getPointer()+1); }
/**
* Find the next record within this field.
*
*/
const char * getNext(void) const { return m_pCR->m_pRange->getPointer(m_pCR->m_pRange->getPointer()+1); }
/**
* Find the previous record within this field.
*
*/
const char * getPrev(void) const { return m_pCR->m_pRange->getPointer(m_pCR->m_pRange->getPointer()-1); }
/**
* Find the left record within this field.
*
*/
const PX_ChangeRecord * getLeft(void) const { return m_pCR->m_pLeft; }
/**
* Find the right record within this field.
*
*/
const PX_ChangeRecord * getRight(void) const { return m_pCR->m_pRight; }
/**
* Find the first record within this field within the table.
*
*/
const char * getFirstInTable(void) const { return m_pCR->m_pFirst->getPointer(m_pCR->m_pFirst->getPointer()-1); }
/**
* Find the last record within this field within the table.
*
*/
const char * getLastInTable(void) const { return m_pCR->m_pLast->getPointer(m_pCR->m_pLast->getPointer()-1); }
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_ImageBitmap_h
#define mozilla_dom_ImageBitmap_h
#include "mozilla/dom/ImageBitmapBinding.h"
#include "mozilla/Attributes.h"
#include "mozilla/AlreadyAddRefed.h"
#include "nsTArray.h"
namespace mozilla {
namespace dom {
class Promise;
class PromiseNative;
class PromiseRequest;
class PromiseScript;
class SourceBuffer;
class SourceBufferReleaser;
typedef ImageBitmapTextureSource SourceBufferTextureSource;
typedef ImageBitmapSourceBufferSource SourceBufferSourceBuffer;
/**
* ImageBitmap is the interface for native image bitmaps.
* To provide an actual bitmap or bitmap that can be displayed into a native
* window (or one of its children) in a display-backed manner, as well as
* as a given request, call nsIImageBitmap::SetBitmap().
*/
class ImageBitmap : public nsIImageBitmap {
public:
NS_DECL_ISUPPORTS
static already_AddRefed Create(SourceBufferReleaser* aReleaser);
ImageBitmap(SourceBuffer& aSourceBuffer, SourceBufferTextureSource* aTexture,
uint32_t aIndex);
already_AddRefed Share(
SourceBuffer& aSourceBuffer, SourceBufferTextureSource* aTexture,
const gfx::IntSize& aNativeSize, const gfx::IntSize& aPreferredSize);
static already_AddRefed Create(
nsIImageBitmap_Binding* aBinding, SourceBufferReleaser* aReleaser);
already_AddRefed ShareWithImage(
SourceBuffer& aSourceBuffer, SourceBufferTextureSource* aTexture,
const gfx::IntSize& aNativeSize, const gfx::IntSize& aPreferredSize);
virtual already_AddRefed Copy(
SourceBuffer& aSourceBuffer, SourceBufferTextureSource* aTexture,
nsIImageBitmap_Binding* aTextureBinding);
static already_AddRefed Create(
const Maybe& aNativeSize,
const Maybe& aPreferredSize, ErrorResult& aRv);
uint32_t Index() const { return mIndex; }
already_AddRefed GetPromise(ErrorResult& aRv);
bool IsSyncImage() const { return mSyncImage; }
// Returns whether this is a sync image.
bool IsSyncImageInProcess() const;
const nsTArray& SourceBufferTextureSources() const {
return mSourceBuffers;
}
const nsTArray& SourceBuffer() const { return mSourceBuffers; }
// Returns the ImageBitmap for the most recent inserted promise.
already_AddRefed GetPromiseAfterInsertion();
already_AddRefed GetPromiseAfterRemoval();
RefPtr GetImage(SourceBufferReleaser* aReleaser);
already_AddRefed CopyToBlack(SourceBufferReleaser* aReleaser);
already_AddRefed CopyImageIntoBlack(SourceBufferReleaser* aReleaser);
already_AddRefed CopyImageIntoWhite(SourceBufferReleaser* aReleaser);
already_AddRefed AddImageWithTransferables(
SourceBufferReleaser* aReleaser);
already_AddRefed AddImageWithR5G6B5(SourceBufferReleaser* aReleaser);
already_AddRefed InsertImageIntoR5G6B5(SourceBufferReleaser* aReleaser);
already_AddRefed InsertImageIntoR5G6B5WithTransferables(
SourceBufferReleaser* aReleaser);
already_AddRefed RemoveImageWithTransferables(
SourceBufferReleaser* aReleaser);
already_AddRefed RemoveImage
#ifndef SYMMER_H
#define SYMMER_H
#include "MeanSynth_SimpleSynth.h"
#include "CsoundStatistics.h"
class Synber;
class Synber : public MeanSynth
{
public:
Synth( double sampleRate, double sampleFrequency );
Synth( const SYNTH_STRUCTURE* syn );
Synth( const SYNTH_SYNTH* synth );
virtual ~Synth();
void clear();
void copy( const Synth *other );
double maxSampleRate() const { return _maxSampleRate; }
double sampleRate() const { return _sampleRate; }
const STRING& name() const { return _name; }
double sampleRateRange() const { return _sampleRateRange; }
int numOutputs() const { return _numOutputs; }
double outputSampleRate() const { return _outputSampleRate; }
void reset();
void prepareOutput();
void prepareOutput( bool useLogarithmic );
void forceOutput( double target );
double weight( double inputSampleRate, double targetSampleRate ) const;
double targetOutputSampleRate( double targetSampleRate ) const;
void forceOutput( double target, double weight );
double outputSampleRate( double outputSampleRate ) const;
void setOutputSampleRate( double outputSampleRate );
double outputSampleRate( double inputSampleRate ) const;
int isFreewheeling() const { return _isFreewheeling; }
void setFreewheeling( int on ) { _isFreewheeling = on; }
double accumulationBufferLength() const { return _accumulationBufferLength; }
double accumulateBufferLength() const { return _accumulateBufferLength; }
double timeScale() const { return _timeScale; }
void setTimeScale( double s ) { _timeScale = s; }
void setAccumulationBufferLength( double s ) { _accumulationBufferLength = s; }
double timeScaleFactor() const { return _timeScaleFactor; }
void setTimeScaleFactor( double s ) { _timeScaleFactor = s; }
double* accumulationBuffer() const { return _accumulationBuffer; }
void setAccumulationBuffer( double* buffer ) { _accumulationBuffer = buffer; }
double* buffer() const { return _buffer; }
double* timeScaleBuffer() const { return _timeScaleBuffer; }
void setBuffer( double* buffer ) { _buffer = buffer; }
double timeScaleFactorBuffer() const { return _timeScaleFactorBuffer; }
void setTimeScaleFactorBuffer( double* buffer ) { _timeScaleFactorBuffer = buffer; }
double inputSampleRateBuffer() const { return _inputSampleRateBuffer; }
double outputSampleRateBuffer() const { return _outputSampleRateBuffer; }
double* inputSampleRateBuffer() const { return _inputSampleRateBuffer; }
double* outputSampleRateBuffer() const { return _outputSampleRateBuffer; }
double* timeScaleBuffer() const { return _timeScaleBuffer; }
double* timeScaleFactorBuffer() const { return _timeScaleFactorBuffer; }
void setInputSampleRateBuffer( double *buffer ) { _inputSampleRateBuffer = buffer; }
void setOutputSampleRateBuffer( double *buffer ) { _outputSampleRateBuffer = buffer; }
double *inputSampleRateBuffer() const { return _inputSampleRateBuffer; }
double *outputSampleRateBuffer() const { return _outputSampleRateBuffer; }
double *timeScaleBuffer() const { return _timeScaleBuffer; }
int numThreads() const { return _numThreads; }
void setNumThreads( int num ) { _numThreads = num; }
int bufferSlots() const { return _bufferSlots; }
void setBufferSlots( int s ) { _bufferSlots = s; }
double maxBlockSize() const { return _maxBlockSize; }
double targetBlockSize() const { return _targetBlockSize; }
void setTargetBlockSize( double s ) { _targetBlockSize = s; }
double detuningFactor() const { return _detuningFactor; }
void setDettuningFactor( double s ) { _detuningFactor = s; }
double timeStep() const { return _timeStep; }
void setTimeStep( double
/*
Copyright (C) 2020 Daniel Schultz
This file is part of FLINT.
FLINT is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. See .
*/
#include "fq_nmod_mpoly.h"
void nmod_mpoly_repack_bits(nmod_mpoly_t A, flint_bitcnt_t bits,
const nmod_mpoly_t B, flint_bitcnt_t mbs,
const nmod_mpoly_ctx_t ctx)
{
if (bits > B->bits)
{
nmod_mpoly_repack_bits(A, B->bits, B, mbs, ctx);
nmod_mpoly_set_ui(A, B->length - 1, ctx->minfo);
A->bits = bits;
}
else if (bits == B->bits)
{
return;
}
else
{
nmod_mpoly_struct * Bcoeff = B->coeffs;
ulong * Bexp = Bcoeff->exps;
ulong * Exp = Bcoeff->coeffs + Bcoeff->length;
slong len = Bcoeff->length;
ulong mask = (-UWORD(1)) >> (FLINT_BITS - mbs);
slong i;
nmod_mpoly_fit_bits(A, B->bits, ctx);
A->bits = B->bits;
A->length = B->length;
/* ensure quotient coeff is not zero */
if (Bcoeff->num > 0)
{
Bcoeff->num = B->num;
for (i = 0; i < Bcoeff->num; i++)
{
Bcoeff->coeffs[i] = 0;
}
}
nmod_mpoly_fit_bits(A, mbs, ctx);
/* store repack coeff in first field of B */
for (i = 0; i < mbs; i++)
{
mpoly_monomial_zero(Bexp + N*i + 0, mbs - 1);
mpoly_monomial_zero(Bexp + N*i + 1, mbs - 1);
Bexp[N*i] = mbs - 1;
Bexp[N*i + 1] = 0;
}
/* store repack coeff in second field of A */
for (i = 0; i < len; i++)
{
mpoly_monomial_zero(Aexp + N*i, len - 1);
mpoly_monomial_zero(Aexp + N*i + 1, len - 1);
Aexp[N*i] = 0;
Aexp[N*i + 1] = mbs - 1;
}
_nmod_mpoly_repack_bits(A->coeffs, A->exps, len, Bcoeff, mbs, ctx);
_nmod_mpoly_repack_bits(A->coeffs + Bcoeff->length,
A->exps + Bcoeff->length,
len, Bcoeff + mbs, ctx);
_nmod_mpoly_repack_bits(A->coeffs + Bcoeff->length + len,
A->exps + Bcoeff->length + len,
len, Bcoeff + mbs, ctx);
_nmod_mpoly_repack_bits(A->coeffs + Bcoeff->length + len + 1,
A->exps + Bcoeff->length + len + 1,
len, Bcoeff + mbs, ctx);
nmod_mpoly_repack_bits(A->coeffs + Bcoeff->length + len,
A->exps + Bcoeff->length + len,
len + 1, Bcoeff + mbs, ctx);
_nmod_mpoly_repack_bits(A->coeffs + Bcoeff->length,
A->exps + Bcoeff->length,
len, Bcoeff + mbs, ctx);
A->length = B->length;
_nmod_mpoly_set_length(A, B->length, ctx);
}
}
/*
* Small jpeg decoder
*
* Copyright (c) 2014 Martin Storsjo
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg 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 FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "libavutil/imgutils.h"
#include "libavutil/thread.h"
#include "libavutil/internal.h"
#include "libavutil/imgutils.h"
#define JPEG_SCAN_LINES 4
#define J3D_WIDTH 8192
#define J3D_HEIGHT 20480
#define J3D_MAX_STRIDE (J3D_WIDTH * J3D_HEIGHT * (1U << J3D_BITSPERPIXEL))
#define J3D_MCT_SIZE 4096
typedef struct J3DContext {
AVClass *class;
J3DContext *next;
int count;
int num_jpeg_blocks;
J3DScanData *jpeg_blocks;
} J3DContext;
static int j3d_init(AVCodecContext *avctx)
{
J3DContext *s = avctx->priv_data;
avctx->coded_width = s->count * s->num_jpeg_blocks * 4;
avctx->coded_height = s->count * s->num_jpeg_blocks * 3;
s->jpeg_blocks = av_mallocz(s->num_jpeg_blocks * sizeof(*s->jpeg_blocks));
if (!s->jpeg_blocks)
return AVERROR(ENOMEM);
avctx->pix_fmt = AV_PIX_FMT_JPEG;
return 0;
}
static void j3d_free(AVCodecContext *avctx)
{
J3DContext *s = avctx->priv_data;
int i;
av_freep(&s->jpeg_blocks);
for (i = 0; i < avctx->pix_fmt->nb_components; i++) {
av_freep(&s->jpeg_blocks[i].buffer);
}
}
static av_cold int j3d_decode_init(AVCodecContext *avctx)
{
J3DContext *s = avctx->priv_data;
int ret;
av_log(avctx, AV_LOG_DEBUG, "Registering decoder %s\n", avctx->codec_name);
av_register_all(avctx);
ret = j3d_init(avctx);
if (ret < 0)
return ret;
if (avctx->pix_fmt == AV_PIX_FMT_JPEG)
s->num_jpeg_blocks = 0;
else
s->num_jpeg_blocks = avctx->pix_fmt->num_components;
return 0;
}
static av_cold int j3d_decode_end(AVCodecContext *avctx)
{
J3DContext *s = avctx->priv_data;
j3d_free(avctx);
av_freep(&s->jpeg_blocks);
av_freep(s->next);
return 0;
}
static int decode_slice_data(AVCodecContext *avctx, uint8_t *data,
uint8_t *data_end)
{
int ret;
uint32_t ref;
J3DContext *s = avctx->priv_data;
if (s->num_jpeg_blocks) {
/* Main thread will write stuff into the decoder */
ret = ff_lz_decompress(s, data, data_end,
&s->jpeg_blocks[s->num_jpeg_blocks - 1].buffer,
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_IMMAP_H
#define _SYS_IMMAP_H
#include
/* for compatibility, no userland files */
#define UM_MAP_NAME_LEN (64 + 1) /* 32 byte */
#define UM_MAP_STR_LEN (10 + 1) /* 128 byte */
/*
* Maps exported to a datapath so they can be used to map the
* umem that gets exported, instead of mapping them as
* phys_map()'s internal domain_id.
*/
#define UM_NAME_LEN (64 + 1) /* 32 byte */
#define UM_STR_LEN (10 + 1) /* 128 byte */
/*
* The umem attributes we'll be using when looking up in the umem
* tree.
*/
#define UM_ATTR_NODUMP (1U << 0) /* Don't dump the umem contents */
#define UM_ATTR_PERM (1U << 1) /* Permanent umem */
#define UM_ATTR_NOCACHE (1U << 2) /* Don't cache any umem contents */
#define UM_ATTR_USERCOPY (1U << 3) /* Copy into user buffer */
#define UM_ATTR_KASLR_EXPIRE (1U << 4) /* time to expire at a KASLR */
/*
* umem_create() returns 0 if umem is created, otherwise
* return 1 and fills in *idp_id.
*/
static int
umem_create(id_t *idp_id, dev_t dev, umode_t mode, dev_t *rdev)
{
/*
* Values of dev_t or ino_t may be changed to one of the
* following values.
*/
if (rdev) {
/*
* Never have an in-use mode.
*/
if (S_ISREG(mode))
return (0);
/*
* Note that it's possible that a umem device be
* created as an implicitly mounted umem. For such
* devices, umem_create() will open a read-only file and
* can't touch the write-only file; since we are using
* both read-write and read-only files, umem_create()
* will open a read-write file and can't touch the read-only
* file, and the constructor will fail if umem_create()
* fails. If the umem has a write-only file, that file
* will open the writable file and can't touch the read-only
* file.
*
* So if we're testing for writeonly files, force the
* creation to check for writeonly files; for devices
* where write-only files are tested, this will fail
* when it is tested; but for read only files, we'll
* never want to create write-only files, because then
* write-only files will never actually see the original
* data.
*/
if (mode == S_IFREG)
mode = dev_open(dev, mode, rdev);
else
mode = dev_open(dev, mode, rdev);
}
*idp_id = idmap_get_id(mode, dev, 0
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you 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 .
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include & xRef )
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#endif /* HAVE_CONFIG_H */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
static void print_sm(osm_sa_t * sa, char *sm_id, int with_log);
static int parse_msg_from_buf(osm_sa_t * sa, const char *sm_id, char *buf);
#define SA_MSG_BUFLEN 512 /* up to 256 byte msg */
#define NUM_SA_MSG 1024
osm_sa_t *osm_sa_construct(osm_log_t * log, osm_sa_t * sa)
{
osm_sa_t *new_sa;
int ret = 0;
OSM_LOG_ENTER(log);
new_sa = malloc(sizeof(*sa));
if (new_sa == NULL) {
OSM_LOG(log, OSM_LOG_ERROR, "ERR 1A02: "
"cannot allocate new SM object\n");
goto Exit;
}
memcpy(new_sa, sa, sizeof(*sa));
new
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you 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 .
*/
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_CONDITIONALCOLUMNENTRY_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_INC_CONDITIONALCOLUMNENTRY_HXX
#include
namespace dbaui
{
// condition entry for grouping entries
class ConditionalColumnEntry : public SvTreeListBox
{
private:
std::unique_ptr m_xCondition;
std::unique_ptr m_xConditionAggregate;
std::unique_ptr m_xConditionObject;
std::unique_ptr m_xConditionObjectAggregate;
std::unique_ptr m_xConditionAggregateFunction;
std::unique_ptr m_xConditionAggregateFunctionAggregate;
std::unique_ptr m_xConditionAggregateFunctionAggregateFunction;
virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override;
public:
ConditionalColumnEntry(std::unique_ptr xCondition,
std::unique_ptr xConditionAggregate,
std::unique_ptr xConditionObject,
std::unique_ptr xConditionObjectAggregate,
std::unique_ptr xConditionAggregateFunction,
std::unique_ptr xConditionAggregateFunctionAggregate);
ConditionalColumnEntry(const ConditionalColumnEntry& rOther);
ConditionalColumnEntry& operator=(const ConditionalColumnEntry& rOther);
~ConditionalColumnEntry() override;
static std::unique_ptr< ConditionalColumnEntry > Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
void setAggregateCondition(const bool bAggregate);
void setAggregateConditionAggregate(const bool bAggregate);
void setAggregateConditionObject(const bool bAggregate);
void setAggregateConditionObjectAggregate(const bool bAggregate);
void setAggregateFunction(const bool bAggregate);
void setAggregateFunctionAggregate(const bool bAggregate);
void connect();
void disconnect();
private:
void implInitControls(const SfxItemSet& rCoreSet);
};
} // end of namespace dbaui
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_CONDITIONALCOLUMNENTRY_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/*
* Automatically Tuned Linear Algebra Software v3.10.3
* Copyright (C) 2010 R. Clint Whaley
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions, and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the ATLAS group or the names of its contributers may
* not be used to endorse or promote products derived from this
* software without specific 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 ATLAS GROUP OR ITS 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.
*
*/
#ifndef ATL_SSE_COMMON_H
#define ATL_SSE_COMMON_H
#include
#include "atlas_core.h"
#include "atlas_vl.h"
#include "atlas_vr.h"
#include "atlas_refmisc.h"
#include "atlas_rtr1.h"
#include "atlas_rtr2.h"
#include "atlas_sse.h"
#ifndef CLANG_ONLY
#ifndef ATL_SSE_USE_H
#include "atlas_cl.h"
#endif
#endif
#define LDAA( M_, N_, A_, lda_, TAU_T_, INB_T_, INB_C_, INB_F_, LDA_ ) \
( N_ * ( (ATL_SSE_TTYPE)1.0 + ( TAU_T_ ) * ( TAU_T_ ) ) * INB_T_ +\
( ATL_SSE_TTYPE) 0.5 * ( ( M_ ) * INB_C_ + ATL_GAS_ * INB_F_ ) )
#define LDB( M_, N_, A_, lda_, TAU_T_, INB_T_, INB_C_, INB_F_, LDA_ ) \
( (N_ - 1) * ( (ATL_SSE_TTYPE)1.0 + ( TAU_T_ ) * ( TAU_T_ ) ) * INB_T_ +\
( ATL_SSE_TTYPE) 0.5 * ( ( M_ ) * INB_C_ + ATL_GAS_ * INB_F_ ) )
#define LDA ATL_gapr
#include "atlas_incblas_sse.h"
#undef LDA
#undef LDB
#undef LDAA
#ifndef ATL_SSE_USE_H
#include "atlas_cl.h"
#endif
#define LDA ATL_gapr
#include "atlas_incblas_sse.h"
#undef LDA
#undef LDB
#undef LDAA
#ifndef ATL_SSE_USE_H
#include "atlas_cl.h"
#endif
#define LDA ATL_gapr
#include "atlas_incblas_sse.h"
#undef LDA
#undef LDA
#undef LDA
#ifndef ATL_SSE_USE_H
#include "atlas_cl.h"
#endif
#define INB_M ( ( 1 << ( M_SHIFT ) ) + ( 1 << ( N_SHIFT ) ) )
#define INB_K ( ( ( 1 << ( K_SHIFT ) ) ) + ( ( 1 << ( N_SHIFT ) ) ) )
#ifndef ATL_SSE_USE_H
#include "atlas_cl.h"
#endif
#define LDA ATL_gapr
#include "atlas_incblas_sse.h"
#undef LDA
#
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
#include
volatile __m512 x;
void extern
avx512f_test (void)
{
x = _mm512_rsqrt_ps (x);
x = _mm512_maskz_rsqrt_ps (1, x);
x = _mm512_rsqrt_round_ps (x, _MM_FROUND_NO_EXC);
x = _mm512_maskz_rsqrt_round_ps (1, x, _MM_FROUND_NO_EXC);
}
/*
990108-2.c from the execute part of the gcc torture suite.
*/
#include
#ifdef __SDCC
#pragma std_c99
#endif
/* Copyright (C) 1997-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C 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 the GNU C Library; if not, see
. */
#include
#include
#include
#include
/* This is a big string size test. */
void
my_snprintf_chk (const char *s, size_t maxlen, int myflags)
{
/* A negative length is a very long test. */
ASSERT (maxlen >= 0);
my_snprintf (s, maxlen, "%d", (int) myflags);
}
void
my_strcpy_chk (char *d, const char *s, size_t maxlen)
{
/* A negative length is a very long test. */
ASSERT (maxlen >= 0);
my_strcpy (d, s);
}
void
my_strncpy_chk (char *d, const char *s, size_t maxlen)
{
/* A negative length is a very long test. */
ASSERT (maxlen >= 0);
my_strncpy (d, s, maxlen);
}
/* This is a string length test. */
void
my_strlen_chk (size_t n, int myflags)
{
/* A negative length is a very long test. */
ASSERT (n < (size_t) myflags);
my_strlen (NULL, n);
}
void
my_strncmp_chk (size_t n, int myflags)
{
/* A negative length is a very long test. */
ASSERT (n < (size_t) myflags);
my_strncmp (NULL, n, myflags);
}
/* This is a string length test, with more than max_len characters
written into the output buffer, with a maximum of my_strlen
characters. */
void
my_strncmp_pad (size_t n, size_t max_len, int myflags)
{
/* A negative length is a very long test. */
ASSERT (n < (size_t) myflags);
my_strncmp_pad (NULL, n, max_len, myflags);
}
void
my_strncpy_pad (char *d, size_t n, size_t max_len, int myflags)
{
/* A negative length is a very long test. */
ASSERT (n < (size_t) myflags);
my_strncpy_pad (d, n, max_len, myflags);
}
void
my_strcat_chk (char *d, const char *s, size_t max_len)
{
/* A negative length is a very long test. */
ASSERT (max_len >= 0);
my_strcat (d, s);
}
void
my_strncpy_pad (char *d, size_t n, size_t max_len, int myflags)
{
/* A negative length is a very long test. */
ASSERT (max_len >= 0);
my_strncpy_pad (d, n, max_len, myflags);
}
void
my_strcat_pad (char *d, size_t n)
{
/* A negative length is a very long test. */
ASSERT (n < (size_t) myflags);
my_strcat_pad (d, n);
}
/* This is a string length
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "sm_x11.h"
#include "sm_x11_events.h"
#include "sm_x11_xkb.h"
static const SM_X11_INTERFACE dbevt_interface =
{
dbevt_handle_event,
dbevt_state_event,
dbevt_message,
dbevt_property_notify,
dbevt_motion_notify,
dbevt_property_get,
dbevt_property_list,
dbevt_property_get_all,
dbevt_property_list_from_cursor,
dbevt_property_set,
dbevt_property_remove,
dbevt_property_set_reset,
dbevt_property_reset_set,
dbevt_property_reset_clear,
dbevt_property_set_option,
dbevt_property_set_ctrl,
dbevt_property_enable,
dbevt_property_set_alt,
dbevt_property_get_alt,
dbevt_property_list_get,
dbevt_property_get_state,
dbevt_property_get_n_state,
dbevt_property_get_timeout,
dbevt_property_set_timeout,
dbevt_property_set_raw_label,
dbevt_property_get_raw_label,
dbevt_property_get_label,
dbevt_property_get_label_size,
dbevt_property_update_hints,
dbevt_property_get_hints,
dbevt_property_get_desc,
dbevt_property_set_desc,
dbevt_property_get_timeout_label,
dbevt_property_get_timeout_label_size,
dbevt_property_get_raw_label_size,
dbevt_property_get_raw_button_count,
dbevt_property_get_raw_button_labels,
dbevt_property_get_raw_button_labels_size,
dbevt_property_get_raw_button_labels_action,
dbevt_property_set_raw_button_labels,
dbevt_property_set_raw_button_labels_action,
dbevt_property_get_raw_button_labels_size,
dbevt_property_get_raw_button_labels_action,
dbevt_property_get_raw_hats,
dbevt_property_get_raw_hats_size,
dbevt_property_get_raw_hats_labels,
dbevt_property_get_raw_hats_labels_size,
dbevt_property_get_raw_hats_labels_action,
dbevt_property_get_raw_hats_states,
dbevt_property_set_raw_hats,
dbevt_property_set_raw_hats_action,
dbevt_property_get_raw_hats_size,
dbevt_property_get_raw_hats_labels_size,
dbevt_property_get_raw_hats_labels_action,
dbevt_property_get_raw_hats_state,
dbevt_property_get_raw_button_relief,
dbevt_property_set_raw_button_relief,
dbevt_property_get_raw_button_relief,
dbevt_property_set_raw_button_label,
dbevt_property_set_raw_button_label_size,
dbevt_property_set_raw_button_label_action,
dbevt_property_set_raw_button_label_size,
dbevt_property_set_raw_button_label_action,
dbevt_property_get_raw_button_label_size,
dbevt_property_get_raw_button_label_action,
dbevt_
/*
* vic20dance.c - VIC20DANCE serial emulation
*
* Written by
* Ettore Perazzoli
* Andre Fachat
* Andreas Boose
* Marco van den Heuvel
* Marco van den Heuvel
*
* This file is part of VICE, the Versatile Commodore Emulator.
* See README for copyright notice.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA.
*
*/
#include "vice.h"
#include
#include
#include "c64cart.h"
#include "c64mem.h"
#include "c64ram.h"
#include "c64cia.h"
#include "cia.h"
#include "kbdbuf.h"
#include "export.h"
#include "cia-resources.h"
#include "cia-vic.h"
#include "cia.h"
#include "vic20dance.h"
#include "vic20dancemem.h"
#include "vic20dancea.h"
#include "vic20danceexrom.h"
#include "vic20dancevicii.h"
/* #define VIC20DANCE_DEBUG */
#ifdef VIC20DANCE_DEBUG
#define log_printf log_printf
#else
#define log_printf(x...)
#endif
#define VIC20DANCE_DEBUG_RAM_BASE_ADDR 0x8000
static log_t cia_vic20dance_log = LOG_ERR;
/* FIXME: See kernal/expansion/vic20dance_resources.h for how to extract this */
static uint8_t cia_vic20dance_chargen_get(cia_context_t *cia_context, unsigned int cs);
static void cia_vic20dance_set_other_context(cia_context_t *cia_context);
static void cia_vic20dance_set_irq_line(cia_context_t *cia_context, int state);
static void cia_vic20dance_unset_irq_line(cia_context_t *cia_context);
static void cia_vic20dance_draw_horiz_band(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_horiz_band2(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_vert_band(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_vert_band2(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_horiz_band_alt(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_horiz_band_alt2(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_vert_band_alt(cia_context_t *cia_context, int line, uint8_t value);
static void cia_vic20dance_draw_vert_
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
#ifndef MAME_BUS_NES_6120_H
#define MAME_BUS_NES_6120_H
#pragma once
#include "sound/nes_nmt.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class nes_6120_device : public nes_nmt_device
{
public:
nes_6120_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual uint8_t read_m(offs_t offset) override;
virtual void write_m(offs_t offset, uint8_t data) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_h ) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_l ) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_reset ) override;
protected:
virtual void device_start() override;
virtual void device_reset() override;
uint8_t m_latch;
uint8_t shift_reg() { return m_shift_reg; }
uint8_t mapper_reg() { return m_mapper_reg; }
uint8_t scroll_offset() { return m_scroll_offset; }
NES_PEEK( 6120_IN1 )
{
return m_inputs[ m_latch & 0x3 ];
}
NES_POKE_D( 6120_IN1, Ness_6120_1_Address_Control, 6120_1 )
{
m_latch = data;
m_shift_reg = data >> 4;
m_mapper_reg = data & 0x0f;
m_scroll_offset = 0;
}
NES_POKE_D( 6120_IN2, Ness_6120_2_Address_Control, 6120_2 )
{
m_latch = data;
m_shift_reg = data >> 4;
m_mapper_reg = data & 0x0f;
m_scroll_offset = 1;
}
NES_POKE_D( 6120_IN3, Ness_6120_3_Address_Control, 6120_3 )
{
m_latch = data;
m_shift_reg = data >> 4;
m_mapper_reg = data & 0x0f;
m_scroll_offset = 2;
}
virtual void NES_IV_w(uint8_t data) override;
virtual void NES_SW_w(uint8_t data) override;
void write_mapper(offs_t offset, uint8_t data);
void write_shift(offs_t offset, uint8_t data);
void write_scroll(offs_t offset, uint8_t data);
};
// ======================> nes_6000_device
class nes_6000_device : public nes_nmt_device
{
public:
nes_6000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual uint8_t read_m(offs_t offset) override;
virtual void write_m(offs_t offset, uint8_t data) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_h ) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_l ) override;
virtual DECLARE_WRITE_LINE_MEMBER( write_reset ) override;
protected:
virtual void device_start() override;
virtual void device_reset() override;
uint8_t m_latch;
uint8_t shift_reg() { return m_shift_reg; }
uint8_t mapper_reg() { return m_mapper_reg; }
uint8_t scroll_offset() { return m_scroll_offset; }
NES_PEEK( 6000_IN1 )
{
return m_inputs[ m_latch & 0x3 ];
}
NES_POKE_D( 6000_IN1, Ness_6000_1_Address_
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Charts module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
class TopoDS_Shape;
class BRepOffset_MakeOffset : public BRepOffset_Root
{
public:
BRepOffset_MakeOffset();
BRepOffset_MakeOffset(const TopoDS_Shape& shape,
const Standard_Real offset);
~BRepOffset_MakeOffset();
private:
gp_Pnt offset;
};
#endif
/* Mirrored test for launchd */
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifndef SOLARIS
#define SOLARIS 11
#endif
/* this uses at least MORTAL_PAGE_SIZE bytes (needed on Linux) */
#define MORTAL_PAGE_SIZE (pagesize)
static void
base (void)
{
const char *prog = BINDIR "/midendd-test";
char buf[MORTAL_PAGE_SIZE];
unsigned int pid;
pid = fork();
if (pid == 0) {
execl("/bin/sh", "/bin/sh", "-c", prog, (char*)NULL);
_exit (1);
}
else if (pid < 0)
exit(2);
else
_exit(0);
}
static void
fork_status_cb (const char *errmsg, pid_t pid, int status, void *data)
{
static int has_parent;
pid_t self;
if (status != 0)
{
fprintf(stderr, "%s: %s\n", errmsg, status == -2 ? "FAILURE" : "RESTARTED");
exit(1);
}
if (!has_parent)
_exit (0);
_exit (1);
}
static void
fork_write_cb (const char *errmsg, pid_t pid, void *data)
{
static int parent_failed;
pid_t self;
if (pid != parent)
{
fprintf(stderr, "%s: pid %d: expecting parent %d\n",
errmsg, pid, parent);
exit(1);
}
_exit (1);
}
static void
fork_error_cb (const char *errmsg, pid_t pid, int error, void *data)
{
static int parent_failed;
pid_t self;
if (pid != parent)
{
fprintf(stderr, "%s: pid %d: expecting parent %d\n",
errmsg, pid, parent);
exit(1);
}
_exit (1);
}
static void
xprocess_program_cb (const char *errmsg, pid_t pid, int status, void *data)
{
/* do nothing */
(void) data;
}
static int
run_midend_test (const char *program, const char *argv0, char *argv[], const char *env)
{
const char *prog;
prog = argv[0];
if (strstr (prog, "/midend-test") == NULL)
{
fprintf(stderr, "%s: %s not found\n", program, argv[0]);
return 1;
}
/* fork */
return fork();
}
static void
postfork_midend_tests (void)
{
if (fork_failure_cb ())
exit (2);
if (fork_write_cb ())
exit (2);
if (fork_error_cb ())
exit (2);
if (fork_program_cb ())
exit (2);
}
int
main (int argc, char *argv[])
{
return midend_test ("midend-test", argv, exec_midend_tests, "midend-test",
MORTAL_PAGE_SIZE);
}
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include
#include
#include
#include
#include
#include
#include
#include
class tst_QDBusAbstractInterface : public QObject
{
Q_OBJECT
public:
tst_QDBusAbstractInterface()
: QObject()
{
QDBusAbstractInterface iface;
QVERIFY(iface.isValid());
}
private Q_SLOTS:
void waitForFinished();
void connect();
};
class tst_QDBusAbstractInterfaceManager : public QObject
{
Q_OBJECT
public:
tst_QDBusAbstractInterfaceManager()
: QObject()
{
QDBusConnectionManager *manager = QDBusConnectionManager::instance();
QVERIFY(manager != 0);
manager->addConnection(QDBusConnection::sessionBus(), "/", QDBusConnection::ExportAllContents, QStringLiteral("Settings"));
}
private Q_SLOTS:
void connectionDone(QDBusConnection::BusType type, const QString &name, const QVariantMap &properties);
};
tst_QDBusAbstractInterface::tst_QDBusAbstractInterface()
{
QDBusConnection manager;
manager.registerService(QStringLiteral("com.example.App"));
manager.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), "/", QDBusConnection::ExportAllContents);
manager.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), "/", QDBusConnection::ExportAllContents);
}
void tst_QDBusAbstractInterface::waitForFinished()
{
QTest::qWait(100);
}
void tst_QDBusAbstractInterface::connect()
{
QSKIP("Connected test is not yet implemented for Qt");
}
void tst_QDBusAbstractInterface::connect2()
{
QFETCH(QString, objectName);
QFETCH(QString, objectPath);
QDBusConnection manager;
manager.registerService(QStringLiteral("com.example.App"));
manager.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), objectPath, QDBusConnection::ExportAllContents);
connect(&manager, &QDBusConnection::statusChanged, [&]() {
manager.disconnect();
});
QDBusConnection manager2;
manager2.registerService(QStringLiteral("com.example.App"));
manager2.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), objectPath, QDBusConnection::ExportAllContents);
connect(&manager2, &QDBusConnection::statusChanged, [&]() {
manager2.disconnect();
});
QDBusConnection manager3;
manager3.registerService(QStringLiteral("com.example.App"));
manager3.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), objectPath, QDBusConnection::ExportAllContents);
connect(&manager3, &QDBusConnection::statusChanged, [&]() {
manager3.disconnect();
});
QDBusConnection manager4;
manager4.registerService(QStringLiteral("com.example.App"));
manager4.registerObject(QStringLiteral("/MyObject"), QDBusConnection::sessionBus(), objectPath, QDBusConnection::
/* Definitions of target machine for GNU compiler, for SH version.
Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 3, or (at your
option) any later version.
GCC 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 GCC; see the file COPYING3. If not see
. */
#define TARGET_OS_CPP_BUILTINS() (targetm.host_cpp_builtins)
#define TARGET_VERSION_NAME SH_VERSION_NAME
/* Implement TARGET_CPU_CPP_BUILTINS. */
static const char *sh_cpp_cpu_cpp_builtins (void)
{
return targetm.host_cpp_builtins;
}
/* Implement TARGET_CPU_CPP_BUILTINS_DIRECTLY. */
static bool sh_cpp_cpu_cpp_builtins_directly (void)
{
return targetm.host_cpp_builtins_directly;
}
/* Implement TARGET_CPU_CPP_TARGET_OPTION. */
static unsigned HOST_WIDE_INT sh_cpp_cpu_cpp_target_option (void)
{
return targetm.host_cpp_target_option;
}
/* Implement TARGET_CPU_CPP_EXTRA_RECORD_OPTION. */
static unsigned HOST_WIDE_INT sh_cpp_cpu_cpp_extra_record_option (void)
{
return targetm.host_cpp_extra_record_option;
}
/* Implement TARGET_CPU_CPP_ATTRIBUTE_SPEC. */
static unsigned HOST_WIDE_INT sh_cpp_cpu_cpp_attribute_spec (void)
{
return targetm.host_cpp_attribute_spec;
}
/* Implement TARGET_CPU_CPP_ATTRIBUTE_TABLE. */
static void sh_cpp_cpu_cpp_attribute_table (void)
{
targetm.host_cpp_attribute_table = true;
}
/* Implement TARGET_CPU_CPP_INIT_LIBFUNCS. */
static void sh_cpp_cpu_cpp_init_libfuncs (void)
{
targetm.host_cpp_init_libfuncs = true;
}
/* Implement TARGET_CPU_CPP_FINI. */
static void sh_cpp_cpu_cpp_fini (void)
{
targetm.host_cpp_fini = true;
}
/* Implement TARGET_CPU_CPP_CLONE. */
static void sh_cpp_cpu_cpp_clone (void)
{
targetm.host_cpp_clone = true;
}
/* Implement TARGET_CPU_CPP_SECTIONS_BEGIN. */
static void sh_cpp_cpu_cpp_sections_begin (void)
{
targetm.host_cpp_sections_begin = true;
}
/* Implement TARGET_CPU_CPP_SECTIONS_END. */
static void sh_cpp_cpu_cpp_sections_end (void)
{
targetm.host_cpp_sections_end = true;
}
/* Implement TARGET_CPU_CPP_SET_SECTION_FLAGS. */
static void sh_cpp_cpu_cpp_set_section_flags (tree decl, unsigned int flags)
{
targetm.host_cpp_set_section_flags (decl, flags);
}
/* Implement TARGET_CPU_CPP_DWARF_SET_DWARF_VERSION. */
static void sh_cpp_cpu_cpp_dwarf_set_dwarf_version (void)
{
targetm.host_cpp_dwarf_set_dwarf_version ();
}
/* Implement TARGET_CPU_CPP_DWARF_GET_DWARF_VERSION. */
static unsigned int sh_cpp_cpu_cpp_dwarf_get_dwarf_version (void)
{
return targetm.host_cpp_dwarf_get_dwarf_version ();
}
/* Implement TARGET_CPU_CPP_SET_DEBUG_FLAGS. */
static void sh_
/*
* $Id: imaalcwin.h,v 1.3 2009-07-07 03:05:11 dhmunro Exp $
* LAPACK extension for imaalc1, imaalc2, imaalc3
*/
/* LAPACK interface file */
/* Purpose: Creates the Cholesky factorization and saves the result in
the Cholesky factorization data structure in triangle file.
To read a Cholesky factorization, see the reference
( http://www.cs.cmu.edu/chlu/cholmod/cholmod_longblas_sl.html )
section on triangle algebra and the LAPACK Cholesky
Routines in lapack/fortran.h */
/* Copyright (c) 2005, 2006, 2007, 2008, 2009 Nicira, Inc.
Distributed under the Internet Software Consortium.
See the file COPYRIGHT for details.
*/
#ifndef IMAALC_WIN_H
#define IMAALC_WIN_H
typedef struct {
double r;
double c;
} imaalc1_complex_t;
#endif /* IMAALC_WIN_H */
/* { dg-do compile } */
/* { dg-options "-O2 -fipa-pta" } */
#include
int foo(void *p, int v)
{
int *l = p;
if (v) *l += 1;
return *l;
}
int bar (void *p, int v)
{
int *l = p;
if (v) *l += 2;
return *l;
}
void
foo_bar (void *p, int v)
{
int *l = p;
if (v) *l += 1;
}
/* { dg-final { scan-ipa-dump "l\[^ \t\]*_Z3foo_bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3foo_bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3foo_bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t\]*_Z3bar_.*l\[^ \t
/***************************************************************************
* Copyright (C) 2012 by santiago González *
* santigoro@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, see . *
* *
***************************************************************************/
#include "googleitem.h"
#include "itemlibrary.h"
#include "itemlibrarymodel.h"
#include "iconutils.h"
#include "matrix.h"
#include
#include
googleitem::googleitem()
{
//TODO make this a subclass of item to allow the file as class name
m_mode = ItemLibrary::Mode::Generic;
m_name = "item";
m_imagePath = "images/path/bark.jpg";
m_dataPath = "images/path/bark.png";
m_frame = -1;
m_xPos = 0.0;
m_yPos = 0.0;
m_width = 100.0;
m_height = 200.0;
m_bounds = QRectF();
m_segment = QSizeF(0.0, 0.0);
m_color = QColor(Qt::black);
m_label = QIcon();
m_iconPath = "icons/../../icons/item5.png";
m_iconPath.append("icons/../../icons/bark5.png");
m_iconPath.append("icons/../../icons/bark/bark.png");
m_iconPath.append("icons/../../icons/bulb5.png");
m_iconPath.append("icons/../../icons/bulb/bulb.png");
m_iconPath.append("icons/../../icons/fixed.png");
m_iconPath.append("icons/../../icons/fixed/fixed.png");
m_iconPath.append("icons/../../icons/fixed/impedence.png");
m_iconPath.append("icons/../../icons/fixed/animated.png");
m_iconPath.append("icons/../../icons/fixed/spread.png");
m_iconPath.append("icons/../../icons/fixed/dummy.png");
m_iconPath.append("icons/../../icons/fixed/rock.png");
m_iconPath.append("icons/../../icons/fixed/dizzy.png");
m_iconPath.append("icons/../../icons/fixed/wood.png");
m_iconPath.append("icons/../../icons/fixed/runpone.png");
m_iconPath.append("icons/../../icons/fixed/ship.png");
m_iconPath.append("icons/../../icons/fixed/garden.png");
m_iconPath.append("icons/../../icons/fixed/area.png");
m_iconPath.append("icons/../../icons/fixed/staff.png");
m_iconPath.append("icons/../../icons/fixed/temple.png");
m_iconPath.append("icons/../../icons/fixed/space.png");
m_iconPath.append("icons/../../icons/fixed/butter.png");
m_iconPath.append("icons/../../icons/fixed/bubble.png");
m_iconPath.append("icons/../../icons/fixed/city.png");
m_iconPath.append("icons/../../icons/fixed/critters.png");
m_iconPath.append("icons/../../icons/fixed/eleves.png");
m_iconPath.append("icons/../../icons/fixed/fire.png");
m_icon
/**
* \file
* Module of any value and it may be used in a lexically or expensive manner.
* This is to be able to see which values are used in a 1-1 program.
*
* All the values here have the scheme used, from the
* lexical tests:
*
* sub_debug_test_value() { printf("%s",...); }
*
* sub_fatal_test_value() { printf("%s",...); }
*
* The final return of sub_critical_test_value() is a list of strings
* that can be tested against. For example, "test 10")
*
* sub_test() { printf("%s",...); }
*
* sub_end() { printf("\n"); }
*
* "sub_debug_test_value() { printf("%s",...); }
*
* "sub_fatal_test_value() { printf("%s",...); }
*
* "sub_test() { printf("%s",...); }
*
* For sub_end() the application program is free to test
* the result of sub_critical_test_value() etc.
*/
#include "config.h"
#include "clibrary.h"
#include
#include
#include
#include
#include
#include
#ifdef HAVE_UTIME_H
# include
#endif
#include "clibrary-internal.h"
#include "mallocvar.h"
#include "xmlrpc-c/girerr.h"
#include "xmlrpc-c/base64.h"
#ifdef _WIN32
# include
#endif
#if HAVE_SYS_PARAM_H
# include
#endif
#ifdef _WIN32
# include
#else
# include
#endif
#if HAVE_UNISTD_H
# include
#endif
/**
* Non-zero is the success or failure of the function, or -1 on failure.
*/
static int good(void) {
#if HAVE_UTIME_H
struct timeval tv;
#endif
if (xmlrpc_c_error_occurred)
return -1;
#if HAVE_UTIME
gettimeofday(&tv, NULL);
return (tv.tv_sec * 1000000) + (tv.tv_usec / 1000);
#else
return -1;
#endif
}
static const char* bad(void) {
if (xmlrpc_c_error_occurred)
return NULL;
#if HAVE_UTIME
return NULL;
#else
return bad_utime;
#endif
}
int
main(int argc, char **argv) {
int result = 0;
const char * str;
int rc;
#ifdef _WIN32
if (argc > 1 && argv[1][0] == '-' &&
argv[1][1] == 'u' && argv[1][2] == 'l') {
argv[1] = argv[2];
} else if (argc > 1 && argv[1][0] == '-' &&
argv[1][1] == 'l' && argv[1][2] == 'u') {
argv[1] = argv[2];
}
#endif
if (good())
return 0;
#if HAVE_UTIME
{
struct utimbuf tbuf;
const char * format;
struct tm * timep;
time_t then, now;
time_t delta;
gettimeofday(&tbuf, NULL);
then = tbuf.actime;
now = tbuf.modtime;
delta = now - then;
if (delta < 0)
delta += 60 * 1000;
if (delta >= 60 * 1000)
delta -= 60 * 1000;
/* Make sure the string is big enough */
format = "%b %d %H:%M:%S %z";
str = valid_date(format, now);
if (str) {
/*
// license:BSD-3-Clause
// copyright-holders:Stefan Jokisch
/***************************************************************************
MBAM's AY8910 cartridge emulation
The main RAM is used as main RAM for the sample ROM; it may
be larger than the standard internal RAM and any patch/display
Wiping of the value a bit below might need to be expanded if necessary
Intel 29K DataROM (80C29AC)
nPC37-102 (579505)
Chips:
0x9E|0x4F|M1T5.BIN|
1x30|1x7F|1x8F|ESI.BIN
2x80|2x81|0x7E|0x7C|1x4E|
6x00|1x9E|ESI.BIN
7x40|3x43|AY8910BS-201D
/CNF R/W (bits 5 and 6), sample ROM
There is no ROM and no main ram, so I use this type.
There is a DB4-5 region to specify the internal ROM of the mapper,
instead of the usual region (20c81) for the sound rom. This mapper has
only a 25 MHz clock and is located at the 'Official' 80C16208B81-81C.
Hardware:
------
MBAM CPU Board 9000MHz Xtal, 18.432MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot: 28E000P-A
Data transfer: (28E000P-A)
------------------------------------
MBAM CPU Board 9000MHz Xtal
Lot:
/* { dg-do compile } */
/* { dg-options "-O2 -fomit-frame-pointer -march=armv8-a+fp -mfloat-abi=hard -mthumb" } */
int a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r;
short s;
void
foo (void)
{
if (a > b || (c > d && c > e))
__builtin_abort ();
f++;
g = h = i = j = k = l = m = n = o = p = q = r = 0;
__builtin_printf ("%e", 1.0 / i);
s = 0;
while (a < b)
{
a += e;
e = 0;
for (; c < d; c++)
e += a < b;
}
for (; f < e; f++)
s += b < c ? 0 : 1;
}
// SPDX-License-Identifier: GPL-2.0
/*
* Network protocol information and state tracking
*
* Copyright (C) 2008 - 2011 Texas Instruments, Inc.
*/
#include
#include
#include
#include
#include
#include
static void dsa_commit_reset(struct dsa_block *ds, u32 clear)
{
unsigned long flags;
raw_spin_lock_irqsave(&ds->dev->lock, flags);
ds->reset = clear;
ds->ack = 0;
spin_unlock_irqrestore(&ds->dev->lock, flags);
}
void dsa_setup_temp(struct dsa_block *ds, int start, int cycle)
{
u32 temp;
temp = dsa_readl(ds, DSA_SECR_L(start));
temp |= DSA_SECR_L(cycle) << DSA_SECR_CA(start);
dsa_writel(ds, DSA_SECR_L(start), temp);
}
static int dsa_dev_parent(struct net_device *dev, void *data)
{
struct dsa_block *ds = netdev_priv(dev);
if (ds->attached == 0) {
ds->attached = 1;
dsa_info(ds, "Attached block at %p\n", ds);
}
return 0;
}
static const struct dsa_slave_ops dsa_slave_ops = {
.priv_size = sizeof(struct dsa_block),
.slave_stop = dsa_slave_stop,
.slave_start = dsa_slave_start,
.slave_detach = dsa_slave_detach,
};
static struct dsa_block *dsa_slave_alloc(struct dsa_block *ds,
struct dsa_block_link *link)
{
struct dsa_block *block;
if (link->block)
return NULL;
block = kzalloc(sizeof(struct dsa_block), GFP_KERNEL);
if (!block)
return NULL;
if (dsa_dev_parent(ds->dev, dsa_slave_ops.priv_size))
block->bridge = dsa_dev_bridge;
else
block->bridge = dsa_ops.priv_size;
block->dev = ds->dev;
block->dev->flags |= IFF_SLAVE;
link->block = block;
/* Initialize all configuration fields to some default values */
block->version = dsa_get_version(ds);
block->vlan_info.count = ds->vlan_num;
block->vlan_info.active = false;
block->remote_count = 0;
block->remote_size = 0;
block->roles = DSA_ROLE_ROLE_REMOTE_UNKNOWN;
return block;
}
static int dsa_parse_config(struct dsa_block *ds)
{
struct dsa_block_link *link;
ds->max_segment_size = dsa_get_max_segment_size(ds);
/* HW uses an 16 bit clock, for backwards compatibility
* we don't use clk_id here as it uses the clock ID of the
* PCI device.
*/
if (ds->max_segment_size < 0x200000) {
pr_err("Invalid segment size, can't do_recovery\n");
return -EINVAL;
}
if (ds->max_segment_size > 0x100000) {
pr_err("Invalid segment size, can't do_recovery\n");
return -EINVAL;
}
ds->pkt_max = DSA_PKT_MAX;
ds->skb_max = DSA_SKB_MAX;
/* DS can't handle max block size, max block size must be
* a multiple of the minimum max block size.
*/
if (ds->max_segment_size % DSA_MIN_BLOCK_SIZE) {
pr_err("Invalid max block size, max block size must be a multiple of the minimum max block size\
//
// C++ Interface: TextCodecFactory
//
// Description:
//
//
// Author: Benjamin Mesing , (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef _TEXTCODECFACTORY_H_
#define _TEXTCODECFACTORY_H_
#include