hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
588 values
lang
stringclasses
305 values
max_stars_repo_path
stringlengths
3
363
max_stars_repo_name
stringlengths
5
118
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringdate
2015-01-01 00:00:35
2022-03-31 23:43:49
max_stars_repo_stars_event_max_datetime
stringdate
2015-01-01 12:37:38
2022-03-31 23:59:52
max_issues_repo_path
stringlengths
3
363
max_issues_repo_name
stringlengths
5
118
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
float64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
363
max_forks_repo_name
stringlengths
5
135
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringdate
2015-01-01 00:01:02
2022-03-31 23:27:27
max_forks_repo_forks_event_max_datetime
stringdate
2015-01-03 08:55:07
2022-03-31 23:59:24
content
stringlengths
5
1.05M
avg_line_length
float64
1.13
1.04M
max_line_length
int64
1
1.05M
alphanum_fraction
float64
0
1
c848eec60b3cad01c662498f46909f3c7d99e0f2
226
h
C
cudaMain.h
Alonso94/Gaussian-process-GPU
33ae7ad4b9d61ddfb9b29c71a26e098f74d1ac53
[ "MIT" ]
null
null
null
cudaMain.h
Alonso94/Gaussian-process-GPU
33ae7ad4b9d61ddfb9b29c71a26e098f74d1ac53
[ "MIT" ]
null
null
null
cudaMain.h
Alonso94/Gaussian-process-GPU
33ae7ad4b9d61ddfb9b29c71a26e098f74d1ac53
[ "MIT" ]
null
null
null
// // Created by Palash on 19-02-2018. // #ifndef CUDA_TEST_CLION_CUDAMAIN_H #define CUDA_TEST_CLION_CUDAMAIN_H #include <iostream> #include <cstdio> int cudaMain(int argc, char **argv); #endif //CUDA_TEST_CLION_CUDAMAIN_H
17.384615
36
0.769912
c8be3789fe082e0e19a9aafbd5f6cd01b62c5c38
4,812
c
C
openwrt/package/utils/swupdate/src/handlers/remote_handler.c
yodaos-project/yodaos
d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954
[ "Apache-2.0" ]
1,144
2018-12-18T09:46:47.000Z
2022-03-07T14:51:46.000Z
openwrt/package/utils/swupdate/src/handlers/remote_handler.c
Rokid/YodaOS
d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954
[ "Apache-2.0" ]
16
2019-01-28T06:08:40.000Z
2019-12-04T10:26:41.000Z
openwrt/package/utils/swupdate/src/handlers/remote_handler.c
Rokid/YodaOS
d0d7bbc277c0fc1c64e2e0a1c82fe6e63f6eb954
[ "Apache-2.0" ]
129
2018-12-18T09:46:50.000Z
2022-03-30T07:30:13.000Z
/* * (C) Copyright 2016 * Stefano Babic, DENX Software Engineering, sbabic@denx.de. * * 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 <sys/types.h> #include <stdio.h> #include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <zmq.h> #include <swupdate.h> #include <handler.h> #include <util.h> #define MSG_FRAMES 2 #define FRAME_CMD 0 #define FRAME_BODY 1 #define REMOTE_IPC_TIMEOUT 2000 static int timeout = REMOTE_IPC_TIMEOUT; struct RHmsg { zmq_msg_t frame[MSG_FRAMES]; }; struct remote_command { char *cmd; }; void remote_handler(void); static void RHset_command(struct RHmsg *self, const char *key) { zmq_msg_t *msg = &self->frame[FRAME_CMD]; zmq_msg_init_size (msg, strlen(key)); memcpy (zmq_msg_data (msg), key, strlen(key)); } static void RHset_payload(struct RHmsg *self, const void *body, size_t size) { zmq_msg_t *msg = &self->frame[FRAME_BODY]; zmq_msg_init_size(msg, size); memcpy (zmq_msg_data(msg), body, size); } static int RHmsg_send_cmd(struct RHmsg *self, void *request) { int i; int ret; for (i = 0; i < MSG_FRAMES; i++) { ret = zmq_msg_send (&self->frame[i], request, (i < MSG_FRAMES - 1)? ZMQ_SNDMORE: 0); if (ret < 0 ) return errno; } return 0; } static int RHmsg_get_ack(struct RHmsg *self, void *request) { int rc; unsigned long size; zmq_pollitem_t zpoll; char *string; int newtimeout; int len; zpoll.socket = request; zpoll.events = ZMQ_POLLIN; /* * Wait for an answer, raise * an error if no message is received */ rc = zmq_poll(&zpoll, 1, timeout); if (rc <= 0) return -EFAULT; zmq_msg_init (&self->frame[0]); if (zmq_msg_recv(&self->frame[0], request, 0) == -1) { zmq_msg_close(&self->frame[0]); return -EFAULT; } size = zmq_msg_size(&self->frame[0]); string = malloc (size + 1); memcpy (string, zmq_msg_data (&self->frame[0]), size); string[size] = '\0'; zmq_msg_close(&self->frame[0]); /* * Check if the remote send a new timeout */ len = size; if (strchr(string, ':')) len = (strchr(string, ':') - string - 1); if (strncmp(string, "ACK", len) != 0) { ERROR("Remote Handler returns error, exiting"); return -EFAULT; } /* * Check if the remote ask to wait longer * we get ack, check the rest of the received * string */ if ((size > 4) && (string[3] == ':')) { newtimeout = strtoul(&string[4], NULL, 10); if (newtimeout > 0) timeout = newtimeout; } return 0; } static int forward_data(void *request, const void *buf, int len) { struct RHmsg RHmessage; int ret; if (!request) return -EFAULT; RHset_command(&RHmessage, "DATA"); RHset_payload(&RHmessage, buf, len); ret = RHmsg_send_cmd(&RHmessage, request); if (ret) return ret; ret = RHmsg_get_ack(&RHmessage, request); return ret; } static int install_remote_image(struct img_type *img, void __attribute__ ((__unused__)) *data) { void *context = zmq_ctx_new(); void *request = zmq_socket (context, ZMQ_REQ); char *connect_string; int len; int ret = 0; struct RHmsg RHmessage; char bufcmd[80]; len = strlen(img->type_data) + strlen(TMPDIR) + strlen("ipc://") + 4; /* * Allocate maximum string */ connect_string = malloc(len); if (!connect_string) { ERROR("Not enough memory"); return -ENOMEM; } snprintf(connect_string, len, "ipc://%s%s", TMPDIR, img->type_data); ret = zmq_connect(request, connect_string); if (ret < 0) { ERROR("Connection with %s cannot be established", connect_string); ret = -ENODEV; goto cleanup; } /* Initialize default timeout */ timeout = REMOTE_IPC_TIMEOUT; /* Send initialization string */ snprintf(bufcmd, sizeof(bufcmd), "INIT:%lld", img->size); RHset_command(&RHmessage, bufcmd); RHset_payload(&RHmessage, NULL, 0); RHmsg_send_cmd(&RHmessage, request); if (RHmsg_get_ack(&RHmessage, request)) return -ENODEV; ret = copyimage(request, img, forward_data); cleanup: zmq_close(request); zmq_ctx_destroy(context); return ret; } __attribute__((constructor)) void remote_handler(void) { register_handler("remote", install_remote_image, NULL); }
22.277778
76
0.686409
839e6eee414dda3f374274339bd031fad6424775
6,060
h
C
inference/src/ilb/ilb_inference.h
intel/integrated-media-inference-framework
35eb004b54c19d01c9e9f5cb15d7b14490516573
[ "Apache-2.0" ]
9
2020-06-05T07:07:35.000Z
2021-12-07T17:42:33.000Z
inference/src/ilb/ilb_inference.h
intel/integrated-media-inference-framework
35eb004b54c19d01c9e9f5cb15d7b14490516573
[ "Apache-2.0" ]
null
null
null
inference/src/ilb/ilb_inference.h
intel/integrated-media-inference-framework
35eb004b54c19d01c9e9f5cb15d7b14490516573
[ "Apache-2.0" ]
1
2021-02-17T10:59:09.000Z
2021-02-17T10:59:09.000Z
/******************************************************************************* * Copyright 2020 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 _ILB_INFERENCE_H #define _ILB_INFERENCE_H #include "easylogging++.h" #include "common_mem_manager.h" #include <chrono> #include <memory> #include <stdio.h> #include <string.h> #include <unistd.h> #include <vector> #include <messages/proto/inference.pb.h> #include <messages/proto/types.pb.h> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc/types_c.h" #include "opencv2/objdetect/objdetect.hpp" #define NUM_OF_INFERENCE_RESOURCES (30) /* Abstract class of a generic inference engine (for example, Open-Vino, etc.) to be used within IMIF-ILB. */ enum eInferenceEngineStatus { INFERENCE_ENGINE_NO_ERROR = 0x0, INFERENCE_ENGINE_ERROR = 0x1, INFERENCE_ENGINE_NOT_SUPPORTED = 0x2, INFERENCE_ENGINE_BUSY = 0x3, INFERENCE_ENGINE_NOT_ENOUGH_FRAMES = 0x4 }; enum ePrecision { PRECISION_U8, //8 bit unsigned fixed point PRECISION_I8, //8 bit signed fixed pointer PRECISION_U16, //16 bit unsigned fixed point PRECISION_I16, //16 bit signed fixed pointer PRECISION_U32, //32 bit unsigned fixed point PRECISION_I32, //32 bit signed fixed pointer PRECISION_FP16, //16 bit floating point PRECISION_FP32, //32 bit floating point PRECISION_BIN //1 bit (binary) }; enum eLayout { LAYOUT_ANY, LAYOUT_NCHW, LAYOUT_NHWC, LAYOUT_OIHW, LAYOUT_C, LAYOUT_CHW, LAYOUT_HW, LAYOUT_NC, LAYOUT_CN, LAYOUT_NCDHW }; #define INF_ENGINE_CHECK_STATUS(x) \ { \ eInferenceEngineStatus status; \ status = x; \ if (status != INFERENCE_ENGINE_NO_ERROR) { \ LOG(ERROR) << "INFERENCE ERROR in function " << __FUNCTION__ << " on line " << __LINE__ << " with status: " << status \ << ". Aborting...\n"; \ exit(status); \ } \ } namespace imif { namespace ilb { typedef std::pair<imif::messages::types::FrameInfo, std::shared_ptr<imif::common::shmem_buff>> inferenceInput; typedef std::vector<inferenceInput> inferenceInputVec; typedef imif::messages::inference::RawResult inferenceResult; class IlbInferenceEngine { public: IlbInferenceEngine() {} virtual ~IlbInferenceEngine() {} //adds a folder to a vector of folder-paths in which the inference engine shall search for plugins virtual eInferenceEngineStatus addPluginFolder(std::string folderPath) = 0; //sets the desired device to use for inference, with string parameter (for example, "CPU", "GPU", "FPGA", etc.) virtual eInferenceEngineStatus setDevice(std::string deviceType) = 0; //sets the desired device to use for inference, with device number parameter virtual eInferenceEngineStatus setDevice(uint32_t device_num) = 0; //loads the network into the inference engine virtual eInferenceEngineStatus loadNetwork(std::string networkPath, size_t n_threads, size_t batch_size, std::string model_type, uint32_t num_of_requests, size_t stats_frames, std::string stats_path, std::string input_layer_precision, bool hetero_dump_graph_dot) = 0; //get maximun output size virtual size_t outputSize() = 0; //sets the batch size virtual eInferenceEngineStatus setBatchSize(std::size_t size) = 0; //does inference (either sync or asynch) virtual eInferenceEngineStatus runInference(const inferenceInputVec &input) = 0; //wait for the asynchronous inference requests to complete virtual eInferenceEngineStatus inferenceWait() = 0; //get performance / stats virtual eInferenceEngineStatus getPerformance(void *output) = 0; //gets the starting timestamp of the oldest inference request that was submitted virtual uint getOldestDurationMs() = 0; //gets the label per class virtual std::string getLabel(uint32_t classificationIndex) = 0; //checks if there are pending inference requests that haven't been completed yet virtual bool hasPendingRequests() = 0; //gets the number of pending requests virtual int getNumPendingRequests() = 0; //checks if there are inference results waiting virtual int getResult(std::shared_ptr<imif::common::shmem_buff> buff, inferenceResult &result) = 0; //unloads the network from the inference engine in an orderly way virtual void unloadNetwork() = 0; }; } // namespace ilb } // namespace imif #endif //of #ifndef _ILB_INFERENCE_H
39.607843
132
0.594719
3124fa5ea20992fbcb5bc9f43b262e3eb949da82
9,819
h
C
include/retdec/llvmir2hll/evaluator/arithm_expr_evaluator.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
521
2019-03-29T15:44:08.000Z
2022-03-22T09:46:19.000Z
include/retdec/llvmir2hll/evaluator/arithm_expr_evaluator.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
30
2019-06-04T17:00:49.000Z
2021-09-08T20:44:19.000Z
include/retdec/llvmir2hll/evaluator/arithm_expr_evaluator.h
Andrik-555/retdec
1ac63a520da02912daf836b924f41d95b1b5fa10
[ "MIT", "BSD-3-Clause" ]
99
2019-03-29T16:04:13.000Z
2022-03-28T16:59:34.000Z
/** * @file include/retdec/llvmir2hll/evaluator/arithm_expr_evaluator.h * @brief A base class for all evaluators. * @copyright (c) 2017 Avast Software, licensed under the MIT license */ #ifndef RETDEC_LLVMIR2HLL_EVALUATOR_ARITHM_EXPR_EVALUATOR_H #define RETDEC_LLVMIR2HLL_EVALUATOR_ARITHM_EXPR_EVALUATOR_H #include <stack> #include <string> #include "retdec/llvmir2hll/ir/cast_expr.h" #include "retdec/llvmir2hll/ir/const_bool.h" #include "retdec/llvmir2hll/ir/const_float.h" #include "retdec/llvmir2hll/ir/const_int.h" #include "retdec/llvmir2hll/ir/constant.h" #include "retdec/llvmir2hll/support/maybe.h" #include "retdec/llvmir2hll/support/types.h" #include "retdec/llvmir2hll/support/visitors/ordered_all_visitor.h" #include "retdec/utils/non_copyable.h" namespace retdec { namespace llvmir2hll { /** * @brief A base class for all evaluators. * * A concrete evaluator should * - implement the virtual functions where you wan't to change behaviour of * sub-evaluator. Default implementation of this virtual function do nothing. * - define a static <tt>ShPtr<ArithmExprEvaluator> create()</tt> function * - register itself at ArithmExprEvaluatorFactory by passing the static @c * create function and the concrete evaluator's ID */ class ArithmExprEvaluator: private OrderedAllVisitor, private retdec::utils::NonCopyable { public: /// Pair of @c llvm::APSInt. using APSIntPair = std::pair<llvm::APSInt, llvm::APSInt>; /// Pair of @c llvm::APFloat. using APFloatPair = std::pair<llvm::APFloat, llvm::APFloat>; /// Pair of integer constants. using ConstIntPair = std::pair<ShPtr<ConstInt>, ShPtr<ConstInt>>; /// Pair of float constants. using ConstFloatPair = std::pair<ShPtr<ConstFloat>, ShPtr<ConstFloat>>; /// Pair of bool constants. using ConstBoolPair = std::pair<ShPtr<ConstBool>, ShPtr<ConstBool>>; /// Pair of constants. using ConstPair = std::pair<ShPtr<Constant>, ShPtr<Constant>>; /// Stack of constats. using ConstStack = std::stack<ShPtr<Constant>>; /// Mapping of variables to constants. using VarConstMap = std::map<ShPtr<Variable>, ShPtr<Constant>>; public: virtual ~ArithmExprEvaluator() override; /** * @brief Returns the ID of the optimizer. */ virtual std::string getId() const = 0; virtual Maybe<bool> toBool(ShPtr<Expression> expr, VarConstMap varValues = VarConstMap()); ShPtr<Constant> evaluate(ShPtr<Expression> expr); ShPtr<Constant> evaluate(ShPtr<Expression> expr, const VarConstMap &varValues); template<typename ConstType> static Maybe<std::pair<ShPtr<ConstType>, ShPtr<ConstType>>> castConstPair( const ConstPair &constPair); protected: ArithmExprEvaluator(); static APSIntPair getAPSIntsFromConstants(const Maybe<ConstIntPair> &constIntPair); static APFloatPair getAPFloatsFromConstants(const Maybe<ConstFloatPair> &ConstFloatPair); static bool isConstantZero(ShPtr<Constant> constant); protected: /// Signalizes if evaluation can go on. bool canBeEvaluated; private: using LLVMAPIntAPIntBoolOp = llvm::APInt (llvm::APInt::*)( const llvm::APInt &, bool &) const; using LLVMBoolAPIntOp = bool (llvm::APInt::*)( const llvm::APInt &) const; using LLVMAPIntAPIntOp = llvm::APInt (llvm::APInt::*)( const llvm::APInt &) const; using LLVMAPFloatOp = llvm::APFloat::opStatus (llvm::APFloat::*)( const llvm::APFloat &, llvm::APFloat::roundingMode); // Since LLVM 3.9, APFloat::mode() and APFloat::remainder() do not accept // roundingMode, so we have to create another alias for operations without // the rounding mode. using LLVMAPFloatOpNoRounding = llvm::APFloat::opStatus (llvm::APFloat::*)( const llvm::APFloat &); private: using OrderedAllVisitor::visit; /// @name Visitor Interface /// @{ // Expressions virtual void visit(ShPtr<AddOpExpr> expr) override; virtual void visit(ShPtr<AddressOpExpr> expr) override; virtual void visit(ShPtr<AndOpExpr> expr) override; virtual void visit(ShPtr<ArrayIndexOpExpr> expr) override; virtual void visit(ShPtr<BitAndOpExpr> expr) override; virtual void visit(ShPtr<BitOrOpExpr> expr) override; virtual void visit(ShPtr<BitShlOpExpr> expr) override; virtual void visit(ShPtr<BitShrOpExpr> expr) override; virtual void visit(ShPtr<BitXorOpExpr> expr) override; virtual void visit(ShPtr<CallExpr> expr) override; virtual void visit(ShPtr<DerefOpExpr> expr) override; virtual void visit(ShPtr<DivOpExpr> expr) override; virtual void visit(ShPtr<EqOpExpr> expr) override; virtual void visit(ShPtr<GtEqOpExpr> expr) override; virtual void visit(ShPtr<GtOpExpr> expr) override; virtual void visit(ShPtr<LtEqOpExpr> expr) override; virtual void visit(ShPtr<LtOpExpr> expr) override; virtual void visit(ShPtr<ModOpExpr> expr) override; virtual void visit(ShPtr<MulOpExpr> expr) override; virtual void visit(ShPtr<NegOpExpr> expr) override; virtual void visit(ShPtr<NeqOpExpr> expr) override; virtual void visit(ShPtr<NotOpExpr> expr) override; virtual void visit(ShPtr<OrOpExpr> expr) override; virtual void visit(ShPtr<StructIndexOpExpr> expr) override; virtual void visit(ShPtr<SubOpExpr> expr) override; virtual void visit(ShPtr<TernaryOpExpr> expr) override; virtual void visit(ShPtr<Variable> var) override; // Casts virtual void visit(ShPtr<BitCastExpr> expr) override; virtual void visit(ShPtr<ExtCastExpr> expr) override; virtual void visit(ShPtr<FPToIntCastExpr> expr) override; virtual void visit(ShPtr<IntToFPCastExpr> expr) override; virtual void visit(ShPtr<IntToPtrCastExpr> expr) override; virtual void visit(ShPtr<PtrToIntCastExpr> expr) override; virtual void visit(ShPtr<TruncCastExpr> expr) override; // Constants virtual void visit(ShPtr<ConstArray> constant) override; virtual void visit(ShPtr<ConstBool> constant) override; virtual void visit(ShPtr<ConstFloat> constant) override; virtual void visit(ShPtr<ConstInt> constant) override; virtual void visit(ShPtr<ConstNullPointer> constant) override; virtual void visit(ShPtr<ConstString> constant) override; virtual void visit(ShPtr<ConstStruct> constant) override; virtual void visit(ShPtr<ConstSymbol> constant) override; /// @} // Resolve types. virtual void resolveTypesUnaryOp(ShPtr<Constant> &operand); virtual void resolveTypesBinaryOp(ConstPair &constPair); // Resolve operators specifications. virtual void resolveOpSpecifications(ShPtr<AddOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<AndOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<BitAndOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<BitOrOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<BitShlOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<BitShrOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<BitXorOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<DivOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<EqOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<GtEqOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<GtOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<LtEqOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<LtOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<ModOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<MulOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<NegOpExpr> expr, ShPtr<Constant> &constant); virtual void resolveOpSpecifications(ShPtr<NeqOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<NotOpExpr> expr, ShPtr<Constant> &constant); virtual void resolveOpSpecifications(ShPtr<OrOpExpr> expr, ConstPair &constPair); virtual void resolveOpSpecifications(ShPtr<SubOpExpr> expr, ConstPair &constPair); // Resolve casts. virtual void resolveCast(ShPtr<BitCastExpr> expr, ShPtr<Constant> &constant); virtual void resolveCast(ShPtr<ExtCastExpr> expr, ShPtr<Constant> &constant); virtual void resolveCast(ShPtr<FPToIntCastExpr> expr, ShPtr<Constant> &constant); virtual void resolveCast(ShPtr<IntToFPCastExpr> expr, ShPtr<Constant> &constant); virtual void resolveCast(ShPtr<TruncCastExpr> expr, ShPtr<Constant> &constant); // Resolve overflow. virtual void resolveOverflowForAPInt(bool overflow); virtual void resolveOverflowForAPFloat(llvm::APFloat::opStatus opStatus); // Perform functions. ShPtr<ConstFloat> performOperationOverApFloat(const Maybe<ConstFloatPair> &constFloatPair, LLVMAPFloatOp op, llvm::APFloat::opStatus &status); ShPtr<ConstFloat> performOperationOverApFloat(const Maybe<ConstFloatPair> &constFloatPair, LLVMAPFloatOpNoRounding op, llvm::APFloat::opStatus &status); llvm::APFloat::cmpResult performOperationOverApFloat(const Maybe< ConstFloatPair> &constFloatPair); ShPtr<ConstInt> performOperationOverApInt(const Maybe<ConstIntPair> &constIntPair, LLVMAPIntAPIntBoolOp op, bool &overflow); ShPtr<ConstInt> performOperationOverApInt(const Maybe<ConstIntPair> &constIntPair, LLVMAPIntAPIntOp op); ShPtr<ConstBool> performOperationOverApInt(const Maybe<ConstIntPair> &constIntPair, LLVMBoolAPIntOp op); // Other functions. ConstPair getOperandsForBinaryOpAndResolveTypes(); ShPtr<Constant> getOperandForUnaryOpAndResolveTypes(); void resolveOverflows(bool overflow, llvm::APFloat::opStatus opStatus); private: /// Map of constants that substitute variables in evaluation. const VarConstMap *varValues; /// Stack of results during the evaluation. ConstStack stackOfResults; }; } // namespace llvmir2hll } // namespace retdec #endif
39.119522
80
0.783481
9cd2c31cff077fcac27dc061d30b230679ffacbd
11,721
c
C
src/libmisc/catalogs.c
kpoeltler/rigel
97d25e1f03bf6438c0ecf8e93e8a3afb1f7044d7
[ "Apache-2.0" ]
null
null
null
src/libmisc/catalogs.c
kpoeltler/rigel
97d25e1f03bf6438c0ecf8e93e8a3afb1f7044d7
[ "Apache-2.0" ]
1
2018-10-19T22:10:44.000Z
2018-10-20T17:07:54.000Z
src/libmisc/catalogs.c
kpoeltler/rigel
97d25e1f03bf6438c0ecf8e93e8a3afb1f7044d7
[ "Apache-2.0" ]
1
2018-09-12T01:31:06.000Z
2018-09-12T01:31:06.000Z
/* code to read xephem database files. * plus special handling for speedy reading of the sao catalog. */ #include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <dirent.h> #include <errno.h> #include <math.h> #include "P_.h" #include "astro.h" #include "circum.h" #include "catalogs.h" #include "strops.h" #include "telenv.h" static int sao_catalog (FILE *fp); static int do_sao (FILE *fp, char name[], Obj *op, char m[]); static int caseCharCmp(char a, char b) { return toupper(a) == toupper(b) ? 1 : 0; } /* Compare the name(s) from a possibly multiple designation EDB entry with the given name we are searching for, and return > 0 if we match */ int checkNameMatch(char* edbLine, char* testName) { // edb entries are delimited by | and field ends at , // We skip all whitespace in both testName and edb entries // edb entries ignore anything following a ( int nameNum = 1; char* t = testName; while (*t <= 32) t++; // skip any initial whitespace // Look for a designation in the given name. This is all digits followed by a space, // or for comets, followed by a P or C char designation[80]; char edesignation[80]; memset(designation,0,sizeof(designation)); char* tt = t; char* d = t; char* ds = designation; while (*d && isdigit(*d)) { *ds++ = *d++; } if (ds != designation) { if (*d != ' ') *ds = toupper(*d); // include trailing P or C (presumably) if (*d) d++; } t = d; // count the non-whitespace length of our source name int srcLen = 0; while (*t && *t != '(') { if (*t > 32) srcLen++; t++; } t = d; char* st = t; char* p = edbLine; while (*p && *p != ',' && *p != '|') { char* w = p; char* t = st; int mc = 0; while (*w <= 32) w++; // Now look for a designation in the edbLine. memset(edesignation,0,sizeof(edesignation)); d = w; while (*d && *d <= 32) d++; // skip initial whitespace ds = edesignation; while (*d && isdigit(*d)) { *ds++ = *d++; } if (ds != edesignation) { if (*d != ' ') *ds = toupper(*d); if (*d) d++; } w = d; // convert MPC notation of reusing / for discoverer to a ( for our parsing int first = 0; while (*d && *d != '(' && *d != ',') { if (*d == '/') { if (first) { *d = '('; break; } else first = 1; } d++; } // do same for input first = 0; while (*t && *t != '(' && *t != ',') { if (*t == '/') { if (first) { *t = '('; break; } else first = 1; } t++; } t = st; while (*w && *w <= 32) w++; while (*t && *t <= 32) t++; int desMatch = (strlen(designation) == 0 || strcmp(designation, edesignation) == 0); if (!desMatch) { if (strncmp(designation,w,4) == 0) desMatch = 1; // keep trying if we typed in a year, not a designation if (desMatch) { t = tt; srcLen += strlen(designation); } } if (desMatch) { while (*w && *t && *t != '(' && *w != '(' && caseCharCmp(*w,*t) && mc < MAXNM) { mc++; t++; w++; while (*w && *w <= 32) w++; while (*t && *t <= 32) t++; } } if (desMatch && (mc == srcLen || mc >= MAXNM)) { while (mc < srcLen && *w >= 32 && *w != '(' && *w != '|' && *w != ',') w++; if (mc && *w >= 32 && *w != '(' && *w != '|' && *w != ',') { return 0; } return nameNum; } else { while (*w && *w != ',' && *w != '|') w++; if (*w == '|') w++; p = w; nameNum++; } } return 0; } /* search the given catalog in catdir for the given source. * to help with asteroids, if source starts with a number, just require match * to that, else skip any leading number in candidate. * the catalog name need not include the suffix and we allow any case. * if found fill in *op and return 0 else fill in m and return -1. */ int searchCatalog (catdir, catalog, source, op, m) char catdir[]; char catalog[]; char source[]; Obj *op; char m[]; { char path[1024]; char buf[512]; struct dirent *dirent; DIR *dir; FILE *fp; /* check for easy planet name first */ if (source && db_chk_planet (source, op) == 0) return (0); /* additional sanity check things */ if (!catdir || catdir[0] == '\0' || !catalog || catalog[0] == '\0' || !source || source[0] == '\0') { sprintf (m, "No dir, catalog or source"); return (-1); } /* open and scan catdir for catalog, any case */ dir = opendir (catdir); if (!dir) { sprintf (m, "%s: %s", catdir, strerror(errno)); return (-1); } dirent = NULL; for (fp = NULL; !fp && (dirent = readdir (dir)) != NULL; ) { /* see if d_name works */ if (strcasecmp (dirent->d_name, catalog)) { (void) sprintf (buf, "%s.edb", catalog); if (strcasecmp (dirent->d_name, buf)) continue; } (void) sprintf (path, "%s/%s", catdir, dirent->d_name); fp = telfopen (path, "r"); } (void) closedir (dir); if (!fp) { sprintf (m, "Can not find catalog '%s' in '%s'", catalog, catdir); return (-1); } /* first check for sao catalog */ if (sao_catalog (fp)) { int s = do_sao (fp, source, op, m); fclose (fp); return (s); } /* scan for source, ignoring whitespace and case up to MAXNM-1 chars */ while (fgets (buf, sizeof(buf), fp) != NULL) { int match = checkNameMatch(buf, source); if (match) { /* quick name sanity check passes -- now work harder */ buf[strlen(buf)-1] = '\0'; if (db_crack_line_name (buf, op, NULL, match-1) == 0) { /* yes! */ fclose (fp); return (0); } } } /* nope */ fclose (fp); sprintf (m, "`%s' not found in `%s'", source, catalog); return (-1); } /* read the given filename of .edb records and create an array of * Obj records. Set the address of the malloced array to *opp and * return the number of entries in it. * return -1 and fill m if trouble. * N.B. caller must free (*opp) iff return >= 0. * N.B. fn[] is converted to all lower case IN PLACE. */ int readCatalog (fn, opp, m) char fn[]; Obj **opp; char m[]; { #define OBJCHUNK 64 /* number of Obj we malloc each time */ Obj *opa; /* pointer to malloced array of nmem Obj */ int nmem; /* number that can fit in opa[] */ int nobs; /* number actually used in opa[] */ char buf[512]; FILE *fp; fp = telfopen (fn, "r"); if (!fp) { sprintf (m, "%s: %s", fn, strerror(errno)); return (-1); } /* grab an initial pool of memory */ nmem = OBJCHUNK; opa = (Obj *) malloc (nmem * sizeof(Obj)); if (!opa) { sprintf (m, "%s: No memory", fn); return (-1); } nobs = 0; /* read each entry */ while (fgets (buf, sizeof(buf), fp) != NULL) { Obj *op = &opa[nobs]; buf[strlen(buf)-1] = '\0'; if (db_crack_line (buf, op, NULL) == 0) { /* good one -- add it to the list */ if (++nobs == nmem) { char *newopa; nmem += OBJCHUNK; newopa = realloc ((void *)opa, nmem * sizeof(Obj)); if (!newopa) { sprintf (m, "%s: No more memory", fn); break; } else opa = (Obj *) newopa; } } } fclose (fp); if (nobs < 0) free ((void *)opa); else *opp = opa; return (nobs); } /* search all catalogs in catdir for the given source, ignoring white and case. * if found fill in *op and return 0 else fill in m and return -1. */ int searchDirectory (catdir, source, op, m) char catdir[]; char source[]; Obj *op; char m[]; { struct dirent *dirent; DIR *dir; /* check for easy planet name first */ if (source && db_chk_planet (source, op) == 0) return (0); /* additional sanity check things */ if (!catdir || catdir[0] == '\0' || !source || source[0] == '\0') { sprintf (m, "No directory or source"); return (-1); } /* open catdir */ dir = opendir (catdir); if (!dir) { sprintf (m, "%s: %s", catdir, strerror(errno)); return (-1); } /* scan for and search each catalog */ while ((dirent = readdir (dir)) != NULL) { int l = strlen (dirent->d_name); if (l > 4 && !strcasecmp (dirent->d_name+(l-4), ".edb")) if (searchCatalog (catdir, dirent->d_name, source, op, m) == 0) break; } (void) closedir (dir); if (dirent) return (0); sprintf (m, "not found anywhere in %s", basenm(catdir)); return (-1); } /* return 1 if file starts with SAO, else 0. * N.B. we always return with fp rewound. */ static int sao_catalog (FILE *fp) { char buf[128]; rewind (fp); if (fgets (buf, sizeof(buf), fp) == NULL) return (0); rewind (fp); if (strncasecmp (buf, "SAO", 3) == 0) return (1); return (0); } /* search the SAO catalog for the given entry; * if found, fill in *op and return 0, else fill m and return -1. * N.B. we assume the file is sorted in increasing order. */ static int do_sao (FILE *fp, char name[], Obj *op, char m[]) { #define MAXSAO 258997L long s, s1, s2; char line[128]; long nname, ns; /* check the name */ if (strncasecmp (name, "SAO", 3)) { sprintf (m, "Bad SAO name: %s", name); return (-1); } /* get the sao number we are looking for */ nname = atol (name+3); if (nname <= 0 || nname > MAXSAO) { sprintf (m, "Bad SAO number: %ld (range is 1 .. %ld)",nname,MAXSAO); return (-1); } /* set s1 and s2 to first and last possible file offset */ s1 = 0; fseek (fp, 0L, SEEK_END); s2 = ftell (fp) - 1; do { s = (s1 + s2)/2; fseek (fp, s, SEEK_SET); do /* align to nearest beginning of line */ fgets (line, sizeof(line), fp); while (strncasecmp (line, "SAO", 3) != 0); ns = atol (line+3); if (nname < ns) s2 = s; else s1 = s; } while (nname != ns && s2 > s1); if (nname == ns) { line[strlen(line)-1] = '\0'; /* discard trailing \n */ if (db_crack_line (line, op, NULL) == 0) return (0); } sprintf (m, "SAO number %ld not found.", nname); return (-1); } /* For RCS Only -- Do Not Edit */ static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: catalogs.c,v $ $Date: 2002/03/12 16:45:41 $ $Revision: 1.2 $ $Name: $"};
25.425163
129
0.471803
1486e240d42be198dba1bc8e1cf7c2e7bfdba2f7
404
c
C
examples/payment/test/test_runners/TestPayment_Runner.c
BernardoKoefender/Unity
5203df6c3b1ef8b70ae6bcbed6ac544cb4192f90
[ "MIT" ]
null
null
null
examples/payment/test/test_runners/TestPayment_Runner.c
BernardoKoefender/Unity
5203df6c3b1ef8b70ae6bcbed6ac544cb4192f90
[ "MIT" ]
null
null
null
examples/payment/test/test_runners/TestPayment_Runner.c
BernardoKoefender/Unity
5203df6c3b1ef8b70ae6bcbed6ac544cb4192f90
[ "MIT" ]
null
null
null
//This code is based on the example "foo". //Authors: // Bernardo Koefender - @BernardoKoefender // Frederico Arnaldo Ballve Neto - @fredballve // Willian Analdo Nunes - @Willian-Nunes #include "unity.h" #include "unity_fixture.h" TEST_GROUP_RUNNER(Payment) { RUN_TEST_CASE(Payment, TestReturn0); RUN_TEST_CASE(Payment, TestReturn1); RUN_TEST_CASE(Payment, TestReturn2); }
25.25
54
0.712871
88cd44c5b9350a6211448e2ec698baa21b1c8d4c
956
h
C
kernel/tr/xqp/ast/ASTType.h
TonnyRed/sedna
06ff5a13a16f2d820d3cf0ce579df23f03a59eda
[ "ECL-2.0", "Apache-2.0" ]
14
2015-09-06T10:17:02.000Z
2021-12-14T22:39:25.000Z
kernel/tr/xqp/ast/ASTType.h
TonnyRed/sedna
06ff5a13a16f2d820d3cf0ce579df23f03a59eda
[ "ECL-2.0", "Apache-2.0" ]
1
2020-02-15T22:02:14.000Z
2020-02-17T10:30:14.000Z
kernel/tr/xqp/ast/ASTType.h
TonnyRed/sedna
06ff5a13a16f2d820d3cf0ce579df23f03a59eda
[ "ECL-2.0", "Apache-2.0" ]
8
2015-07-23T05:48:20.000Z
2021-04-11T05:01:39.000Z
/* * File: ASTType.h * Copyright (C) 2009 The Institute for System Programming of the Russian Academy of Sciences (ISP RAS) */ #ifndef _AST_TYPE_H_ #define _AST_TYPE_H_ #include "ASTNode.h" class ASTVisitor; #include <string> class ASTType : public ASTNode { public: enum TypeMod { ATOMIC = 0, // xs:integer, xs:string etc. AND xs:anyAtomicType ABSTRACT, // xs:anyType, xs:anySimpleType COMPLEX, // xs:untyped LIST, // xs:NMTOKENS, xs:IDREFS etc. ANY, // any type in hierarchy }; public: std::string *name; // QName for type TypeMod type; public: ASTType(const ASTNodeCommonData &loc, std::string *type_, TypeMod mod = ASTType::ANY) : ASTNode(loc), name(type_), type(mod) {} ~ASTType(); void accept(ASTVisitor &v); ASTNode *dup(); void modifyChild(const ASTNode *oldc, ASTNode *newc); static ASTNode *createNode(scheme_list &sl); }; #endif
22.232558
131
0.642259
1842694826e0c5553d4dca2a5e5ffec50dbd6bfd
6,330
c
C
ports/esp32/labplus/00030.c
6saiya/mpython
442006fb3ce6b85c8358f5ce17b762ae9d962aaf
[ "MIT" ]
1
2019-03-21T14:55:59.000Z
2019-03-21T14:55:59.000Z
ports/esp32/labplus/00030.c
6saiya/mpython
442006fb3ce6b85c8358f5ce17b762ae9d962aaf
[ "MIT" ]
null
null
null
ports/esp32/labplus/00030.c
6saiya/mpython
442006fb3ce6b85c8358f5ce17b762ae9d962aaf
[ "MIT" ]
null
null
null
#include <stdint.h> const uint8_t img_00030[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0x70, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0x78, 0x3C, 0x1E, 0x0F, 0x87, 0xC3, 0xE0, 0xF0, 0x78, 0x3C, 0x1C, 0x0C, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xE0, 0xF0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xF0, 0xF8, 0xF0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xF0, 0xE0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xF0, 0xF8, 0xF0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xE0, 0xE0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xF0, 0x78, 0x3C, 0x1E, 0x8F, 0x87, 0x03, 0x01, 0x00, 0x00, 0xFC, 0xFE, 0xFF, 0x07, 0x03, 0x61, 0x70, 0x78, 0x3C, 0x1E, 0x0F, 0x87, 0xC3, 0xE1, 0xF0, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x01, 0x00, 0x78, 0xFC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x78, 0x00, 0x01, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0xFF, 0xFF, 0x06, 0x06, 0x06, 0x00, 0x1F, 0x9F, 0xC7, 0xE0, 0x70, 0x38, 0x18, 0x00, 0x00, 0x08, 0x18, 0x38, 0x70, 0xE0, 0xC7, 0x9F, 0x1F, 0x00, 0x00, 0x00, 0x06, 0xF6, 0xF6, 0x36, 0xFF, 0xFF, 0xFF, 0xC6, 0x06, 0x06, 0x00, 0xFF, 0xFF, 0x1C, 0xCC, 0xCC, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1C, 0xFC, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x01, 0x0C, 0x0C, 0x0C, 0x3F, 0x3F, 0x0C, 0x0C, 0x0C, 0x00, 0x03, 0x07, 0x0F, 0x1F, 0x3E, 0x7C, 0xF8, 0xF0, 0xE0, 0xC6, 0xC7, 0xC7, 0xE3, 0xF1, 0x78, 0x3C, 0x1E, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xFE, 0xFE, 0xFE, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0xFF, 0xFF, 0x0C, 0x0C, 0x0C, 0x00, 0x03, 0x03, 0x01, 0x0C, 0x0C, 0x0C, 0x0C, 0xFC, 0xFC, 0xFC, 0x0C, 0x0C, 0x0C, 0x0C, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x1F, 0x7E, 0x70, 0x00, 0xFF, 0xFF, 0x00, 0x03, 0x07, 0x0E, 0x1C, 0xF8, 0xF0, 0xF8, 0x1C, 0x0E, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0F, 0x1E, 0x3C, 0x78, 0xF2, 0xE6, 0xCE, 0xCC, 0xCC, 0xDC, 0xDC, 0xCC, 0xCC, 0xCE, 0xE6, 0xE2, 0xF0, 0x78, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3F, 0x1F, 0x0F, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x38, 0x1F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3F, 0x3F, 0x3F, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x3F, 0x3F, 0x3F, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x07, 0x30, 0x38, 0x1C, 0x0F, 0x07, 0x01, 0x01, 0x01, 0x07, 0x0F, 0x1C, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
91.73913
97
0.652607
4b6e1b456af8b3124868689a406459782bf5db9b
257
h
C
lib/arduino/reboot/reboot_software.h
Pcornat/BenLib
5ec30f5eb0bbf827d4d3fd00c8cca1064109fb4c
[ "MIT" ]
null
null
null
lib/arduino/reboot/reboot_software.h
Pcornat/BenLib
5ec30f5eb0bbf827d4d3fd00c8cca1064109fb4c
[ "MIT" ]
null
null
null
lib/arduino/reboot/reboot_software.h
Pcornat/BenLib
5ec30f5eb0bbf827d4d3fd00c8cca1064109fb4c
[ "MIT" ]
null
null
null
/* ** Bensuperpc, 2016-2019 ** Servolent 2016 and Jeu de réflexe 2017 ** BAC project 2016-2017 ** File description: ** >reboot_software.c */ #include <avr/wdt.h> #ifndef REBOOT_SOFTWARE_H # define REBOOT_SOFTWARE_H void reboot_software(void); #endif
15.117647
41
0.727626
18ba71df481215829180470437201f1e787a67bf
65,372
c
C
tools/sctk-2.4.0/src/sclite/scores.c
hihihippp/Kaldi
861f838a2aea264a9e4ffa4df253df00a8b1247f
[ "Apache-2.0" ]
19
2015-03-19T10:53:38.000Z
2020-12-17T06:12:32.000Z
tools/sctk-2.4.0/src/sclite/scores.c
UdyanSachdev/kaldi
861f838a2aea264a9e4ffa4df253df00a8b1247f
[ "Apache-2.0" ]
1
2018-12-18T17:43:44.000Z
2018-12-18T17:43:44.000Z
tools/sctk-2.4.0/src/sclite/scores.c
UdyanSachdev/kaldi
861f838a2aea264a9e4ffa4df253df00a8b1247f
[ "Apache-2.0" ]
47
2015-01-27T06:22:57.000Z
2021-11-11T20:59:04.000Z
#include "sctk.h" /**********************************************************************/ /* */ /**********************************************************************/ void dump_SCORES(SCORES *sc, FILE *fp){ int i; fprintf(fp,"Dump of SCORES:\n"); fprintf(fp," Title: %s\n\n",sc->title); for (i=0; i<sc->num_grp; i++){ fprintf(fp,"%8s NS:%d SE:%d ",sc->grp[i].name, sc->grp[i].nsent,sc->grp[i].serr); fprintf(fp,"C:%d S:%d D:%d I:%d M:%d P:%d\n", sc->grp[i].corr , sc->grp[i].sub , sc->grp[i].del , sc->grp[i].ins , sc->grp[i].merges, sc->grp[i].splits); } } void dump_SCORES_alignments(SCORES *sc, FILE *fp, int lw, int full){ int i, p; if (full){ fprintf(fp,"NIST_TEXT_ALIGNMENT\n"); fprintf(fp,"VERSION 0.1\n"); } fprintf(fp,"\n\n\t\tDUMP OF SYSTEM ALIGNMENT STRUCTURE\n\n"); fprintf(fp,"System name: %s\n",sc->title); if (full) { if (sc->ref_fname != NULL) fprintf(fp,"Ref file: %s\n",sc->ref_fname); if (sc->hyp_fname != NULL) fprintf(fp,"Hyp file: %s\n",sc->hyp_fname); if (sc->creation_date != NULL) fprintf(fp,"Creation date: \"%s\"\n",sc->creation_date); if (sc->weight_ali) fprintf(fp,"Word Weight Aligned by file: \"%s\"\n",sc->weight_file); if (sc->frag_corr) fprintf(fp,"Fragment Correct Flag Set\n"); if (sc->opt_del) fprintf(fp,"Optionally Deletable Flag Set\n"); } fprintf(fp,"\n"); if (full) fprintf(fp,"Speaker Count: %d\n",sc->num_grp); fprintf(fp,"Speakers: \n"); for (i=0; i<sc->num_grp; i++) fprintf(fp," %2d: %s\n",i,sc->grp[i].name); fprintf(fp,"\n"); if (full){ PATH *pathx; if (sc->aset.num_plab > 0 || sc->aset.num_cat > 0){ fprintf(fp,"Utterance Label definitions:\n"); for (i=0; i<sc->aset.num_cat; i++) fprintf(fp," Category: id: \"%s\" title: \"%s\" " "description: \"%s\"\n",sc->aset.cat[i].id, sc->aset.cat[i].title,sc->aset.cat[i].desc); for (i=0; i<sc->aset.num_plab; i++) fprintf(fp," Label: id: \"%s\" title: \"%s\" " "description: \"%s\"\n",sc->aset.plab[i].id, sc->aset.plab[i].title,sc->aset.plab[i].desc); } fprintf(fp,"\n"); /* set pathx to the first avaliable path */ for (i=0, pathx = (PATH *)0; i<sc->num_grp; i++) if (sc->grp[i].num_path > 0){ pathx = sc->grp[i].path[0]; break; } if (pathx == (PATH*)0) { fprintf(fp,"No utterances found\n"); return; } if (pathx->sequence >= 0){ /* sort the output to be order by aligment sequence */ int *curpath; int nextgrp; int minseq; alloc_singZ(curpath,sc->num_grp,int,0); do { minseq = 999999; /* search through the groups, lookin for the lowest begintime */ nextgrp = -1; for (i=0; i<sc->num_grp; i++) if (curpath[i] < sc->grp[i].num_path) if (sc->grp[i].path[curpath[i]]->sequence < minseq){ minseq = sc->grp[i].path[curpath[i]]->sequence; nextgrp = i; } if (nextgrp >= 0) { /* print it */ i = nextgrp; fprintf(fp,"Speaker sentences%4d: %s utt# %d of %d\n",i, sc->grp[i].name,curpath[i],sc->grp[i].nsent); PATH_print(sc->grp[i].path[curpath[i]],fp,lw); fprintf(fp,"\n"); curpath[nextgrp] ++; } } while (nextgrp >= 0); free_singarr(curpath,int); } else { for (i=0; i<sc->num_grp; i++){ fprintf(fp,"Speaker sentences%4d: %s #utts: %d\n",i, sc->grp[i].name,sc->grp[i].nsent); for (p=0; p<sc->grp[i].num_path; p++){ PATH_print(sc->grp[i].path[p],fp,lw); fprintf(fp,"\n"); } } } } else { for (i=0; i<sc->num_grp; i++){ int attrib = PA_NONE; fprintf(fp,"Speaker sentences%4d: %s #utts: %d\n",i, sc->grp[i].name,sc->grp[i].nsent); for (p=0; p<sc->grp[i].num_path; p++){ attrib = sc->grp[i].path[p]->attrib; sc->grp[i].path[p]->attrib = PA_NONE; /* retain the case sensitive attribute */ if (BF_isSET(attrib,PA_CASE_SENSE)) BF_SET(sc->grp[i].path[p]->attrib,PA_CASE_SENSE); PATH_print(sc->grp[i].path[p],fp,lw); sc->grp[i].path[p]->attrib = attrib; fprintf(fp,"\n"); } } } fprintf(fp,"\n"); } TEXT *formatWordForSGML(WORD *word, TEXT *buffer){ TEXT_strcpy_escaped(buffer, word->value, WORD_SGML_SUB_WORD_SEP_CHR); if (word->tag1 == (TEXT *)0 && word->tag2 == (TEXT *)0) return buffer; TEXT_strcpy(buffer + TEXT_strlen(buffer), (TEXT *)WORD_SGML_SUB_WORD_SEP_STR); TEXT_strcpy_escaped(buffer + TEXT_strlen(buffer), (word->tag1 != (TEXT *)0) ? word->tag1 : (TEXT *)"", WORD_SGML_SUB_WORD_SEP_CHR); TEXT_strcpy(buffer + TEXT_strlen(buffer), (TEXT *)WORD_SGML_SUB_WORD_SEP_STR); TEXT_strcpy_escaped(buffer + TEXT_strlen(buffer), (word->tag2 != (TEXT *)0) ? word->tag2 : (TEXT *)"", WORD_SGML_SUB_WORD_SEP_CHR); return buffer; } void dump_SCORES_sgml(SCORES *sc, FILE *fp){ int i, p, w; TEXT bufA[1000]; TEXT bufB[1000]; fprintf(fp,"<SYSTEM title=\"%s\"",sc->title); fprintf(fp," ref_fname=\"%s\"",sc->ref_fname); fprintf(fp," hyp_fname=\"%s\"",sc->hyp_fname); fprintf(fp," creation_date=\"%s\"",sc->creation_date); fprintf(fp," format=\"2.4\""); fprintf(fp," frag_corr=\"%s\"", sc->frag_corr ? "TRUE" : "FALSE"); fprintf(fp," opt_del=\"%s\"", sc->opt_del ? "TRUE" : "FALSE"); fprintf(fp," weight_ali=\"%s\"", sc->weight_ali ? "TRUE" : "FALSE"); fprintf(fp," weight_filename=\"%s\"", sc->weight_ali ? sc->weight_file : ""); fprintf(fp,">\n"); for (i=0; i<sc->aset.num_plab; i++) fprintf(fp,"<LABEL id=\"%s\" title=\"%s\" desc=\"%s\">\n</LABEL>\n", sc->aset.plab[i].id, sc->aset.plab[i].title, sc->aset.plab[i].desc); for (i=0; i<sc->aset.num_cat; i++) fprintf(fp,"<CATEGORY id=\"%s\" title=\"%s\" desc=\"%s\">\n</CATEGORY>\n", sc->aset.cat[i].id, sc->aset.cat[i].title, sc->aset.cat[i].desc); for (i=0; i<sc->num_grp; i++){ fprintf(fp,"<SPEAKER id=\"%s\">\n",sc->grp[i].name); for (p=0; p<sc->grp[i].num_path; p++){ PATH *path = sc->grp[i].path[p]; fprintf(fp,"<PATH id=\"%s\" word_cnt=\"%d\"", path->id, path->num); if (path->labels != (char *)0) fprintf(fp," labels=\"%s\"",path->labels); if (path->file != (char *)0) fprintf(fp," file=\"%s\"",path->file); if (path->channel != (char *)0) fprintf(fp," channel=\"%s\"",path->channel); fprintf(fp," sequence=\"%d\"",path->sequence); if (path->attrib != PA_NONE){ if (BF_isSET(path->attrib,PA_REF_TIMES)){ fprintf(fp," R_T1=\"%.3f\"",path->ref_t1); fprintf(fp," R_T2=\"%.3f\"",path->ref_t2); } if (BF_isSET(path->attrib,PA_HYP_TIMES)){ fprintf(fp," H_T1=\"%.3f\"",path->hyp_t1); fprintf(fp," H_T2=\"%.3f\"",path->hyp_t2); } if (BF_isSET(path->attrib,PA_CHAR_ALIGN)) fprintf(fp," char_align=\"1\""); if (BF_isSET(path->attrib,PA_CASE_SENSE)) fprintf(fp," case_sense=\"1\""); if (BF_isSET(path->attrib,PA_HYP_WEIGHT)) fprintf(fp," hyp_weight=\"1\""); if (BF_isSET(path->attrib,PA_REF_WEIGHT)) fprintf(fp," ref_weight=\"1\""); if (BF_isSET(path->attrib,PA_REF_WTIMES) || BF_isSET(path->attrib,PA_HYP_WTIMES) || BF_isSET(path->attrib,PA_REF_CONF) || BF_isSET(path->attrib,PA_HYP_CONF) || BF_isSET(path->attrib,PA_REF_WEIGHT) || BF_isSET(path->attrib,PA_HYP_WEIGHT)){ int f=0; fprintf(fp," word_aux=\""); if (BF_isSET(path->attrib,PA_REF_WTIMES)){ fprintf(fp,"r_t1+t2"); f++; } if (BF_isSET(path->attrib,PA_HYP_WTIMES)){ if (f++ != 0) fprintf(fp,","); fprintf(fp,"h_t1+t2"); } if (BF_isSET(path->attrib,PA_REF_CONF)){ if (f++ != 0) fprintf(fp,","); fprintf(fp,"r_conf"); } if (BF_isSET(path->attrib,PA_HYP_CONF)){ if (f++ != 0) fprintf(fp,","); fprintf(fp,"h_conf"); } if (BF_isSET(path->attrib,PA_REF_WEIGHT)){ if (f++ != 0) fprintf(fp,","); fprintf(fp,"r_weight"); } if (BF_isSET(path->attrib,PA_HYP_WEIGHT)){ if (f++ != 0) fprintf(fp,","); fprintf(fp,"h_weight"); } fprintf(fp,"\""); } } fprintf(fp,">\n"); /* current format of paths: PATH :== <ALIGN>[:<ALIGN>]* ALIGN :== <EVAL>,<WORD>[,<WORD>]<AUX_FIELDS> EVAL :== S | C | D | I | M | T | U WORD :== "<TEXT>" */ for (w=0; w<path->num; w++) { if (path->pset[w].eval == P_INS) fprintf(fp,"I,,\"%s\"", formatWordForSGML((WORD *)path->pset[w].b_ptr, bufB)); else if (path->pset[w].eval == P_DEL) fprintf(fp,"D,\"%s\",", formatWordForSGML((WORD *)path->pset[w].a_ptr, bufA)); else if (path->pset[w].eval == P_CORR) fprintf(fp,"C,\"%s\",\"%s\"", formatWordForSGML((WORD *)path->pset[w].a_ptr, bufA), formatWordForSGML((WORD *)path->pset[w].b_ptr, bufB)); else { fprintf(fp,"%c,\"%s\",\"%s\"", ((path->pset[w].eval == P_SUB) ? 'S' : ((path->pset[w].eval == P_MRG) ? 'M' : ((path->pset[w].eval == P_SPL) ? 'T' : 'U'))), formatWordForSGML((WORD *)path->pset[w].a_ptr, bufA), formatWordForSGML((WORD *)path->pset[w].b_ptr, bufB)); } /* Extra attributes */ if (BF_isSET(path->attrib,PA_REF_WTIMES)) if (path->pset[w].eval != P_INS) fprintf(fp,",%.3f+%.3f", ((WORD *)path->pset[w].a_ptr)->T1, ((WORD *)path->pset[w].a_ptr)->T2); else fprintf(fp,","); if (BF_isSET(path->attrib,PA_HYP_WTIMES)) if (path->pset[w].eval != P_DEL) fprintf(fp,",%.3f+%.3f", ((WORD *)path->pset[w].b_ptr)->T1, ((WORD *)path->pset[w].b_ptr)->T2); else fprintf(fp,","); if (BF_isSET(path->attrib,PA_REF_CONF)) if (path->pset[w].eval != P_INS) fprintf(fp,",%f", ((WORD *)path->pset[w].a_ptr)->conf); else fprintf(fp,","); if (BF_isSET(path->attrib,PA_HYP_CONF)) if (path->pset[w].eval != P_DEL) fprintf(fp,",%f", ((WORD *)path->pset[w].b_ptr)->conf); else fprintf(fp,","); if (BF_isSET(path->attrib,PA_REF_WEIGHT)) if (path->pset[w].eval != P_INS) fprintf(fp,",%f", ((WORD *)path->pset[w].a_ptr)->weight); else fprintf(fp,","); if (BF_isSET(path->attrib,PA_HYP_WEIGHT)) if (path->pset[w].eval != P_DEL) fprintf(fp,",%f", ((WORD *)path->pset[w].b_ptr)->weight); else fprintf(fp,","); if (w < path->num-1) fprintf(fp,":"); } fprintf(fp,"\n</PATH>\n"); } fprintf(fp,"</SPEAKER>\n"); } fprintf(fp,"</SYSTEM>\n"); } int load_SCORES_sgml(FILE *fp, SCORES **scor, int *nscor, int maxn) { char *proc="load_SCORES_sgml", *msg; int buf_len=100; TEXT *buf, *token; SGML sg; SCORES *tscor=(SCORES *)0; PATH *path = (PATH *)0; int spk=(-1), dbg = 0; int word_aux_fields[50]; int num_word_aux = 0, max_word_aux = 50; alloc_singZ(buf,buf_len,TEXT,'\0'); init_SGML(&sg); while (!feof(fp) && TEXT_ensure_fgets(&buf,&buf_len,fp) != NULL){ if (*buf == '<' && *(buf+1) != '/'){ if (dbg) fprintf(scfp,"%s: Begin %s",proc,buf); if (! add_SGML_tag(&sg,buf)) { msg = rsprintf("Unable to parse SGML tag '%s'",buf); goto FAIL; } if (dbg) dump_SGML_tag(&sg,sg.num_tags-1,scfp); /* switch on the reasons to begin */ if (TEXT_strcmp(sg.tags[sg.num_tags-1].name,(TEXT *)"SYSTEM")== 0){ TEXT *sga; if (maxn <= *nscor){ msg = rsprintf("SCORE array too small, increase size\n"); goto FAIL; } tscor = SCORES_init((char *) get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"title"),10); sga = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"ref_fname"); if (TEXT_strcmp(sga,(TEXT *)"") != 0) tscor->ref_fname = (char *)TEXT_strdup(sga); sga = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"hyp_fname"); if (TEXT_strcmp(sga,(TEXT *)"") != 0) tscor->hyp_fname = (char *)TEXT_strdup(sga); sga = get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"creation_date"); if (TEXT_strcmp(sga,(TEXT *)"") != 0) tscor->creation_date = (char *)TEXT_strdup(sga); sga = get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"frag_corr"); if (TEXT_strcmp(sga,(TEXT *)"TRUE") == 0) tscor->frag_corr = TRUE; else tscor->frag_corr = FALSE; sga = get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"opt_del"); if (TEXT_strcmp(sga,(TEXT *)"TRUE") == 0) tscor->opt_del = TRUE; else tscor->opt_del = FALSE; sga = get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"weight_ali"); if (TEXT_strcmp(sga,(TEXT *)"TRUE") == 0){ tscor->weight_ali = TRUE; sga = get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"weight_filename"); tscor->weight_file = (char *)TEXT_strdup(sga); } else tscor->weight_ali = FALSE; scor[(*nscor)++] = tscor; spk = (-1); } else if (TEXT_strcmp(sg.tags[sg.num_tags-1].name, (TEXT *)"SPEAKER") ==0){ if (tscor == (SCORES *)0) { msg = rsprintf("SPEAKER tag '%s' found outside%s", buf," of SYSTEM tag"); goto FAIL; } spk = SCORES_get_grp(tscor,(char *) get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"id")); } else if (TEXT_strcmp(sg.tags[sg.num_tags-1].name, (TEXT *)"PATH") == 0){ TEXT *l; if (spk == (-1)){ msg = rsprintf("PATH tag '%s' found outside%s", buf," of SPEAKER tag"); goto FAIL; } path = PATH_alloc(atof((char*) get_SGML_attrib(&sg,sg.num_tags-1, (TEXT*)"word_cnt"))); path->num = 0; l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"labels"); if (TEXT_strcmp(l,(TEXT *)"") != 0) PATH_add_label(path,(char *)l); PATH_add_utt_id(path,(char *)get_SGML_attrib(&sg,sg.num_tags-1, (TEXT *)"id")); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"file"); if (TEXT_strcmp(l,(TEXT *)"") != 0) PATH_add_file(path,(char *)l); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"channel"); if (TEXT_strcmp(l,(TEXT *)"") != 0) PATH_add_channel(path,(char *)l); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"sequence"); if (TEXT_strcmp(l,(TEXT *)"") != 0) path->sequence = atoi((char *)l); else path->sequence = -1; l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"R_T1"); if (TEXT_strcmp(l,(TEXT *)"") != 0){ path->ref_t1 = atof((char *)l); BF_SET(path->attrib,PA_REF_TIMES); } l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"R_T2"); if (TEXT_strcmp(l,(TEXT *)"") != 0) { path->ref_t2 = atof((char *)l); BF_SET(path->attrib,PA_REF_TIMES); } l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"H_T1"); if (TEXT_strcmp(l,(TEXT *)"") != 0) { path->hyp_t1 = atof((char *)l); BF_SET(path->attrib,PA_HYP_TIMES); } l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"H_T2"); if (TEXT_strcmp(l,(TEXT *)"") != 0) { path->hyp_t2 = atof((char *)l); BF_SET(path->attrib,PA_HYP_TIMES); } l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"char_align"); if (TEXT_strcmp(l,(TEXT *)"") != 0) BF_SET(path->attrib,PA_CHAR_ALIGN); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"case_sense"); if (TEXT_strcmp(l,(TEXT *)"") != 0) BF_SET(path->attrib,PA_CASE_SENSE); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"hyp_weight"); if (TEXT_strcmp(l,(TEXT *)"") != 0) BF_SET(path->attrib,PA_HYP_WEIGHT); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"ref_weight"); if (TEXT_strcmp(l,(TEXT *)"") != 0) BF_SET(path->attrib,PA_REF_WEIGHT); l = get_SGML_attrib(&sg,sg.num_tags-1,(TEXT *)"word_aux"); if (TEXT_strcmp(l,(TEXT *)"") != 0){ TEXT *tp = l, *tp2; /* now parse the information in the line */ num_word_aux = 0; while (*tp != '\0'){ if (num_word_aux == max_word_aux) { msg = rsprintf("Too many auxillary word items" " > %d, expand 'max_word_aux'" " and recompile",max_word_aux); goto FAIL; } if ((tp2 = TEXT_strchr(tp,','))==NULL_TEXT){ tp2 = tp + TEXT_strlen(tp); } if (dbg) fprintf(scfp,"%s: Aux str '%s'\n",proc,tp); if (TEXT_strncmp(tp,(TEXT *)"r_t1+t2",7) == 0){ BF_SET(path->attrib,PA_REF_WTIMES); word_aux_fields[num_word_aux++] = PA_REF_WTIMES; } else if (TEXT_strncmp(tp,(TEXT *)"h_t1+t2",7) == 0){ BF_SET(path->attrib,PA_HYP_WTIMES); word_aux_fields[num_word_aux++] = PA_HYP_WTIMES; } else if (TEXT_strncmp(tp,(TEXT *)"r_conf",6) == 0){ BF_SET(path->attrib,PA_REF_CONF); word_aux_fields[num_word_aux++] = PA_REF_CONF; } else if (TEXT_strncmp(tp,(TEXT *)"h_conf",6) == 0){ BF_SET(path->attrib,PA_HYP_CONF); word_aux_fields[num_word_aux++] = PA_HYP_CONF; } else if (TEXT_strncmp(tp,(TEXT *)"r_weight",8) == 0){ BF_SET(path->attrib,PA_REF_WEIGHT); word_aux_fields[num_word_aux++] = PA_REF_WEIGHT; } else if (TEXT_strncmp(tp,(TEXT *)"h_weight",8) == 0){ BF_SET(path->attrib,PA_HYP_WEIGHT); word_aux_fields[num_word_aux++] = PA_HYP_WEIGHT; } else if (TEXT_strncmp(tp,(TEXT *)"h_spkr",6) == 0){ word_aux_fields[num_word_aux++] = PA_HYP_SPKR; } else if (TEXT_strncmp(tp,(TEXT *)"h_isSpkrSub",11) == 0){ word_aux_fields[num_word_aux++] = PA_HYP_ISSPKRSUB; } else { fprintf(scfp,"Warning: Unknown word auxillary inf" "o type '%s'\n",tp); } if (*(tp=tp2) == ',') tp++; } } } else if ((TEXT_strcmp(sg.tags[sg.num_tags-1].name, (TEXT *)"LABEL") == 0) || (TEXT_strcmp(sg.tags[sg.num_tags-1].name, (TEXT *)"CATEGORY") == 0)){ char *x; x = rsprintf(";; %s id=\"%s\" title=\"%s\" desc=\"%s\"\n", sg.tags[sg.num_tags-1].name, get_SGML_attrib(&sg,sg.num_tags-1,(TEXT*)"id"), get_SGML_attrib(&sg,sg.num_tags-1,(TEXT*)"title"), get_SGML_attrib(&sg,sg.num_tags-1,(TEXT*)"desc")); if (tscor == (SCORES *)0) fprintf(stderr,"Warning: %s tag '%s' found outside of SYSTEM flag\n", sg.tags[sg.num_tags-1].name, buf); else parse_input_comment_line(tscor, (TEXT *)x); } } else if (*buf == '<' && *(buf+1) == '/'){ TEXT *endtag; if (dbg) fprintf(scfp,"%s: End %s",proc,buf); if ((endtag = delete_SGML_tag(&sg,buf)) == NULL){ msg = rsprintf("Unable to delete SGML end tag '%s'",buf); goto FAIL; } /* switch on the reasons to END */ if (TEXT_strcmp(endtag,(TEXT *)"SYSTEM") == 0){ tscor = (SCORES *)0; spk = (-1); path = (PATH *)0; } else if (TEXT_strcmp(endtag,(TEXT *)"SPEAKER") ==0){ spk = (-1); path = (PATH *)0; } else if (TEXT_strcmp(endtag,(TEXT *)"PATH") == 0) { add_PATH_score(tscor,path,spk,1); path = (PATH *)0; } free_singarr(endtag,TEXT); } else if (path != (PATH *)0){ WORD *wd1, *wd2; TEXT *p1, *p2, *p3; if (dbg) fprintf(scfp,"%s: DATA %s",proc,buf); token = TEXT_strqtok(buf, (TEXT *)":\n"); while (token != (TEXT *)NULL){ if (dbg) fprintf(scfp,"%s: token %s\n",proc,token); /* pick of the evaluation flag */ switch (*token){ case 'I': { path->pset[path->num].eval = P_INS; break; } case 'D': { path->pset[path->num].eval = P_DEL; break; } case 'S': { path->pset[path->num].eval = P_SUB; break; } case 'C': { path->pset[path->num].eval = P_CORR; break; } case 'M': { path->pset[path->num].eval = P_MRG; break; } case 'T': { path->pset[path->num].eval = P_SPL; break; } default: { msg = rsprintf("Unknown Alignment type '%c'",*token); goto FAIL; } } /* allocate the memory */ path->pset[path->num].a_ptr = wd1 = NULL_WORD; path->pset[path->num].b_ptr = wd2 = NULL_WORD; if (path->pset[path->num].eval != P_INS){ wd1 = new_WORD(NULL_TEXT, -1, 0.0, 0.0, 0.0, NULL_TEXT, NULL_TEXT, 0, 0, -1.0); path->pset[path->num].a_ptr = wd1; } if (path->pset[path->num].eval != P_DEL){ wd2 = new_WORD(NULL_TEXT, -1, 0.0, 0.0, 0.0, NULL_TEXT, NULL_TEXT, 0, 0, -1.0); path->pset[path->num].b_ptr = wd2; } /* begin parsing elements of the line */ p1 = token + 1; /* skip over the evaluation id */ /* extract the first word */ if (path->pset[path->num].eval == P_INS){ /* skip the the first element */ if (*(p1+1) != ','){ msg = rsprintf("Word parse error, at %s of %s", p1,token); goto FAIL; } p1++; } else { if (*(p1+1) != '"') { msg = rsprintf("Word parse error, at %s of %s", p1,token); goto FAIL; } p2 = TEXT_strchr(p1+2,'"'); wd1->value = TEXT_strndup(p1+2,p2 - (p1+2)); p1 = p2+1; if (dbg) fprintf(scfp,"%s: first word '%s'\n",proc,wd1->value); } /* extract the second word */ if (path->pset[path->num].eval == P_DEL){ /* skip the the second element */ if (*(++p1) != ',' && *p1 != '\0'){ msg = rsprintf("Word parse error, at %s",token); goto FAIL; } } else { if (*(p1+1) != '"') { msg = rsprintf("Word parse error, at %s",token); goto FAIL; } p2 = TEXT_strchr(p1+2,'"'); wd2->value = TEXT_strndup(p1+2,p2 - (p1+2)); p1 = p2+1; if (dbg) fprintf(scfp,"%s: second word '%s'\n", proc,wd2->value); } if (*p1 != '\0' && num_word_aux == 0){ fprintf(scfp,"Warning: Auxillary word values exist, but no" "ne have been defined in the 'word_aux' field\n"); } if (num_word_aux > 0){ int aux_val = 0; while (*p1 != '\0') { if (aux_val == num_word_aux){ fprintf(scfp,"Warning: More auxillary word values " "than defined\n"); } /* handle the auxilliary values */ if ((p2 = TEXT_strchr(p1+1,',')) == NULL_TEXT) p2 = p1 + TEXT_strlen(p1); if (p2 == p1+1) { p1++; /* an empty item */ } else { TEXT save = *p2; *p2 = '\0'; switch(word_aux_fields[aux_val]){ case PA_REF_WTIMES: if (path->pset[path->num].eval != P_INS){ if ((p3 = TEXT_strchr(p1,'+'))==NULL_TEXT){ msg = rsprintf("Illegal auxillary time" " format '%s'",p1); } *p3 = '\0'; ((WORD *)path->pset[path->num].a_ptr)->T1 = atof((char *)p1+1); ((WORD *)path->pset[path->num].a_ptr)->T2 = atof((char *)p3+1); *p3 = '+'; } break; case PA_HYP_WTIMES: if (path->pset[path->num].eval != P_DEL){ if ((p3 = TEXT_strchr(p1,'+'))==NULL_TEXT){ msg = rsprintf("Illegal auxillary time" " format '%s'",p1); } *p3 = '\0'; ((WORD *)path->pset[path->num].b_ptr)->T1 = atof((char *)p1+1); ((WORD *)path->pset[path->num].b_ptr)->T2 = atof((char *)p3+1); *p3 = '+'; } break; case PA_REF_CONF: if (path->pset[path->num].eval != P_INS) ((WORD *)path->pset[path->num].a_ptr)->conf = atof((char *)p1+1); break; case PA_HYP_CONF: if (path->pset[path->num].eval != P_DEL) ((WORD *)path->pset[path->num].b_ptr)->conf = atof((char *)p1+1); break; case PA_REF_WEIGHT: if (path->pset[path->num].eval != P_INS) ((WORD *)path->pset[path->num].a_ptr)->weight = atof((char *)p1+1); break; case PA_HYP_WEIGHT: if (path->pset[path->num].eval != P_DEL) ((WORD *)path->pset[path->num].b_ptr)->weight = atof((char *)p1+1); break; case PA_HYP_SPKR: break; case PA_HYP_ISSPKRSUB: break; default: fprintf(stderr,"Warning: Unknown auxillary fiel" "d type\n"); } *p2 = save; p1 = p2; } aux_val ++; } } path->num++; if (dbg) printf("\n"); token = TEXT_strqtok((TEXT *)0, (TEXT *)":\n"); } } else { printf("%s: Ignored data outside of PATH tag\n%s",proc,buf); } } free_singarr(buf,TEXT); return 1; FAIL: fprintf(scfp,"Error: %s %s\n",proc,msg); return(0); } int SCORES_get_grp(SCORES *sc, char *grpname){ int i; GRP *tgrp; for (i=0; i<sc->num_grp; i++) if (strcmp(grpname,sc->grp[i].name) == 0) return(i); /* add this one to the list, allocating a new group */ if (sc->num_grp+1 >= sc->max_grp) { /* allocate extra space */ alloc_singarr(tgrp,(int)(sc->max_grp * 1.5),GRP); memcpy(tgrp,sc->grp,sizeof(GRP) * sc->num_grp); free_singarr(sc->grp,GRP); sc->grp = tgrp; sc->max_grp = (int)(sc->max_grp * 1.5); } sc->grp[sc->num_grp].name = (char *)TEXT_strdup((TEXT *)grpname); sc->grp[sc->num_grp].corr = 0; sc->grp[sc->num_grp].ins = 0; sc->grp[sc->num_grp].del = 0; sc->grp[sc->num_grp].sub = 0; sc->grp[sc->num_grp].merges = 0; sc->grp[sc->num_grp].splits = 0; sc->grp[sc->num_grp].weight_ref = 0; sc->grp[sc->num_grp].weight_corr = 0; sc->grp[sc->num_grp].weight_ins = 0; sc->grp[sc->num_grp].weight_del = 0; sc->grp[sc->num_grp].weight_sub = 0; sc->grp[sc->num_grp].weight_merges = 0; sc->grp[sc->num_grp].weight_splits = 0; sc->grp[sc->num_grp].nsent = 0; sc->grp[sc->num_grp].serr = 0; sc->grp[sc->num_grp].max_path = 20; sc->grp[sc->num_grp].num_path = 0; alloc_singarr(sc->grp[sc->num_grp].path, sc->grp[sc->num_grp].max_path,PATH *); sc->num_grp ++; return(sc->num_grp -1); } SCORES *SCORES_init(char *name, int ngrp){ SCORES *sc; if (ngrp < 20) ngrp = 20; alloc_singarr(sc,1,SCORES); sc->title = (char *)TEXT_strdup((TEXT *)name); sc->max_grp = ngrp; sc->num_grp = 0; sc->ref_fname = NULL; sc->hyp_fname = NULL; sc->frag_corr = FALSE; sc->opt_del = FALSE; sc->weight_ali = FALSE; sc->weight_file = (char *)0; sc->creation_date = NULL; alloc_singarr(sc->grp,ngrp,GRP); sc->aset.max_plab = 10; sc->aset.num_plab = 0; alloc_singarr(sc->aset.plab,sc->aset.max_plab,PATHLABEL_ITEM); sc->aset.max_cat = 10; sc->aset.num_cat = 0; alloc_singarr(sc->aset.cat,sc->aset.max_cat,CATEGORY_ITEM); return(sc); } void SCORES_free(SCORES *scor){ int i, p; GRP *gp; free_singarr(scor->title,char); if (scor->ref_fname) free_singarr(scor->ref_fname,char); if (scor->hyp_fname) free_singarr(scor->hyp_fname,char); if (scor->creation_date) free_singarr(scor->creation_date,char); for (i=0; i<scor->num_grp; i++){ gp = &(scor->grp[i]); free_singarr(gp->name,char); for (p=0; p<gp->num_path; p++) PATH_free(gp->path[p]); free_singarr(gp->path,PATH *) } free_singarr(scor->grp,GRP); for (i=0; i<scor->aset.num_plab; i++){ if (scor->aset.plab[i].id != (char *)0) free_singarr(scor->aset.plab[i].id,char); if (scor->aset.plab[i].title != (char *)0) free_singarr(scor->aset.plab[i].title,char); if (scor->aset.plab[i].desc != (char *)0) free_singarr(scor->aset.plab[i].desc,char); } free_singarr(scor->aset.plab,PATHLABEL_ITEM); for (i=0; i<scor->aset.num_cat; i++){ if (scor->aset.cat[i].id != (char *)0) free_singarr(scor->aset.cat[i].id,char); if (scor->aset.cat[i].title != (char *)0) free_singarr(scor->aset.cat[i].title,char); if (scor->aset.cat[i].desc != (char *)0) free_singarr(scor->aset.cat[i].desc,char); } free_singarr(scor->aset.cat,CATEGORY_ITEM); if (scor->weight_file != (char *)0) free_singarr(scor->weight_file,char); free_singarr(scor,SCORES); } int find_PATHLABEL_id(SCORES *sc, char *id){ int i; for (i=0; i<sc->aset.num_plab; i++){ if (TEXT_strcasecmp((TEXT*)sc->aset.plab[i].id,(TEXT*)id) == 0) return i; } return -1; } /* returns true if buf is a comment line. If it is, check to see if */ /* there is any information in the comment line to extract! */ int parse_input_comment_line(SCORES *sc, TEXT *buf){ TEXT *bq, *eq; int dup, n; if (! TEXT_is_comment(buf)) return(0); if (TEXT_strncmp(buf,(TEXT *)";; LABEL ",9) == 0) { /* parse the label line */ if (sc->aset.num_plab == sc->aset.max_plab){ expand_singarr(sc->aset.plab,sc->aset.num_plab, sc->aset.max_plab,2,PATHLABEL_ITEM); } /* locate the id token */ if ((bq = TEXT_strchr(buf,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.plab[sc->aset.num_plab].id = (char *)TEXT_strndup(bq+1,eq-bq-1); /* the title */ if ((bq = TEXT_strchr(eq+1,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.plab[sc->aset.num_plab].title = (char *)TEXT_strndup(bq+1,eq-bq-1); /* the Description */ if ((bq = TEXT_strchr(eq+1,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.plab[sc->aset.num_plab].desc = (char *)TEXT_strndup(bq+1,eq-bq-1); /* before we increment the counter, let's make sure this is not a duplicate entry */ for (n=0, dup=0; n < sc->aset.num_plab; n++){ if ((TEXT_strcmp((TEXT*)sc->aset.plab[sc->aset.num_plab].id, (TEXT*)sc->aset.plab[n].id) == 0) && (TEXT_strcmp((TEXT*)sc->aset.plab[sc->aset.num_plab].title, (TEXT*)sc->aset.plab[n].title) == 0) && (TEXT_strcmp((TEXT*)sc->aset.plab[sc->aset.num_plab].desc, (TEXT*)sc->aset.plab[n].desc) == 0)) dup = 1; } if (dup == 0) sc->aset.num_plab++; else { /* free what was just created */ TEXT_free((TEXT*)sc->aset.plab[sc->aset.num_plab].id); TEXT_free((TEXT*)sc->aset.plab[sc->aset.num_plab].title); TEXT_free((TEXT*)sc->aset.plab[sc->aset.num_plab].desc); } } else if (TEXT_strncmp(buf,(TEXT *)";; CATEGORY ",12) == 0) { /* parse the category line */ if (sc->aset.num_cat == sc->aset.max_cat){ printf("Expanding\n"); expand_singarr(sc->aset.cat,sc->aset.num_cat, sc->aset.max_cat,2,CATEGORY_ITEM); } /* locate the id token */ if ((bq = TEXT_strchr(buf,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.cat[sc->aset.num_cat].id = (char *)TEXT_strndup(bq+1,eq-bq-1); /* the title */ if ((bq = TEXT_strchr(eq+1,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.cat[sc->aset.num_cat].title = (char *)TEXT_strndup(bq+1,eq-bq-1); /* the Description */ if ((bq = TEXT_strchr(eq+1,(TEXT)'"')) == NULL) goto FAILED; if ((eq = TEXT_strchr(bq+1,(TEXT)'"')) == NULL) goto FAILED; sc->aset.cat[sc->aset.num_cat].desc = (char *)TEXT_strndup(bq+1,eq-bq-1); /* before we increment the counter, let's make sure this is not a duplicate entry */ for (n=0, dup=0; n < sc->aset.num_cat; n++){ if ((TEXT_strcmp((TEXT*)sc->aset.cat[sc->aset.num_cat].id, (TEXT*)sc->aset.cat[n].id) == 0) && (TEXT_strcmp((TEXT*)sc->aset.cat[sc->aset.num_cat].title, (TEXT*)sc->aset.cat[n].title) == 0) && (TEXT_strcmp((TEXT*)sc->aset.cat[sc->aset.num_cat].desc, (TEXT*)sc->aset.cat[n].desc) == 0)) dup = 1; } if (dup == 0) sc->aset.num_cat++; else { /* free what was just created */ TEXT_free((TEXT*)sc->aset.cat[sc->aset.num_cat].id); TEXT_free((TEXT*)sc->aset.cat[sc->aset.num_cat].title); TEXT_free((TEXT*)sc->aset.cat[sc->aset.num_cat].desc); } } goto FINISHED; FAILED: FINISHED: return(1); } void load_comment_labels_from_file(SCORES *scor, char *labfile){ FILE *fp; int len=100; TEXT *buf; alloc_singZ(buf,len,TEXT,(TEXT)0); if ((fp = fopen(labfile,"r")) == NULL) return; while (TEXT_ensure_fgets(&buf, &len, fp) != NULL) parse_input_comment_line(scor, buf); fclose(fp); free_singarr(buf,TEXT); } void add_PATH_score(SCORES *sc, PATH *path, int g, int keep_path){ int i, err=0; for (i=0; i<path->num; i++){ if (path->pset[i].eval == P_INS){ sc->grp[g].ins ++; sc->grp[g].weight_ins += ((WORD*)(path->pset[i].b_ptr))->weight; err++; } else if (path->pset[i].eval == P_DEL){ sc->grp[g].del ++; sc->grp[g].weight_del += ((WORD*)(path->pset[i].a_ptr))->weight; sc->grp[g].weight_ref += ((WORD*)(path->pset[i].a_ptr))->weight; err++; } else if (path->pset[i].eval == P_CORR){ sc->grp[g].corr ++; sc->grp[g].weight_ref += ((WORD*)(path->pset[i].a_ptr))->weight; sc->grp[g].weight_corr += ((WORD*)(path->pset[i].b_ptr))->weight; } else if (path->pset[i].eval == P_SUB){ sc->grp[g].sub ++; sc->grp[g].weight_sub += ((WORD*)(path->pset[i].a_ptr))->weight + ((WORD*)(path->pset[i].b_ptr))->weight; sc->grp[g].weight_ref += ((WORD*)(path->pset[i].a_ptr))->weight; err++; } else { printf("Warning: Unknown Alignment Evaluation %d\n", path->pset[i].eval); } } sc->grp[g].nsent ++; if (err > 0) sc->grp[g].serr ++; if (keep_path){ if (sc->grp[g].num_path + 1 >= sc->grp[g].max_path){ /* Expand the array */ expand_singarr(sc->grp[g].path,sc->grp[g].num_path, sc->grp[g].max_path,2,PATH *) } sc->grp[g].path[sc->grp[g].num_path++] = path; } } /************************************************************************/ /* print the report for the entire system. */ /************************************************************************/ void print_system_summary(SCORES *sc, char *sys_root_name, int do_sm, int do_raw, int do_weighted, int feedback) { int spkr, tot_corr=0, tot_sub=0, tot_del=0; int total_sents=0, char_align=0, np=0; FILE *fp; char *fname; /* added by Brett to compute mean, variance, and standard dev */ double *corr_arr, *sub_arr, *del_arr, *ins_arr, *err_arr, *serr_arr; double *spl_arr, *mrg_arr, *nce_arr; int tot_ins=0, tot_ref =0, tot_st=0, tot_st_er=0; int tot_spl=0, tot_mrg=0, tot_word=0; double median_corr, median_del, median_ins, median_sub, median_err; double median_spl, median_mrg, median_serr, median_nce; double mean_corr, mean_del, mean_ins, mean_sub, mean_err, mean_serr; double mean_spl, mean_mrg, mean_nce; double var_corr, var_del, var_ins, var_sub, var_err, var_serr; double var_spl, var_mrg, var_nce; double sd_corr, sd_del, sd_ins, sd_sub, sd_err, sd_serr; double sd_spl, sd_mrg, sd_nce; double Z_stat; int *sent_num_arr, *word_num_arr; double mean_sent_num, var_sent_num, sd_sent_num, median_sent_num, Z_stat_fl; double mean_word_num, var_word_num, sd_word_num, median_word_num; char *pct_fmt, *tot_pct_fmt, *spkr_fmt=" %s ", *sent_fmt="%5d", *Zpct_fmt; char *tot_Zpct_fmt, *tpct_fmt; int prec, tprec; int Zero_spkr = 0; char *Znce_fmt; char *nce_fmt; int nce_prec; double nce_system = 0.0; int has_hyp_conf = 0, not_has_hyp_conf = 0; /* scan through the set of results, looking at the path */ /* attributes. If any of the paths have the confidence attribute */ /* set, set the variable 'has_hyp_conf' to 1. This adds */ /* the normalized cross-entropy statistic to the output report */ for (spkr=0; spkr<sc->num_grp; spkr++){ for (np=0; np<sc->grp[spkr].num_path; np++){ if (BF_isSET(sc->grp[spkr].path[np]->attrib,PA_HYP_CONF)) has_hyp_conf=1; else not_has_hyp_conf = 1; } } /* if some segments have confidences, and some do not, ignore the */ /* confidence scores */ if (has_hyp_conf == 1 && not_has_hyp_conf == 1){ has_hyp_conf = 0; fprintf(stderr,"Warning: Ignoring confidence scores in output\n"); } /* allocate memory */ alloc_singZ(corr_arr,sc->num_grp,double,0.0); alloc_singZ(sub_arr,sc->num_grp,double,0.0); alloc_singZ(del_arr,sc->num_grp,double,0.0); alloc_singZ(ins_arr,sc->num_grp,double,0.0); alloc_singZ(err_arr,sc->num_grp,double,0.0); alloc_singZ(serr_arr,sc->num_grp,double,0.0); alloc_singZ(spl_arr,sc->num_grp,double,0.0); alloc_singZ(mrg_arr,sc->num_grp,double,0.0); alloc_singZ(nce_arr,sc->num_grp,double,0.0); alloc_singZ(sent_num_arr,sc->num_grp,int,0); alloc_singZ(word_num_arr,sc->num_grp,int,0.0); for (spkr=0; spkr<sc->num_grp; spkr++){ double Trefs; if (! do_weighted) Trefs = sc->grp[spkr].sub + sc->grp[spkr].corr + sc->grp[spkr].del + sc->grp[spkr].merges + sc->grp[spkr].splits; else Trefs = sc->grp[spkr].weight_ref; if (do_raw || Trefs == 0){ corr_arr[spkr] = sc->grp[spkr].corr; sub_arr[spkr] = sc->grp[spkr].sub; ins_arr[spkr] = sc->grp[spkr].ins; del_arr[spkr] = sc->grp[spkr].del; mrg_arr[spkr] = sc->grp[spkr].merges; spl_arr[spkr] = sc->grp[spkr].splits; err_arr[spkr] = sc->grp[spkr].sub+sc->grp[spkr].ins+ sc->grp[spkr].del+sc->grp[spkr].merges+sc->grp[spkr].splits; } else { if (! do_weighted){ corr_arr[spkr] = pct(sc->grp[spkr].corr,Trefs); sub_arr[spkr] = pct(sc->grp[spkr].sub,Trefs); ins_arr[spkr] = pct(sc->grp[spkr].ins,Trefs); del_arr[spkr] = pct(sc->grp[spkr].del,Trefs); mrg_arr[spkr] = pct(sc->grp[spkr].merges,Trefs); spl_arr[spkr] = pct(sc->grp[spkr].splits,Trefs); err_arr[spkr] = pct(sc->grp[spkr].sub+sc->grp[spkr].ins+ sc->grp[spkr].del+sc->grp[spkr].merges+ sc->grp[spkr].splits,Trefs); } else { corr_arr[spkr] = pct(sc->grp[spkr].weight_corr,Trefs); sub_arr[spkr] = pct(sc->grp[spkr].weight_sub,Trefs); ins_arr[spkr] = pct(sc->grp[spkr].weight_ins,Trefs); del_arr[spkr] = pct(sc->grp[spkr].weight_del,Trefs); mrg_arr[spkr] = pct(sc->grp[spkr].weight_merges,Trefs); spl_arr[spkr] = pct(sc->grp[spkr].weight_splits,Trefs); err_arr[spkr] = pct(sc->grp[spkr].weight_sub+sc->grp[spkr].weight_ins+ sc->grp[spkr].weight_del+sc->grp[spkr].weight_merges+ sc->grp[spkr].weight_splits,Trefs); } } if (do_raw) serr_arr[spkr] = sc->grp[spkr].serr; else serr_arr[spkr] = pct(sc->grp[spkr].serr,sc->grp[spkr].nsent); sent_num_arr[spkr]=sc->grp[spkr].nsent; word_num_arr[spkr] =sc->grp[spkr].corr+ sc->grp[spkr].sub + sc->grp[spkr].del; tot_corr+= (! do_weighted) ? sc->grp[spkr].corr : sc->grp[spkr].weight_corr; tot_sub+= (! do_weighted) ? sc->grp[spkr].sub : sc->grp[spkr].weight_sub; tot_del+= (! do_weighted) ? sc->grp[spkr].del : sc->grp[spkr].weight_del; tot_ins+= (! do_weighted) ? sc->grp[spkr].ins : sc->grp[spkr].weight_ins; tot_ref+= Trefs; tot_spl+= (! do_weighted) ? sc->grp[spkr].splits : sc->grp[spkr].weight_splits; tot_mrg+= (! do_weighted) ? sc->grp[spkr].merges : sc->grp[spkr].weight_merges; tot_st_er+= sc->grp[spkr].serr; tot_st+= sc->grp[spkr].nsent; tot_word+= word_num_arr[spkr]; total_sents+=sc->grp[spkr].nsent; /* test to see if any if the paths are character alignments */ for (np=0; np<sc->grp[spkr].num_path && char_align==0; np++) if (BF_isSET(sc->grp[spkr].path[np]->attrib,PA_CHAR_ALIGN)) char_align=1; } if (has_hyp_conf == 1) compute_SCORE_nce(sc, &nce_system, nce_arr); nce_fmt = "%7.3f "; nce_prec = 3; Znce_fmt = "%7.3f#"; Zpct_fmt = "%5.0f*"; tot_Zpct_fmt = "%5.1f+"; if (!do_raw){ pct_fmt = tot_pct_fmt = "%5.1f "; prec = tprec = 1; } else { pct_fmt="%5.0f "; prec = 0; tot_pct_fmt="%5.1f "; tprec = 1; } /* open an output file, if it fails, write to stdout */ if (strcmp(sys_root_name,"-") == 0 || (fp = fopen(fname=rsprintf("%s.%s",sys_root_name, (do_weighted) ? "wws" : ((do_raw) ? "raw" : "sys")),"w")) == NULL) fp = stdout; else if (feedback >= 1) printf(" Writing %sscoring report to '%s'\n", do_raw ? "raw " : "", fname); fprintf(fp,"\n\n\n%s\n\n", center("SYSTEM SUMMARY PERCENTAGES by SPEAKER",SCREEN_WIDTH)); if (do_weighted){ fprintf(fp,"\n\n%s\n", center("**********************************************************************", SCREEN_WIDTH)); fprintf(fp,"%s\n", center("***** Word Percentages Computed using Weighted Word Scoring *****", SCREEN_WIDTH)); fprintf(fp,"%s\n\n", center("**********************************************************************", SCREEN_WIDTH)); fprintf(fp,"%s\n\n", center(rsprintf("** Weights defined by file: '%s'", sc->weight_file),SCREEN_WIDTH)); } if (!do_sm && (tot_spl + tot_mrg) > 0) fprintf(fp,"\nWarning: Split and/or Merges found, but not reported\n"); Desc_erase(); Desc_set_page_center(SCREEN_WIDTH); Desc_add_row_values("c",sc->title); Desc_add_row_separation('-',BEFORE_ROW); if (has_hyp_conf == 0){ if (do_sm) Desc_add_row_values("l|cc|cccccccc"," SPKR"," # Snt", (char_align) ? "# Chr" : "# Wrd","Corr", " Sub"," Del"," Ins"," Mrg"," Spl"," Err","S.Err"); else Desc_add_row_values("l|cc|cccccc"," SPKR"," # Snt", (char_align) ? "# Chr" : "# Wrd","Corr", " Sub"," Del"," Ins"," Err","S.Err"); } else { if (do_sm) Desc_add_row_values("l|cc|cccccccc|c"," SPKR"," # Snt", (char_align) ? "# Chr" : "# Wrd","Corr", " Sub"," Del"," Ins"," Mrg"," Spl"," Err","S.Err", "NCE"); else Desc_add_row_values("l|cc|cccccc|c"," SPKR"," # Snt", (char_align) ? "# Chr" : "# Wrd","Corr", " Sub"," Del"," Ins"," Err","S.Err","NCE"); } for (spkr=0; spkr<sc->num_grp; spkr++){ Desc_add_row_separation('-',BEFORE_ROW); if (! has_hyp_conf){ if (do_sm) Desc_set_iterated_format("l|cc|cccccccc"); else Desc_set_iterated_format("l|cc|cccccc"); } else { if (do_sm) Desc_set_iterated_format("l|cc|cccccccc|c"); else Desc_set_iterated_format("l|cc|cccccc|c"); } Desc_set_iterated_value(rsprintf(spkr_fmt,sc->grp[spkr].name)); Desc_set_iterated_value(rsprintf(sent_fmt,sent_num_arr[spkr])); Desc_set_iterated_value(rsprintf(sent_fmt,word_num_arr[spkr])); if ((word_num_arr[spkr] > 0 && !do_raw) || do_raw){ Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(corr_arr[spkr],prec))); Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(sub_arr[spkr],prec))); Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(del_arr[spkr],prec))); Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(ins_arr[spkr],prec))); if (do_sm){ Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(mrg_arr[spkr],prec))); Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(spl_arr[spkr],prec))); } Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(err_arr[spkr],prec))); } else { Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(corr_arr[spkr],0))); Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(sub_arr[spkr],0))); Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(del_arr[spkr],0))); Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(ins_arr[spkr],0))); if (do_sm){ Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(mrg_arr[spkr],0))); Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(spl_arr[spkr],0))); } Desc_set_iterated_value(rsprintf(Zpct_fmt, F_ROUND(err_arr[spkr],0))); Zero_spkr++; } Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(serr_arr[spkr],prec))); if (has_hyp_conf) if (word_num_arr[spkr] > 0){ Desc_set_iterated_value(rsprintf(nce_fmt, F_ROUND(nce_arr[spkr],nce_prec))); } else { Desc_set_iterated_value(rsprintf("# ")); } Desc_flush_iterated_row(); } Desc_add_row_separation('=',BEFORE_ROW); if (! has_hyp_conf){ if (do_sm) Desc_set_iterated_format("l|cc|cccccccc"); else Desc_set_iterated_format("l|cc|cccccc"); } else { if (do_sm) Desc_set_iterated_format("l|cc|cccccccc|c"); else Desc_set_iterated_format("l|cc|cccccc|c"); } if (!do_raw){ Desc_set_iterated_value(" Sum/Avg"); Desc_set_iterated_value(rsprintf(sent_fmt,tot_st)); Desc_set_iterated_value(rsprintf(sent_fmt,tot_word)); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(pct(tot_corr,tot_ref),tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(pct(tot_sub,tot_ref),tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(pct(tot_del,tot_ref),tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(pct(tot_ins,tot_ref),tprec))); if (do_sm){ Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND( pct(tot_mrg,tot_ref),tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND( pct(tot_spl,tot_ref),tprec))); } Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND( pct(tot_sub + tot_ins + tot_del + tot_spl + tot_mrg,tot_ref),tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(pct(tot_st_er,tot_st),tprec))); if (has_hyp_conf) Desc_set_iterated_value(rsprintf(nce_fmt,F_ROUND(nce_system,nce_prec))); Desc_flush_iterated_row(); } else { Desc_set_iterated_value(" Sum"); Desc_set_iterated_value(rsprintf(sent_fmt,tot_st)); Desc_set_iterated_value(rsprintf(sent_fmt,tot_word)); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_corr,prec))); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_sub,prec))); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_del,prec))); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_ins,prec))); if (do_sm){ Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_mrg,prec))); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_spl,prec))); } Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)(tot_sub + tot_ins + tot_del + tot_spl + tot_mrg),prec))); Desc_set_iterated_value(rsprintf(pct_fmt,F_ROUND((double)tot_st_er,prec))); if (has_hyp_conf) Desc_set_iterated_value(rsprintf(nce_fmt,F_ROUND(nce_system,nce_prec))); Desc_flush_iterated_row(); } /* added by Brett to compute mean, variance, and standard dev */ if (Zero_spkr > 0) { /* remove any speakers data if word_num_arr[spkr] is 0 */ for (spkr=0; spkr<sc->num_grp; spkr++){ if (word_num_arr[spkr] == 0) { int s2; /* shift up the speakers data to fill this one */ for (s2=spkr; s2 < sc->num_grp-1; s2++){ corr_arr[s2] = corr_arr[s2+1]; sub_arr[s2] = sub_arr[s2+1]; ins_arr[s2] = ins_arr[s2+1]; del_arr[s2] = del_arr[s2+1]; err_arr[s2] = err_arr[s2+1]; } corr_arr[sc->num_grp-1] = -1000.0; sub_arr[sc->num_grp-1] = -1000.0; ins_arr[sc->num_grp-1] = -1000.0; del_arr[sc->num_grp-1] = -1000.0; err_arr[sc->num_grp-1] = -1000.0; } } } calc_mean_var_std_dev_Zstat(sent_num_arr,sc->num_grp, &mean_sent_num,&var_sent_num,&sd_sent_num, &median_sent_num, &Z_stat_fl); calc_mean_var_std_dev_Zstat(word_num_arr,sc->num_grp, &mean_word_num,&var_word_num,&sd_word_num, &median_word_num, &Z_stat_fl); calc_mean_var_std_dev_Zstat_double(corr_arr,sc->num_grp - Zero_spkr, &mean_corr,&var_corr,&sd_corr,&median_corr, &Z_stat); calc_mean_var_std_dev_Zstat_double(sub_arr,sc->num_grp - Zero_spkr, &mean_sub,&var_sub,&sd_sub,&median_sub, &Z_stat); calc_mean_var_std_dev_Zstat_double(ins_arr,sc->num_grp - Zero_spkr, &mean_ins,&var_ins,&sd_ins,&median_ins,&Z_stat); calc_mean_var_std_dev_Zstat_double(del_arr,sc->num_grp - Zero_spkr, &mean_del,&var_del,&sd_del,&median_del,&Z_stat); calc_mean_var_std_dev_Zstat_double(spl_arr,sc->num_grp - Zero_spkr, &mean_spl,&var_spl,&sd_spl,&median_spl,&Z_stat); calc_mean_var_std_dev_Zstat_double(mrg_arr,sc->num_grp - Zero_spkr, &mean_mrg,&var_mrg,&sd_mrg,&median_mrg,&Z_stat); calc_mean_var_std_dev_Zstat_double(err_arr,sc->num_grp - Zero_spkr, &mean_err,&var_err,&sd_err,&median_err,&Z_stat); calc_mean_var_std_dev_Zstat_double(serr_arr,sc->num_grp, &mean_serr,&var_serr,&sd_serr,&median_serr,&Z_stat); calc_mean_var_std_dev_Zstat_double(nce_arr,sc->num_grp, &mean_nce,&var_nce,&sd_nce,&median_nce,&Z_stat); Desc_add_row_separation('=',BEFORE_ROW); if (has_hyp_conf == 0){ if (do_sm) Desc_set_iterated_format("c|cc|cccccccc"); else Desc_set_iterated_format("c|cc|cccccc"); } else { if (do_sm) Desc_set_iterated_format("c|cc|cccccccc|c"); else Desc_set_iterated_format("c|cc|cccccc|c"); } Desc_set_iterated_value(" Mean "); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(mean_sent_num,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(mean_word_num,tprec))); tpct_fmt = tot_pct_fmt; if (Zero_spkr > 0) tpct_fmt = tot_Zpct_fmt; Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_corr,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_sub,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_del,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_ins,tprec))); if (do_sm){ Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_spl,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_mrg,tprec))); } Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(mean_err,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(mean_serr,tprec))); if (has_hyp_conf) Desc_set_iterated_value(rsprintf((Zero_spkr == 0) ? nce_fmt : Znce_fmt,F_ROUND(mean_nce,nce_prec))); Desc_flush_iterated_row(); if (has_hyp_conf == 0){ if (do_sm) Desc_set_iterated_format("c|cc|cccccccc"); else Desc_set_iterated_format("c|cc|cccccc"); } else { if (do_sm) Desc_set_iterated_format("c|cc|cccccccc|c"); else Desc_set_iterated_format("c|cc|cccccc|c"); } Desc_set_iterated_value(" S.D. "); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(sd_sent_num,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(sd_word_num,tprec))); tpct_fmt = tot_pct_fmt; if (Zero_spkr > 0) tpct_fmt = tot_Zpct_fmt; Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_corr,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_sub,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_del,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_ins,tprec))); if (do_sm){ Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_spl,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_mrg,tprec))); } Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(sd_err,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(sd_serr,tprec))); if (has_hyp_conf) Desc_set_iterated_value(rsprintf((Zero_spkr == 0) ? nce_fmt : Znce_fmt,F_ROUND(sd_nce,nce_prec))); Desc_flush_iterated_row(); if (has_hyp_conf == 0){ if (do_sm) Desc_set_iterated_format("c|cc|cccccccc"); else Desc_set_iterated_format("c|cc|cccccc"); } else { if (do_sm) Desc_set_iterated_format("c|cc|cccccccc|c"); else Desc_set_iterated_format("c|cc|cccccc|c"); } Desc_set_iterated_value("Median"); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(median_sent_num,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(median_word_num,tprec))); tpct_fmt = tot_pct_fmt; if (Zero_spkr > 0) tpct_fmt = tot_Zpct_fmt; Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_corr,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_sub,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_del,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_ins,tprec))); if (do_sm){ Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_spl,tprec))); Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_mrg,tprec))); } Desc_set_iterated_value(rsprintf(tpct_fmt,F_ROUND(median_err,tprec))); Desc_set_iterated_value(rsprintf(tot_pct_fmt,F_ROUND(median_serr,tprec))); if (has_hyp_conf) Desc_set_iterated_value(rsprintf((Zero_spkr == 0) ? nce_fmt : Znce_fmt,F_ROUND(median_nce,nce_prec))); Desc_flush_iterated_row(); Desc_dump_report(0,fp); if (Zero_spkr && !do_raw) fprintf(fp,"\n" "* No Reference words for this/these speaker(s). Word counts supplied\n" " rather than percents.\n" "# No Reference words for this/these speaker(s). NCE not computable.\n" "+ Speaker(s) with no reference data is ignored\n"); if (fp != stdout) fclose(fp); free_singarr(corr_arr,double); free_singarr(sub_arr,double); free_singarr(del_arr,double); free_singarr(ins_arr,double); free_singarr(err_arr,double); free_singarr(serr_arr,double); free_singarr(spl_arr,double); free_singarr(mrg_arr,double); free_singarr(nce_arr,double); free_singarr(sent_num_arr,int); free_singarr(word_num_arr,int); } /************************************************************************/ /* print the report for the entire system. */ /************************************************************************/ void print_N_system_summary(SCORES *sc[], int nsc, char *out_root_name, char *test_name, int do_raw, int feedback) { int s, g; FILE *fp; char *fname, lfmt[50], dfmt[50], *tot_pct_fmt, *pct_fmt; int prec, tprec, l; int **wcount; double **errs; if (!do_raw){ pct_fmt=tot_pct_fmt="%6.1f "; prec = tprec = 1; } else { pct_fmt="%5.0f "; prec = 0; tot_pct_fmt="%5.1f "; tprec = 1; } /* open an output file, if it fails, write to stdout */ if (strcmp(out_root_name,"-") == 0 || (fp = fopen(fname=rsprintf("%s.%s",out_root_name, (do_raw) ? "raw" : "sys"),"w")) == NULL) fp = stdout; else if (feedback >= 1) printf(" Writing %sscoring report to '%s'\n", do_raw ? "raw " : "", fname); /* allocate memory, make enough room to contain the mean, variance, stddev, median and Z_stat */ alloc_2dimZ(errs,nsc,sc[0]->num_grp + 5,double,0.0); alloc_2dimZ(wcount,nsc,2,int,0); /* calculate the percentages */ for (s=0; s<nsc; s++) for (g=0; g<sc[s]->num_grp; g++){ GRP *gr = &(sc[s]->grp[g]); if (!do_raw) errs[s][g] = pct((gr->ins + gr->sub + gr->del + gr->splits + gr->merges), (gr->corr + gr->sub + gr->del + gr->splits + gr->merges)); else errs[s][g] = (gr->ins + gr->sub + gr->del + gr->splits + gr->merges); wcount[s][0] += (gr->corr + gr->sub + gr->del + gr->splits + gr->merges); wcount[s][1] += (gr->ins + gr->sub + gr->del + gr->splits + gr->merges); } /* calculate the statistics. The errs array has enough room in it */ /* to containg the mean, variancs, std_dev, median, std_dev and Z_STAT*/ for (s=0; s<nsc; s++) calc_mean_var_std_dev_Zstat_double(errs[s],sc[0]->num_grp, &(errs[s][sc[0]->num_grp]), &(errs[s][sc[0]->num_grp+1]), &(errs[s][sc[0]->num_grp+2]), &(errs[s][sc[0]->num_grp+3]), &(errs[s][sc[0]->num_grp+4])); /* build the format statements */ sprintf(lfmt,"c"); sprintf(dfmt,"l"); for (s=0; s<nsc; s++){ strcat(lfmt,"|c"); strcat(dfmt,"|c"); } /* Write the report */ Desc_erase(); Desc_set_page_center(SCREEN_WIDTH); Desc_add_row_separation(' ',BEFORE_ROW); if (*test_name == (char)'\0') Desc_add_row_separation(' ',AFTER_ROW); if (do_raw) Desc_add_row_values("c","Scoring Summmary of Word Errors by Speaker"); else Desc_add_row_values("c","Scoring Summmary of Percent Word Error by Speaker"); if (*test_name != (char)'\0'){ Desc_add_row_separation(' ',AFTER_ROW); Desc_add_row_values("c",rsprintf("%s Test",test_name)); } /* set the titles */ Desc_add_row_separation('-',BEFORE_ROW); Desc_set_iterated_format(lfmt); Desc_set_iterated_value("Spkr"); for (s=0; s<nsc; s++) Desc_set_iterated_value(sc[s]->title); Desc_flush_iterated_row(); /* Set the data rows */ for (g=0; g<sc[0]->num_grp; g++){ Desc_add_row_separation('-',BEFORE_ROW); Desc_set_iterated_format(dfmt); Desc_set_iterated_value(rsprintf(" %s ",sc[0]->grp[g].name)); for (s=0; s<nsc; s++) Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(errs[s][g],prec))); Desc_flush_iterated_row(); } /* set the overall summation rows */ Desc_add_row_separation('=',BEFORE_ROW); Desc_set_iterated_format(lfmt); if (!do_raw){ Desc_set_iterated_value(" Average "); for (s=0; s<nsc; s++) Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(pct(wcount[s][1],wcount[s][0]), tprec))); } else { Desc_set_iterated_value(" Sum "); for (s=0; s<nsc; s++) Desc_set_iterated_value(rsprintf(pct_fmt, F_ROUND(wcount[s][1],tprec))); } Desc_flush_iterated_row(); Desc_add_row_separation('-',BEFORE_ROW); for (l=0, g=sc[0]->num_grp; g<sc[0]->num_grp+5; l++, g++){ if (l == 1 || l == 4) continue; Desc_set_iterated_format(lfmt); if (l == 0) Desc_set_iterated_value(" Mean "); else if (l == 2) Desc_set_iterated_value(" StdDev "); else if (l == 3) { Desc_add_row_separation(' ',BEFORE_ROW); Desc_set_iterated_value(" Median "); } for (s=0; s<nsc; s++) Desc_set_iterated_value(rsprintf(tot_pct_fmt, F_ROUND(errs[s][g],tprec))); Desc_flush_iterated_row(); } Desc_dump_report(0,fp); if (fp != stdout) fclose(fp); free_2dimarr(errs,nsc,double); free_2dimarr(wcount,nsc,int); } /************************************************************************/ /* print the report for the entire system. */ /************************************************************************/ void print_N_system_executive_summary(SCORES *sc[], int nsc, char *out_root_name, char *test_name, int do_raw, int feedback) { int s, g, one_with_conf = 0; FILE *fp; char *fname, lfmt[50], dfmt[50], pfmt[50]; /* open an output file, if it fails, write to stdout */ if (strcmp(out_root_name,"-") == 0 || (fp = fopen(fname=rsprintf("%s.%s",out_root_name, (do_raw) ? "res" : "es"),"w")) == NULL) fp = stdout; else if (feedback >= 1) printf(" Writing %sexecutive scoring report to '%s'\n", do_raw ? "raw " : "", fname); /* | sys | nUTT nRef | Corr Sub Del Ins Err S.Err | NCE */ /* see if any of the systems has confidence scores */ for (s=0; s<nsc; s++) if (hyp_confidences_available(sc[s])) one_with_conf = 1; /* build the format statements */ sprintf(pfmt,"c|cc|caaaaa"); sprintf(lfmt,"c|cc|cccccc"); sprintf(dfmt,"l|cc|llllll"); if (one_with_conf){ strcat(pfmt,"|c"); strcat(lfmt,"|c"); strcat(dfmt,"|c"); } /* Write the report */ Desc_erase(); Desc_set_page_center(SCREEN_WIDTH); Desc_add_row_separation(' ',BEFORE_ROW); if (*test_name == (char)'\0') Desc_add_row_separation(' ',AFTER_ROW); if (do_raw) Desc_add_row_values("c","Executive Scoring Summary by Word Tokens"); else Desc_add_row_values("c","Executive Scoring Summary by Percentages"); if (*test_name != (char)'\0'){ Desc_add_row_separation(' ',AFTER_ROW); Desc_add_row_values("c",rsprintf("%s Test",test_name)); } Desc_set_iterated_format(lfmt); Desc_set_iterated_value("System"); Desc_set_iterated_value("# Snt"); Desc_set_iterated_value("# Ref"); Desc_set_iterated_value("Corr"); Desc_set_iterated_value("Sub"); Desc_set_iterated_value("Del"); Desc_set_iterated_value("Ins"); Desc_set_iterated_value("Err"); Desc_set_iterated_value("S.Err"); if (one_with_conf) Desc_set_iterated_value("NCE"); Desc_flush_iterated_row(); Desc_add_row_separation('-',BEFORE_ROW); for (s=0; s<nsc; s++){ int tcor, tsub, tins, tdel, tsnt, tserr, tref, terr; tcor = tsub = tins = tdel = tsnt = tserr = 0; Desc_set_iterated_format(lfmt); Desc_set_iterated_value(sc[s]->title); /* calc the scores */ for (g=0; g<sc[s]->num_grp; g++){ GRP *gr = &(sc[s]->grp[g]); tcor += gr->corr; tsub += gr->sub; tins += gr->ins; tdel += gr->del; tsnt += gr->nsent; tserr += gr->serr; } tref = tcor + tsub + tdel; terr = tsub + tdel + tins; Desc_set_iterated_value(rsprintf("%d",tsnt)); Desc_set_iterated_value(rsprintf("%d",tref)); if (!do_raw){ Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(tcor,tref),1))); Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(tsub,tref),1))); Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(tdel,tref),1))); Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(tins,tref),1))); Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(terr,tref),1))); Desc_set_iterated_value(rsprintf("%.1f", F_ROUND(pct(tserr,tsnt),1))); } else { Desc_set_iterated_value(rsprintf("%d",tcor)); Desc_set_iterated_value(rsprintf("%d",tsub)); Desc_set_iterated_value(rsprintf("%d",tdel)); Desc_set_iterated_value(rsprintf("%d",tins)); Desc_set_iterated_value(rsprintf("%d",terr)); Desc_set_iterated_value(rsprintf("%d",tserr)); } if (one_with_conf){ if (hyp_confidences_available(sc[s])){ double nce; compute_SCORE_nce(sc[s], &nce, (double *)0); Desc_set_iterated_value(rsprintf("%.3f",F_ROUND(nce,3))); } else Desc_set_iterated_value("---"); } Desc_flush_iterated_row(); } Desc_dump_report(1,fp); if (fp != stdout) fclose(fp); } char *get_date(void){ time_t t; TEXT *tp; (void) time(&t); tp = TEXT_strdup((TEXT *)ctime(&t)); TEXT_xnewline(tp) return((char *)tp); } void compute_SCORE_nce(SCORES *sc, double *nce_system, double *nce_arr){ /* The single metric for confidence scores is a "normalized cross-entropy": ^ ^ [H(C) + SUM(log Pc) + SUM (log(1-Pc)) ] / H(c) correct incorrect where: H(C) = -[n log p + (N-n)log(1-p)] n = number of correct HYP words N = total number of HYP words p = probability that a given HYP word is correct = n/N */ double phyp_corr; double H_of_C; double sum_c_sys = 0.0, sum_i_sys = 0.0; double sum_c_spk, sum_i_spk; int conf_not_in_range = 0; int spkr, np, tot_corr=0, tot_sub=0, tot_ins=0; /* compute some word count totals */ for (spkr=0; spkr<sc->num_grp; spkr++){ tot_corr+= sc->grp[spkr].corr; tot_sub+= sc->grp[spkr].sub; tot_ins+= sc->grp[spkr].ins; } for (spkr=0; spkr<sc->num_grp; spkr++){ int n_words; n_words = 0; sum_c_spk = sum_i_spk = 0.0; for (np=0; np<sc->grp[spkr].num_path; np++){ PATH *path = sc->grp[spkr].path[np]; int wd; double conf; for (wd=0; wd < path->num; wd++){ if ((path->pset[wd].eval != P_DEL) && (*(((WORD*)path->pset[wd].b_ptr)->value) != (TEXT)'\0')){ conf = ((WORD *)path->pset[wd].b_ptr)->conf; if (conf < 0.0 || conf > 1.0) conf_not_in_range ++; n_words ++; if (conf < 0.0000001) /* make sure there's a floor */ conf = 0.0000001; /* added by JGF, cant take the log of (1.0 - 1.0) */ if (conf > 0.9999999) /* make sure there's a ceiling */ conf = 0.9999999; if (path->pset[wd].eval == P_CORR) sum_c_spk += log(conf) * M_LOG2E; else sum_i_spk += log(1.0 - conf) * M_LOG2E; } } } if (n_words > 0){ phyp_corr = (double)(sc->grp[spkr].corr) / (double)(sc->grp[spkr].sub + sc->grp[spkr].ins + sc->grp[spkr].corr); H_of_C = - ( (sc->grp[spkr].corr * log(phyp_corr) * M_LOG2E) + ( (sc->grp[spkr].sub + sc->grp[spkr].ins ) * log(1.0 - phyp_corr) * M_LOG2E) ); if (nce_arr != (double *)0) nce_arr[spkr] = (H_of_C + sum_c_spk + sum_i_spk) / H_of_C; sum_c_sys += sum_c_spk; sum_i_sys += sum_i_spk; } else { if (nce_arr != (double *)0) nce_arr[spkr] = 0.0; } } phyp_corr = (double)(tot_corr) / (double)(tot_sub + tot_ins + tot_corr); H_of_C = - ( tot_corr * log(phyp_corr) * M_LOG2E + ((tot_sub + tot_ins) * log(1.0 - phyp_corr) * M_LOG2E )); *nce_system = (H_of_C + sum_c_sys + sum_i_sys) / H_of_C; if (conf_not_in_range > 0) fprintf(stderr,"Warning: %d of %d confidence scores were" " not in the range (0.0,1.0)\n",conf_not_in_range, tot_corr+tot_sub+tot_ins); } void print_N_SCORE(SCORES *scor[], int nscor, char *outname, int max, int feedback, int score_diff){ SC_CORRESPONDENCE *sc; char *fname; FILE *fp; /* open an output file, if it fails, write to stdout */ if (strcmp(outname,"-") == 0 || (fp = fopen(fname=rsprintf("%s.prn",outname),"w")) == NULL) fp = stdout; else if (feedback >= 1) printf(" Writing Multi-system alignments to '%s'\n",fname); sc = alloc_SC_CORRESPONDENCE(scor, nscor); locate_matched_data(scor, nscor, &sc); dump_paths_of_SC_CORRESPONDENCE(sc, max, fp, score_diff); if (fp != stdout && fp != (FILE *)0) fclose(fp); }
33.924235
124
0.593679
7619b732d1c3446f10f71bec4becb215ca92127e
513
h
C
SpringBoard/SBAppSwitcherScrollingViewDelegate.h
LacertosusRepo/headers
f3eef2127548c631b325a0b28c907cc59b1716ac
[ "Unlicense", "Apache-2.0", "OpenSSL", "BSD-3-Clause" ]
182
2016-03-28T00:30:04.000Z
2022-03-31T02:04:58.000Z
SpringBoard/SBAppSwitcherScrollingViewDelegate.h
LacertosusRepo/headers
f3eef2127548c631b325a0b28c907cc59b1716ac
[ "Unlicense", "Apache-2.0", "OpenSSL", "BSD-3-Clause" ]
36
2016-05-09T09:45:41.000Z
2022-03-06T04:02:42.000Z
SpringBoard/SBAppSwitcherScrollingViewDelegate.h
LacertosusRepo/headers
f3eef2127548c631b325a0b28c907cc59b1716ac
[ "Unlicense", "Apache-2.0", "OpenSSL", "BSD-3-Clause" ]
69
2016-04-16T19:48:18.000Z
2022-02-28T09:05:05.000Z
@class SBAppSwitcherPageViewController, SBDisplayItem, SBDisplayLayout; @protocol SBAppSwitcherScrollingViewDelegate - (_Bool)switcherScroller:(SBAppSwitcherPageViewController *)switcherScroller isDisplayItemRemovable:(SBDisplayItem *)displayItem; - (void)switcherScroller:(SBAppSwitcherPageViewController *)switcherScroller itemTapped:(SBDisplayLayout *)displayLayout; - (void)switcherScroller:(SBAppSwitcherPageViewController *)switcherScroller displayItemWantsToBeRemoved:(SBDisplayItem *)displayItem; @end
51.3
134
0.869396
0ac8ef0c543646baf40d47f6fcba3022b82f1e9b
33,849
c
C
vlmcsd/rpc.c
auth89k/kms
6b04a55002292a8a0f6ce169254343c29e4e95b7
[ "MIT" ]
135
2017-02-28T05:02:47.000Z
2022-03-14T09:03:43.000Z
vlmcsd/rpc.c
auth89k/kms
6b04a55002292a8a0f6ce169254343c29e4e95b7
[ "MIT" ]
3
2018-03-16T08:00:01.000Z
2019-09-09T16:03:50.000Z
vlmcsd/rpc.c
auth89k/kms
6b04a55002292a8a0f6ce169254343c29e4e95b7
[ "MIT" ]
69
2017-10-17T14:12:40.000Z
2022-03-09T09:45:15.000Z
#ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE #endif // _DEFAULT_SOURCE #ifndef CONFIG #define CONFIG "config.h" #endif // CONFIG #include CONFIG #ifndef USE_MSRPC #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdint.h> #include <ctype.h> #include <time.h> #if !defined(_WIN32) #include <sys/socket.h> #include <netdb.h> #endif #include "rpc.h" #include "output.h" #include "crypto.h" #include "endian.h" #include "helpers.h" #include "network.h" #include "shared_globals.h" /* Forwards */ static int checkRpcHeader(const RPC_HEADER *const Header, const BYTE desiredPacketType, const PRINTFUNC p); /* Data definitions */ // All GUIDs are defined as BYTE[16] here. No big-endian/little-endian byteswapping required. static const BYTE TransferSyntaxNDR32[] = { 0x04, 0x5D, 0x88, 0x8A, 0xEB, 0x1C, 0xC9, 0x11, 0x9F, 0xE8, 0x08, 0x00, 0x2B, 0x10, 0x48, 0x60 }; static const BYTE InterfaceUuid[] = { 0x75, 0x21, 0xc8, 0x51, 0x4e, 0x84, 0x50, 0x47, 0xB0, 0xD8, 0xEC, 0x25, 0x55, 0x55, 0xBC, 0x06 }; static const BYTE TransferSyntaxNDR64[] = { 0x33, 0x05, 0x71, 0x71, 0xba, 0xbe, 0x37, 0x49, 0x83, 0x19, 0xb5, 0xdb, 0xef, 0x9c, 0xcc, 0x36 }; static const BYTE BindTimeFeatureNegotiation[] = { 0x2c, 0x1c, 0xb7, 0x6c, 0x12, 0x98, 0x40, 0x45, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // // Dispatch RPC payload to kms.c // typedef int (*CreateResponse_t)(const void *const, void *const, const char* const); static const struct { unsigned int RequestSize; CreateResponse_t CreateResponse; } _Versions[] = { { sizeof(REQUEST_V4), (CreateResponse_t) CreateResponseV4 }, { sizeof(REQUEST_V6), (CreateResponse_t) CreateResponseV6 }, { sizeof(REQUEST_V6), (CreateResponse_t) CreateResponseV6 } }; RPC_FLAGS RpcFlags; static int_fast8_t firstPacketSent; // // RPC request (server) // #if defined(_PEDANTIC) && !defined(NO_LOG) static void CheckRpcRequest(const RPC_REQUEST64 *const Request, const unsigned int len, WORD* NdrCtx, WORD* Ndr64Ctx, WORD Ctx) { uint_fast8_t kmsMajorVersion; uint32_t requestSize = Ctx != *Ndr64Ctx ? sizeof(RPC_REQUEST) : sizeof(RPC_REQUEST64); if (len < requestSize) { logger("Fatal: RPC request (including header) must be at least %i bytes but is only %i bytes.\n", (int)(sizeof(RPC_HEADER) + requestSize), (int)(len + sizeof(RPC_HEADER)) ); return; } if (len < requestSize + sizeof(DWORD)) { logger("Fatal: KMS Request too small to contain version info (less than 4 bytes).\n"); return; } if (Ctx != *Ndr64Ctx) kmsMajorVersion = LE16(((WORD*)Request->Ndr.Data)[1]); else kmsMajorVersion = LE16(((WORD*)Request->Ndr64.Data)[1]); if (kmsMajorVersion > 6) { logger("Fatal: KMSv%u is not supported.\n", (unsigned int)kmsMajorVersion); } else { if (len >_Versions[kmsMajorVersion].RequestSize + requestSize) logger("Warning: %u excess bytes in RPC request.\n", len - _Versions[kmsMajorVersion].RequestSize ); } if (Ctx != *Ndr64Ctx && Ctx != *NdrCtx) logger("Warning: Context id should be %u (NDR32) or %u (NDR64) but is %u.\n", (unsigned int)*NdrCtx, (unsigned int)*Ndr64Ctx, Ctx ); if (Request->Opnum) logger("Warning: OpNum should be 0 but is %u.\n", (unsigned int)LE16(Request->Opnum) ); if (LE32(Request->AllocHint) != len - sizeof(RPC_REQUEST) + sizeof(Request->Ndr)) logger("Warning: Allocation hint should be %u but is %u.\n", len + sizeof(Request->Ndr), LE32(Request->AllocHint) ); if (Ctx != *Ndr64Ctx) { if (LE32(Request->Ndr.DataLength) != len - sizeof(RPC_REQUEST)) logger("Warning: NDR32 data length field should be %u but is %u.\n", len - sizeof(RPC_REQUEST), LE32(Request->Ndr.DataLength) ); if (LE32(Request->Ndr.DataSizeIs) != len - sizeof(RPC_REQUEST)) logger("Warning: NDR32 data size field should be %u but is %u.\n", len - sizeof(RPC_REQUEST), LE32(Request->Ndr.DataSizeIs) ); } else { if (LE64(Request->Ndr64.DataLength) != len - sizeof(RPC_REQUEST64)) logger("Warning: NDR32 data length field should be %u but is %u.\n", len - sizeof(RPC_REQUEST) + sizeof(Request->Ndr), LE64(Request->Ndr64.DataLength) ); if (LE64(Request->Ndr64.DataSizeIs) != len - sizeof(RPC_REQUEST64)) logger("Warning: NDR32 data size field should be %u but is %u.\n", len - sizeof(RPC_REQUEST64), LE64(Request->Ndr64.DataSizeIs) ); } } #endif // defined(_PEDANTIC) && !defined(NO_LOG) /* * check RPC request for (somewhat) correct size * allow any size that does not cause CreateResponse to fail badly */ static unsigned int checkRpcRequestSize(const RPC_REQUEST64 *const Request, const unsigned int requestSize, WORD* NdrCtx, WORD* Ndr64Ctx) { WORD Ctx = LE16(Request->ContextId); # if defined(_PEDANTIC) && !defined(NO_LOG) CheckRpcRequest(Request, requestSize, NdrCtx, Ndr64Ctx, Ctx); # endif // defined(_PEDANTIC) && !defined(NO_LOG) // Anything that is smaller than a v4 request is illegal if (requestSize < sizeof(REQUEST_V4) + (Ctx != *Ndr64Ctx ? sizeof(RPC_REQUEST) : sizeof(RPC_REQUEST64))) return 0; // Get KMS major version uint_fast16_t _v; if (Ctx != *Ndr64Ctx) _v = LE16(((WORD*)Request->Ndr.Data)[1]) - 4; else _v = LE16(((WORD*)Request->Ndr64.Data)[1]) - 4; // Only KMS v4, v5 and v6 are supported if (_v >= vlmcsd_countof(_Versions)) { # ifndef NO_LOG logger("Fatal: KMSv%i unsupported\n", _v + 4); # endif // NO_LOG return 0; } // Could check for equality but allow bigger requests to support buggy RPC clients (e.g. wine) // Buffer overrun is check by caller. return (requestSize >= _Versions[_v].RequestSize); } /* * Handles the actual KMS request from the client. * Calls KMS functions (CreateResponseV4 or CreateResponseV6) in kms.c * Returns size of the KMS response packet or 0 on failure. * * The RPC packet size (excluding header) is actually in Response->AllocHint */ static int rpcRequest(const RPC_REQUEST64 *const Request, RPC_RESPONSE64 *const Response, const DWORD RpcAssocGroup_unused, const SOCKET sock_unused, WORD* NdrCtx, WORD* Ndr64Ctx, BYTE packetType, const char* const ipstr) { uint_fast16_t _v; int ResponseSize; WORD Ctx = LE16(Request->ContextId); BYTE* requestData; BYTE* responseData; BYTE* pRpcReturnCode; int len; if (Ctx != *Ndr64Ctx) { requestData = (BYTE*)&Request->Ndr.Data; responseData = (BYTE*)&Response->Ndr.Data; } else { requestData = (BYTE*)&Request->Ndr64.Data; responseData = (BYTE*)&Response->Ndr64.Data; } _v = LE16(((WORD*)requestData)[1]) - 4; if (!(ResponseSize = _Versions[_v].CreateResponse(requestData, responseData, ipstr))) { return 0; } if (Ctx != *Ndr64Ctx) { Response->Ndr.DataSizeMax = LE32(0x00020000); Response->Ndr.DataLength = Response->Ndr.DataSizeIs = LE32(ResponseSize); len = ResponseSize + sizeof(Response->Ndr); } else { Response->Ndr64.DataSizeMax = LE64(0x00020000ULL); Response->Ndr64.DataLength = Response->Ndr64.DataSizeIs = LE64((uint64_t)ResponseSize); len = ResponseSize + sizeof(Response->Ndr64); } pRpcReturnCode = ((BYTE*)&Response->Ndr) + len; UA32(pRpcReturnCode) = 0; //LE32 not needed for 0 len += sizeof(DWORD); // Pad zeros to 32-bit align (seems not neccassary but Windows RPC does it this way) int pad = ((~len & 3) + 1) & 3; memset(pRpcReturnCode + sizeof(DWORD), 0, pad); len += pad; Response->AllocHint = LE32(len); Response->ContextId = Request->ContextId; *((WORD*)&Response->CancelCount) = 0; // CancelCount + Pad1 return len + 8; } #if defined(_PEDANTIC) && !defined(NO_LOG) static void CheckRpcBindRequest(const RPC_BIND_REQUEST *const Request, const unsigned int len) { uint_fast8_t i, HasTransferSyntaxNDR32 = FALSE; char guidBuffer1[GUID_STRING_LENGTH + 1], guidBuffer2[GUID_STRING_LENGTH + 1]; uint32_t CapCtxItems = (len - sizeof(*Request) + sizeof(Request->CtxItems)) / sizeof(Request->CtxItems); DWORD NumCtxItems = LE32(Request->NumCtxItems); if (NumCtxItems < CapCtxItems) // Can't be too small because already handled by RpcBindSize logger("Warning: Excess bytes in RPC bind request.\n"); for (i = 0; i < NumCtxItems; i++) { if (!IsEqualGUID(&Request->CtxItems[i].InterfaceUUID, InterfaceUuid)) { uuid2StringLE((GUID*)&Request->CtxItems[i].InterfaceUUID, guidBuffer1); uuid2StringLE((GUID*)InterfaceUuid, guidBuffer2); logger("Warning: Interface UUID is %s but should be %s in Ctx item %u.\n", guidBuffer1, guidBuffer2, (unsigned int)i); } if (Request->CtxItems[i].NumTransItems != LE16(1)) logger("Fatal: %u NDR32 transfer items detected in Ctx item %u, but only one is supported.\n", (unsigned int)LE16(Request->CtxItems[i].NumTransItems), (unsigned int)i ); if (Request->CtxItems[i].InterfaceVerMajor != LE16(1) || Request->CtxItems[i].InterfaceVerMinor != 0) logger("Warning: NDR32 Interface version is %u.%u but should be 1.0.\n", (unsigned int)LE16(Request->CtxItems[i].InterfaceVerMajor), (unsigned int)LE16(Request->CtxItems[i].InterfaceVerMinor) ); if (Request->CtxItems[i].ContextId != LE16((WORD)i)) logger("Warning: context id of Ctx item %u is %u.\n", (unsigned int)i, (unsigned int)Request->CtxItems[i].ContextId); if ( IsEqualGUID((GUID*)TransferSyntaxNDR32, &Request->CtxItems[i].TransferSyntax) ) { HasTransferSyntaxNDR32 = TRUE; if (Request->CtxItems[i].SyntaxVersion != LE32(2)) logger("NDR32 transfer syntax version is %u but should be 2.\n", LE32(Request->CtxItems[i].SyntaxVersion)); } else if ( IsEqualGUID((GUID*)TransferSyntaxNDR64, &Request->CtxItems[i].TransferSyntax) ) { if (Request->CtxItems[i].SyntaxVersion != LE32(1)) logger("NDR64 transfer syntax version is %u but should be 1.\n", LE32(Request->CtxItems[i].SyntaxVersion)); } else if (!memcmp(BindTimeFeatureNegotiation, (BYTE*)(&Request->CtxItems[i].TransferSyntax), 8)) { if (Request->CtxItems[i].SyntaxVersion != LE32(1)) logger("BTFN syntax version is %u but should be 1.\n", LE32(Request->CtxItems[i].SyntaxVersion)); } } if (!HasTransferSyntaxNDR32) logger("Warning: RPC bind request has no NDR32 CtxItem.\n"); } #endif // defined(_PEDANTIC) && !defined(NO_LOG) /* * Check, if we receive enough bytes to return a valid RPC bind response */ static unsigned int checkRpcBindSize(const RPC_BIND_REQUEST *const Request, const unsigned int RequestSize, WORD* NdrCtx, WORD* Ndr64Ctx) { if ( RequestSize < sizeof(RPC_BIND_REQUEST) ) return FALSE; unsigned int _NumCtxItems = LE32(Request->NumCtxItems); if ( RequestSize < sizeof(RPC_BIND_REQUEST) - sizeof(Request->CtxItems[0]) + _NumCtxItems * sizeof(Request->CtxItems[0]) ) return FALSE; #if defined(_PEDANTIC) && !defined(NO_LOG) CheckRpcBindRequest(Request, RequestSize); #endif // defined(_PEDANTIC) && !defined(NO_LOG) return TRUE; } /* * Accepts a bind or alter context request from the client and composes the bind response. * Needs the socket because the tcp port number is part of the response. * len is not used here. * * Returns TRUE on success. */ static int rpcBind(const RPC_BIND_REQUEST *const Request, RPC_BIND_RESPONSE* Response, const DWORD RpcAssocGroup, const SOCKET sock, WORD* NdrCtx, WORD* Ndr64Ctx, BYTE packetType, const char* const ipstr_unused) { unsigned int i, _st = FALSE; DWORD numCtxItems = LE32(Request->NumCtxItems); int_fast8_t IsNDR64possible = FALSE; uint_fast8_t portNumberSize; socklen_t socklen; struct sockaddr_storage addr; // M$ RPC does not do this. Pad bytes contain apparently random data // memset(Response->SecondaryAddress, 0, sizeof(Response->SecondaryAddress)); socklen = sizeof addr; if ( packetType == RPC_PT_ALTERCONTEXT_REQ || getsockname(sock, (struct sockaddr*)&addr, &socklen) || getnameinfo((struct sockaddr*)&addr, socklen, NULL, 0, (char*)Response->SecondaryAddress, sizeof(Response->SecondaryAddress), NI_NUMERICSERV)) { portNumberSize = Response->SecondaryAddressLength = 0; } else { portNumberSize = strlen((char*)Response->SecondaryAddress) + 1; Response->SecondaryAddressLength = LE16(portNumberSize); } Response->MaxXmitFrag = Request->MaxXmitFrag; Response->MaxRecvFrag = Request->MaxRecvFrag; Response->AssocGroup = LE32(RpcAssocGroup); // This is really ugly (but efficient) code to support padding after the secondary address field if (portNumberSize < 3) { Response = (RPC_BIND_RESPONSE*)((BYTE*)Response - 4); } Response->NumResults = Request->NumCtxItems; if (UseRpcNDR64) { for (i = 0; i < numCtxItems; i++) { if ( IsEqualGUID((GUID*)TransferSyntaxNDR32, &Request->CtxItems[i].TransferSyntax) ) { /*if (packetType == RPC_PT_BIND_REQ)*/ *NdrCtx = LE16(Request->CtxItems[i].ContextId); } if ( IsEqualGUID((GUID*)TransferSyntaxNDR64, &Request->CtxItems[i].TransferSyntax) ) { IsNDR64possible = TRUE; /*if (packetType == RPC_PT_BIND_REQ)*/ *Ndr64Ctx = LE16(Request->CtxItems[i].ContextId); } } } for (i = 0; i < numCtxItems; i++) { memset(&Response->Results[i].TransferSyntax, 0, sizeof(GUID)); if ( !IsNDR64possible && IsEqualGUID((GUID*)TransferSyntaxNDR32, &Request->CtxItems[i].TransferSyntax) ) { Response->Results[i].SyntaxVersion = LE32(2); Response->Results[i].AckResult = Response->Results[i].AckReason = RPC_BIND_ACCEPT; memcpy(&Response->Results[i].TransferSyntax, TransferSyntaxNDR32, sizeof(GUID)); _st = TRUE; } else if ( IsNDR64possible && IsEqualGUID((GUID*)TransferSyntaxNDR64, &Request->CtxItems[i].TransferSyntax) ) { Response->Results[i].SyntaxVersion = LE32(1); Response->Results[i].AckResult = Response->Results[i].AckReason = RPC_BIND_ACCEPT; memcpy(&Response->Results[i].TransferSyntax, TransferSyntaxNDR64, sizeof(GUID)); _st = TRUE; } else if ( UseRpcBTFN && !memcmp(BindTimeFeatureNegotiation, (BYTE*)(&Request->CtxItems[i].TransferSyntax), 8) ) { Response->Results[i].SyntaxVersion = 0; Response->Results[i].AckResult = RPC_BIND_ACK; // Features requested are actually encoded in the GUID Response->Results[i].AckReason = ((WORD*)(&Request->CtxItems[i].TransferSyntax))[4] & (RPC_BTFN_SEC_CONTEXT_MULTIPLEX | RPC_BTFN_KEEP_ORPHAN); } else { Response->Results[i].SyntaxVersion = 0; Response->Results[i].AckResult = Response->Results[i].AckReason = RPC_BIND_NACK; // Unsupported } } if ( !_st ) return 0; return sizeof(RPC_BIND_RESPONSE) + numCtxItems * sizeof(((RPC_BIND_RESPONSE *)0)->Results[0]) - (portNumberSize < 3 ? 4 : 0); } // // Main RPC handling routine // typedef unsigned int (*GetResponseSize_t)(const void *const request, const unsigned int requestSize, WORD* NdrCtx, WORD* Ndr64Ctx); typedef int (*GetResponse_t)(const void* const request, void* response, const DWORD rpcAssocGroup, const SOCKET socket, WORD* NdrCtx, WORD* Ndr64Ctx, BYTE packetType, const char* const ipstr); static const struct { BYTE ResponsePacketType; GetResponseSize_t CheckRequestSize; GetResponse_t GetResponse; } _Actions[] = { { RPC_PT_BIND_ACK, (GetResponseSize_t)checkRpcBindSize, (GetResponse_t) rpcBind }, { RPC_PT_RESPONSE, (GetResponseSize_t)checkRpcRequestSize, (GetResponse_t) rpcRequest }, { RPC_PT_ALTERCONTEXT_ACK, (GetResponseSize_t)checkRpcBindSize, (GetResponse_t) rpcBind }, }; /* * This is the main RPC server loop. Returns after KMS request has been serviced * or a timeout has occured. */ void rpcServer(const SOCKET sock, const DWORD RpcAssocGroup, const char* const ipstr) { RPC_HEADER rpcRequestHeader; WORD NdrCtx = INVALID_NDR_CTX, Ndr64Ctx = INVALID_NDR_CTX; randomNumberInit(); while (_recv(sock, &rpcRequestHeader, sizeof(rpcRequestHeader))) { //int_fast8_t _st; unsigned int request_len, response_len; uint_fast8_t _a; #if defined(_PEDANTIC) && !defined(NO_LOG) checkRpcHeader(&rpcRequestHeader, rpcRequestHeader.PacketType, &logger); #endif // defined(_PEDANTIC) && !defined(NO_LOG) switch (rpcRequestHeader.PacketType) { case RPC_PT_BIND_REQ: _a = 0; break; case RPC_PT_REQUEST: _a = 1; break; case RPC_PT_ALTERCONTEXT_REQ: _a = 2; break; default: return; } request_len = LE16(rpcRequestHeader.FragLength) - sizeof(rpcRequestHeader); BYTE requestBuffer[MAX_REQUEST_SIZE + sizeof(RPC_RESPONSE64)]; BYTE responseBuffer[MAX_RESPONSE_SIZE + sizeof(RPC_HEADER) + sizeof(RPC_RESPONSE64)]; RPC_HEADER *rpcResponseHeader = (RPC_HEADER *)responseBuffer; RPC_RESPONSE* rpcResponse = (RPC_RESPONSE*)(responseBuffer + sizeof(rpcRequestHeader)); // The request is larger than the buffer size if (request_len > MAX_REQUEST_SIZE + sizeof(RPC_REQUEST64)) return; // Unable to receive the complete request if (!_recv(sock, requestBuffer, request_len)) return; // Request is invalid if (!_Actions[_a].CheckRequestSize(requestBuffer, request_len, &NdrCtx, &Ndr64Ctx)) return; // Unable to create a valid response from request if (!(response_len = _Actions[_a].GetResponse(requestBuffer, rpcResponse, RpcAssocGroup, sock, &NdrCtx, &Ndr64Ctx, rpcRequestHeader.PacketType, ipstr))) return; response_len += sizeof(RPC_HEADER); memcpy(rpcResponseHeader, &rpcRequestHeader, sizeof(RPC_HEADER)); rpcResponseHeader->FragLength = LE16(response_len); rpcResponseHeader->PacketType = _Actions[_a].ResponsePacketType; if (rpcResponseHeader->PacketType == RPC_PT_ALTERCONTEXT_ACK) rpcResponseHeader->PacketFlags = RPC_PF_FIRST | RPC_PF_LAST; if (!_send(sock, responseBuffer, response_len)) return; if (DisconnectImmediately && rpcResponseHeader->PacketType == RPC_PT_RESPONSE) shutdown(sock, VLMCSD_SHUT_RDWR); } } /* RPC client functions */ static DWORD CallId = 2; // M$ starts with CallId 2. So we do the same. /* * Checks RPC header. Returns 0 on success. * This is mainly for debugging a non Microsoft KMS server that uses its own RPC code. */ static int checkRpcHeader(const RPC_HEADER *const Header, const BYTE desiredPacketType, const PRINTFUNC p) { int status = 0; if (Header->PacketType != desiredPacketType) { p("Fatal: Received wrong RPC packet type. Expected %u but got %u\n", (uint32_t)desiredPacketType, Header->PacketType ); status = !0; } if (Header->DataRepresentation != BE32(0x10000000)) { p("Fatal: RPC response does not conform to Microsoft's limited support of DCE RPC\n"); status = !0; } if (Header->AuthLength != 0) { p("Fatal: RPC response requests authentication\n"); status = !0; } // vlmcsd does not support fragmented packets (not yet neccassary) if ( (Header->PacketFlags & (RPC_PF_FIRST | RPC_PF_LAST)) != (RPC_PF_FIRST | RPC_PF_LAST) ) { p("Fatal: RPC packet flags RPC_PF_FIRST and RPC_PF_LAST are not both set.\n"); status = !0; } if (Header->PacketFlags & RPC_PF_CANCEL_PENDING) p("Warning: %s should not be set\n", "RPC_PF_CANCEL_PENDING"); if (Header->PacketFlags & RPC_PF_RESERVED) p("Warning: %s should not be set\n", "RPC_PF_RESERVED"); if (Header->PacketFlags & RPC_PF_NOT_EXEC) p("Warning: %s should not be set\n", "RPC_PF_NOT_EXEC"); if (Header->PacketFlags & RPC_PF_MAYBE) p("Warning: %s should not be set\n", "RPC_PF_MAYBE"); if (Header->PacketFlags & RPC_PF_OBJECT) p("Warning: %s should not be set\n", "RPC_PF_OBJECT"); if (Header->VersionMajor != 5 || Header->VersionMinor != 0) { p("Fatal: Expected RPC version 5.0 and got %u.%u\n", Header->VersionMajor, Header->VersionMinor); status = !0; } return status; } /* * Checks an RPC response header. Does basic header checks by calling checkRpcHeader() * and then does additional checks if response header complies with the respective request header. * PRINTFUNC p can be anything that has the same prototype as printf. * Returns 0 on success. */ static int checkRpcResponseHeader(const RPC_HEADER *const ResponseHeader, const RPC_HEADER *const RequestHeader, const BYTE desiredPacketType, const PRINTFUNC p) { static int_fast8_t WineBugDetected = FALSE; int status = checkRpcHeader(ResponseHeader, desiredPacketType, p); if (desiredPacketType == RPC_PT_BIND_ACK) { if ((ResponseHeader->PacketFlags & RPC_PF_MULTIPLEX) != (RequestHeader->PacketFlags & RPC_PF_MULTIPLEX)) { p("Warning: RPC_PF_MULTIPLEX of RPC request and response should match\n"); } } else { if (ResponseHeader->PacketFlags & RPC_PF_MULTIPLEX) { p("Warning: %s should not be set\n", "RPC_PF_MULTIPLEX"); } } if (!status && ResponseHeader->CallId == LE32(1)) { if (!WineBugDetected) { p("Warning: Buggy RPC of Wine detected. Call Id of Response is always 1\n"); WineBugDetected = TRUE; } } else if (ResponseHeader->CallId != RequestHeader->CallId) { p("Fatal: Sent Call Id %u but received answer for Call Id %u\n", (uint32_t)LE32(RequestHeader->CallId), (uint32_t)LE32(ResponseHeader->CallId) ); status = !0; } return status; } /* * Initializes an RPC request header as needed for KMS, i.e. packet always fits in one fragment. * size cannot be greater than fragment length negotiated during RPC bind. */ static void createRpcRequestHeader(RPC_HEADER* RequestHeader, BYTE packetType, WORD size) { RequestHeader->PacketType = packetType; RequestHeader->PacketFlags = RPC_PF_FIRST | RPC_PF_LAST; RequestHeader->VersionMajor = 5; RequestHeader->VersionMinor = 0; RequestHeader->AuthLength = 0; RequestHeader->DataRepresentation = BE32(0x10000000); // Little endian, ASCII charset, IEEE floating point RequestHeader->CallId = LE32(CallId); RequestHeader->FragLength = LE16(size); } /* * Sends a KMS request via RPC and receives a response. * Parameters are raw (encrypted) reqeuests / responses. * Returns 0 on success. */ RpcStatus rpcSendRequest(const RpcCtx sock, const BYTE *const KmsRequest, const size_t requestSize, BYTE **KmsResponse, size_t *const responseSize) { #define MAX_EXCESS_BYTES 16 RPC_HEADER *RequestHeader, ResponseHeader; RPC_REQUEST64 *RpcRequest; RPC_RESPONSE64 _Response; int status = 0; int_fast8_t useNdr64 = UseRpcNDR64 && firstPacketSent; size_t size = sizeof(RPC_HEADER) + (useNdr64 ? sizeof(RPC_REQUEST64) : sizeof(RPC_REQUEST)) + requestSize; size_t responseSize2; *KmsResponse = NULL; BYTE *_Request = (BYTE*)vlmcsd_malloc(size); RequestHeader = (RPC_HEADER*)_Request; RpcRequest = (RPC_REQUEST64*)(_Request + sizeof(RPC_HEADER)); createRpcRequestHeader(RequestHeader, RPC_PT_REQUEST, size); // Increment CallId for next Request CallId++; RpcRequest->Opnum = 0; if (useNdr64) { RpcRequest->ContextId = LE16(1); // We negotiate NDR64 always as context 1 RpcRequest->AllocHint = LE32(requestSize + sizeof(RpcRequest->Ndr64)); RpcRequest->Ndr64.DataLength = LE64((uint64_t)requestSize); RpcRequest->Ndr64.DataSizeIs = LE64((uint64_t)requestSize); memcpy(RpcRequest->Ndr64.Data, KmsRequest, requestSize); } else { RpcRequest->ContextId = 0; // We negotiate NDR32 always as context 0 RpcRequest->AllocHint = LE32(requestSize + sizeof(RpcRequest->Ndr)); RpcRequest->Ndr.DataLength = LE32(requestSize); RpcRequest->Ndr.DataSizeIs = LE32(requestSize); memcpy(RpcRequest->Ndr.Data, KmsRequest, requestSize); } for(;;) { int bytesread; if (!_send(sock, _Request, size)) { errorout("\nFatal: Could not send RPC request\n"); status = !0; break; } if (!_recv(sock, &ResponseHeader, sizeof(RPC_HEADER))) { errorout("\nFatal: No RPC response received from server\n"); status = !0; break; } if ((status = checkRpcResponseHeader(&ResponseHeader, RequestHeader, RPC_PT_RESPONSE, &errorout))) break; size = useNdr64 ? sizeof(RPC_RESPONSE64) : sizeof(RPC_RESPONSE); if (size > LE16(ResponseHeader.FragLength) - sizeof(ResponseHeader)) size = LE16(ResponseHeader.FragLength) - sizeof(ResponseHeader); if (!_recv(sock, &_Response, size)) { errorout("\nFatal: RPC response is incomplete\n"); status = !0; break; } if (_Response.CancelCount != 0) { errorout("\nFatal: RPC response cancel count is not 0\n"); status = !0; } if (_Response.ContextId != (useNdr64 ? LE16(1) : 0)) { errorout("\nFatal: RPC response context id %u is not bound\n", (unsigned int)LE16(_Response.ContextId)); status = !0; } int_fast8_t sizesMatch; if (useNdr64) { *responseSize = (size_t)LE64(_Response.Ndr64.DataLength); responseSize2 = (size_t)LE64(_Response.Ndr64.DataSizeIs); if (!*responseSize || !_Response.Ndr64.DataSizeMax) { status = (int)LE32(_Response.Ndr64.status); break; } sizesMatch = (size_t)LE64(_Response.Ndr64.DataLength) == responseSize2; } else { *responseSize = (size_t)LE32(_Response.Ndr.DataLength); responseSize2 = (size_t)LE32(_Response.Ndr.DataSizeIs); if (!*responseSize || !_Response.Ndr.DataSizeMax) { status = (int)LE32(_Response.Ndr.status); break; } sizesMatch = (size_t)LE32(_Response.Ndr.DataLength) == responseSize2; } if (!sizesMatch) { errorout("\nFatal: NDR data length (%u) does not match NDR data size (%u)\n", (uint32_t)*responseSize, (uint32_t)LE32(_Response.Ndr.DataSizeIs) ); status = !0; } *KmsResponse = (BYTE*)vlmcsd_malloc(*responseSize + MAX_EXCESS_BYTES); // If RPC stub is too short, assume missing bytes are zero (same ill behavior as MS RPC) memset(*KmsResponse, 0, *responseSize + MAX_EXCESS_BYTES); // Read up to 16 bytes more than bytes expected to detect faulty KMS emulators if ((bytesread = recv(sock, (char*)*KmsResponse, *responseSize + MAX_EXCESS_BYTES, 0)) < (int)*responseSize) { errorout("\nFatal: No or incomplete KMS response received. Required %u bytes but only got %i\n", (uint32_t)*responseSize, (int32_t)(bytesread < 0 ? 0 : bytesread) ); status = !0; break; } DWORD *pReturnCode; size_t len = *responseSize + (useNdr64 ? sizeof(_Response.Ndr64) : sizeof(_Response.Ndr)) + sizeof(*pReturnCode); size_t pad = ((~len & 3) + 1) & 3; if (len + pad != LE32(_Response.AllocHint)) { errorout("\nWarning: RPC stub size is %u, should be %u (probably incorrect padding)\n", (uint32_t)LE32(_Response.AllocHint), (uint32_t)(len + pad)); } else { size_t i; for (i = 0; i < pad; i++) { if (*(*KmsResponse + *responseSize + sizeof(*pReturnCode) + i)) { errorout("\nWarning: RPC stub data not padded to zeros according to Microsoft standard\n"); break; } } } pReturnCode = (DWORD*)(*KmsResponse + *responseSize + pad); status = LE32(UA32(pReturnCode)); if (status) errorout("\nWarning: RPC stub data reported Error %u\n", (uint32_t)status); break; } free(_Request); firstPacketSent = TRUE; return status; #undef MAX_EXCESS_BYTES } static int_fast8_t IsNullGuid(BYTE* guidPtr) { int_fast8_t i; for (i = 0; i < 16; i++) { if (guidPtr[i]) return FALSE; } return TRUE; } /* * Perform RPC client bind. Accepts a connected client socket. * Returns 0 on success. RPC binding is required before any payload can be * exchanged. It negotiates about protocol details. */ RpcStatus rpcBindOrAlterClientContext(const RpcCtx sock, BYTE packetType, const int_fast8_t verbose) { RPC_HEADER *RequestHeader, ResponseHeader; RPC_BIND_REQUEST *bindRequest; RPC_BIND_RESPONSE *bindResponse; int status; WORD ctxItems = 1 + (packetType == RPC_PT_BIND_REQ ? UseRpcNDR64 + UseRpcBTFN : 0); size_t rpcBindSize = (sizeof(RPC_HEADER) + sizeof(RPC_BIND_REQUEST) + (ctxItems - 1) * sizeof(bindRequest->CtxItems[0])); WORD ctxIndex = 0; WORD i; WORD CtxBTFN = (WORD)~0, CtxNDR64 = (WORD)~0; BYTE _Request[rpcBindSize]; RequestHeader = (RPC_HEADER*)_Request; bindRequest = (RPC_BIND_REQUEST* )(_Request + sizeof(RPC_HEADER)); createRpcRequestHeader(RequestHeader, packetType, rpcBindSize); RequestHeader->PacketFlags |= UseMultiplexedRpc ? RPC_PF_MULTIPLEX : 0; bindRequest->AssocGroup = 0; bindRequest->MaxRecvFrag = bindRequest->MaxXmitFrag = LE16(5840); bindRequest->NumCtxItems = LE32(ctxItems); // data that is identical in all Ctx items for (i = 0; i < ctxItems; i++) { bindRequest->CtxItems[i].ContextId = LE16(i); bindRequest->CtxItems[i].InterfaceVerMajor = LE16(1); bindRequest->CtxItems[i].InterfaceVerMinor = 0; bindRequest->CtxItems[i].NumTransItems = LE16(1); bindRequest->CtxItems[i].SyntaxVersion = i ? LE32(1) : LE32(2); memcpy(&bindRequest->CtxItems[i].InterfaceUUID, InterfaceUuid, sizeof(GUID)); } memcpy(&bindRequest->CtxItems[0].TransferSyntax, TransferSyntaxNDR32, sizeof(GUID)); if (UseRpcNDR64 && packetType == RPC_PT_BIND_REQ) { memcpy(&bindRequest->CtxItems[++ctxIndex].TransferSyntax, TransferSyntaxNDR64, sizeof(GUID)); CtxNDR64 = ctxIndex; } if (UseRpcBTFN && packetType == RPC_PT_BIND_REQ) { memcpy(&bindRequest->CtxItems[++ctxIndex].TransferSyntax, BindTimeFeatureNegotiation, sizeof(GUID)); CtxBTFN = ctxIndex; } if (!_send(sock, _Request, rpcBindSize)) { errorout("\nFatal: Sending RPC bind request failed\n"); return !0; } if (!_recv(sock, &ResponseHeader, sizeof(RPC_HEADER))) { errorout("\nFatal: Did not receive a response from server\n"); return !0; } if ((status = checkRpcResponseHeader ( &ResponseHeader, RequestHeader, packetType == RPC_PT_BIND_REQ ? RPC_PT_BIND_ACK : RPC_PT_ALTERCONTEXT_ACK, &errorout ))) { return status; } bindResponse = (RPC_BIND_RESPONSE*)vlmcsd_malloc(LE16(ResponseHeader.FragLength) - sizeof(RPC_HEADER)); BYTE* bindResponseBytePtr = (BYTE*)bindResponse; if (!_recv(sock, bindResponse, LE16(ResponseHeader.FragLength) - sizeof(RPC_HEADER))) { errorout("\nFatal: Incomplete RPC bind acknowledgement received\n"); free(bindResponseBytePtr); return !0; } else { /* * checking, whether a bind or alter context response is as expected. * This check is very strict and checks whether a KMS emulator behaves exactly the same way * as Microsoft's RPC does. */ status = 0; if (bindResponse->SecondaryAddressLength < LE16(3)) bindResponse = (RPC_BIND_RESPONSE*)(bindResponseBytePtr - 4); if (bindResponse->NumResults != bindRequest->NumCtxItems) { errorout("\nFatal: Expected %u CTX items but got %u\n", (uint32_t)LE32(bindRequest->NumCtxItems), (uint32_t)LE32(bindResponse->NumResults) ); status = !0; } for (i = 0; i < ctxItems; i++) { const char* transferSyntaxName = i == CtxBTFN ? "BTFN" : i == CtxNDR64 ? "NDR64" : "NDR32"; if (bindResponse->Results[i].AckResult == RPC_BIND_NACK) // transfer syntax was declined { if (!IsNullGuid((BYTE*)&bindResponse->Results[i].TransferSyntax)) { errorout( "\nWarning: Rejected transfer syntax %s did not return NULL Guid\n", transferSyntaxName ); } if (bindResponse->Results[i].SyntaxVersion) { errorout( "\nWarning: Rejected transfer syntax %s did not return syntax version 0 but %u\n", transferSyntaxName, LE32(bindResponse->Results[i].SyntaxVersion) ); } if (bindResponse->Results[i].AckReason == RPC_ABSTRACTSYNTAX_UNSUPPORTED) { errorout( "\nWarning: Transfer syntax %s does not support KMS activation\n", transferSyntaxName ); } else if (bindResponse->Results[i].AckReason != RPC_SYNTAX_UNSUPPORTED) { errorout( "\nWarning: Rejected transfer syntax %s did not return ack reason RPC_SYNTAX_UNSUPPORTED\n", transferSyntaxName ); } continue; } if (i == CtxBTFN) // BTFN { if (bindResponse->Results[i].AckResult != RPC_BIND_ACK) { errorout("\nWarning: BTFN did not respond with RPC_BIND_ACK or RPC_BIND_NACK\n"); } if (bindResponse->Results[i].AckReason != LE16(3)) { errorout("\nWarning: BTFN did not return expected feature mask 0x3 but 0x%X\n", (unsigned int)LE16(bindResponse->Results[i].AckReason)); } if (verbose) printf("... BTFN "); RpcFlags.HasBTFN = TRUE; continue; } // NDR32 or NDR64 Ctx if (bindResponse->Results[i].AckResult != RPC_BIND_ACCEPT) { errorout( "\nFatal: transfer syntax %s returned an invalid status, neither RPC_BIND_ACCEPT nor RPC_BIND_NACK\n", transferSyntaxName ); status = !0; } if (!IsEqualGUID(&bindResponse->Results[i].TransferSyntax, &bindRequest->CtxItems[i].TransferSyntax)) { errorout( "\nFatal: Transfer syntax of RPC bind request and response does not match\n" ); status = !0; } if (bindResponse->Results[i].SyntaxVersion != bindRequest->CtxItems[i].SyntaxVersion) { errorout("\nFatal: Expected transfer syntax version %u for %s but got %u\n", (uint32_t)LE32(bindRequest->CtxItems[0].SyntaxVersion), transferSyntaxName, (uint32_t)LE32(bindResponse->Results[0].SyntaxVersion) ); status = !0; } // The ack reason field is actually undefined here but Microsoft sets this to 0 if (bindResponse->Results[i].AckReason != 0) { errorout( "\nWarning: Ack reason should be 0 but is %u\n", LE16(bindResponse->Results[i].AckReason) ); } if (!status) { if (i == CtxNDR64) { RpcFlags.HasNDR64 = TRUE; if (verbose) printf("... NDR64 "); } if (!i) { RpcFlags.HasNDR32 = TRUE; if (verbose) printf("... NDR32 "); } } } } free(bindResponseBytePtr); if (!RpcFlags.HasNDR64 && !RpcFlags.HasNDR32) { errorout("\nFatal: Could neither negotiate NDR32 nor NDR64 with the RPC server\n"); status = !0; } return status; } RpcStatus rpcBindClient(const RpcCtx sock, const int_fast8_t verbose) { firstPacketSent = FALSE; RpcFlags.mask = 0; RpcStatus status = rpcBindOrAlterClientContext(sock, RPC_PT_BIND_REQ, verbose); if (status) return status; if (!RpcFlags.HasNDR32) status = rpcBindOrAlterClientContext(sock, RPC_PT_ALTERCONTEXT_REQ, verbose); return status; } #endif // USE_MSRPC
30.385099
221
0.703064
5b8a116c7f1366a37bd7912cdcf8b53fc696767c
433
h
C
chSoftwareRenderer/chPlane.h
chetanjags/Basic-Software-Renderer
bf07ce4252bd99cff3d74bb6564c130519ab8baa
[ "MIT" ]
null
null
null
chSoftwareRenderer/chPlane.h
chetanjags/Basic-Software-Renderer
bf07ce4252bd99cff3d74bb6564c130519ab8baa
[ "MIT" ]
null
null
null
chSoftwareRenderer/chPlane.h
chetanjags/Basic-Software-Renderer
bf07ce4252bd99cff3d74bb6564c130519ab8baa
[ "MIT" ]
null
null
null
#pragma once #include "chVector3.h" typedef class chPlane { public: chPlane(const chVector3* unitNormal,float distanceFromOrigin); chPlane(const chVector3* p0,const chVector3* p1,const chVector3* p2); ~chPlane(void); void BestFitPlane(const chVector3 *listVec,int size); float DistanceFromPoint(const chVector3 *point)const; float operator *(const chVector3* vec)const; chVector3 normal; float d; }chPlane,*LPChPlane;
19.681818
70
0.771363
9d95bd013d04f277ee6a31e0f164e2c504a11551
8,451
c
C
x16.c
bobbyjim/x16-corewar
3df352160ddf849833707960797181bf8fc126b9
[ "MIT" ]
2
2021-08-03T14:13:02.000Z
2021-11-16T22:12:59.000Z
x16.c
bobbyjim/x16-corewar
3df352160ddf849833707960797181bf8fc126b9
[ "MIT" ]
null
null
null
x16.c
bobbyjim/x16-corewar
3df352160ddf849833707960797181bf8fc126b9
[ "MIT" ]
null
null
null
/**************************************************************************** This file isolates all of the X16/CC65 specific code. ****************************************************************************/ #include "common.h" #ifdef X16 #include <conio.h> #include <peekpoke.h> #else #include <stdio.h> #include <time.h> #endif #include <stdlib.h> #include "x16.h" #include "cell.h" #include "bank.h" #include "arena.h" #include "process.h" extern unsigned char corewar_system_status; // from arena.c unsigned char x16_stepMode = 0; unsigned char arena_square[2][2] = {{SQUARE_NW, SQUARE_NE }, { SQUARE_SW, SQUARE_SE }}; extern unsigned char currentBank; // from bank.c extern unsigned int epoch; // from process.c #ifdef X16 void x16_show_banked_message(unsigned int index) { unsigned int x; setBank(HELP_BANK); for (x=index; x<index+800; ++x) if (PEEK(x) == 0) cputs("\r\n"); else cputc(PEEK(x)); cputs("\r\n"); } #endif unsigned char x16_init() { unsigned char demo = 0; #ifdef X16 unsigned long wait = 800000; cbm_k_bsout(0x8E); // revert to primary case cbm_k_setnam("petfont.bin"); cbm_k_setlfs(0,8,0); cbm_k_load(2, 0x0f800); x16_loadfile( "text.bin", HELP_BANK, 0xa000 ); // put useful text in bank 2 bgcolor(BLACK); textcolor(GREEN); clrscr(); gotoxy(0,20); x16_show_banked_message(0xa000); gotoxy(0,40); textcolor(LTRED); cputs(" * * * press a key to begin * * *"); textcolor(DEFAULT_COLOR); demo = 1; while(--wait) { if (kbhit()) { demo = 0; break; } } clrscr(); _randomize(); #else puts("\n\n\n\n"); puts(" @@@@@@@ @@@@@@ @@@@@@@ @@@@@@@@ @@@ @@@ @@@ @@@@@@ @@@@@@@ "); puts(" @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@ @@@@@@@@ @@@@@@@@"); puts(" !@@ @@! @@@ @@! @@@ @@! @@! @@! @@! @@! @@@ @@! @@@"); puts(" !@! !@! @!@ !@! @!@ !@! !@! !@! !@! !@! @!@ !@! @!@"); puts(" !@! @!@ !@! @!@!!@! @!!!:! @!! !!@ @!@ @!@!@!@! @!@!!@! "); puts(" !!! !@! !!! !!@!@! !!!!!: !@! !!! !@! !!!@!!!! !!@!@! "); puts(" :!! !!: !!! !!: :!! !!: !!: !!: !!: !!: !!! !!: :!! "); puts(" :!: :!: !:! :!: !:! :!: :!: :!: :!: :!: !:! :!: !:!"); puts(" ::: ::: ::::: :: :: ::: :: :::: :::: :: ::: :: ::: :: :::"); puts(" :: :: : : : : : : : : :: :: :: : : : : : : : : :"); puts("\n\n\n\n"); srand(time(0)); #endif return demo; } void x16_help() { #ifdef X16 textcolor(GREEN); x16_show_banked_message(0xa000 + 800); textcolor(DEFAULT_COLOR); #else puts(" ---------------------------- CORESHELL 1.0 ----------------------------------"); puts(""); puts(""); puts(" https://github.com/bobbyjim/x16-corewar"); puts(""); puts(""); puts(" clear : clear core logout: quit program "); puts(" random : randomize core help : show this text "); puts(" run : begin or continue run step : run one epoch "); puts(""); puts(" d <nnn> : display core from <nnn> and set ip "); puts(" new <n> : add warrior <n> at current ip"); puts(""); puts(" load <redcode file> and add warrior"); puts(""); puts(""); puts(" * redcode can also be entered at the prompt"); puts(""); puts(""); puts(" --> begin every redcode file with three semicolons ';;;'"); puts(""); puts(""); puts(" --> put space between the operands"); puts(""); puts(""); puts(" "); puts(""); puts(" -----------------------------------------------------------------------------"); #endif } void x16_opcode_help() { #ifdef X16 textcolor(GREEN); x16_show_banked_message(0xa000 + 1600); textcolor(DEFAULT_COLOR); #else #endif } void x16_prompt(int ip) { #ifdef X16 cprintf("\r\ncoreshell %u (%u) ", _heapmemavail(), ip); //cprintf("\r\ncoreshell (@%u) ", ip); #else printf("\ncoreshell [%u] ", ip); #endif } void x16_top() { #ifdef X16 gotoxy(0,0); #endif } void x16_clrscr() { #ifdef X16 clrscr(); gotoxy(0,0); #endif } int x16_getc() { #ifdef X16 return cgetc(); #else return getc(stdin); #endif } void x16_loadfile(char* name, unsigned char bank, unsigned int location) { #ifdef X16 setBank(bank); cbm_k_setnam(name); cbm_k_setlfs(IGNORE_LFN,EMULATOR_FILE_SYSTEM,SA_IGNORE_HEADER); cbm_k_load(LOAD_FLAG, location); #else printf("%s (%d)\n", name, location); #endif } void x16_printCell(Cell *cell, char* postfix) { #ifdef X16 cprintf("%s %c%-5d %c%-5d", getOpcodeName(cell->opcode), getMode(cell->aMode), cell->A, getMode(cell->bMode), cell->B ); if (*postfix) cputs(postfix); #else printf("%s %c%-5d %c%-5d %s", getOpcodeName(cell->opcode), getMode(cell->aMode), cell->A, getMode(cell->bMode), cell->B, *postfix? postfix : "" ); #endif } void x16_msg(char* s) { #ifdef X16 cprintf("%s\r\n", s); #else printf("%s\n", s); #endif } void x16_msg2(char* a, char *b) { #ifdef X16 cprintf("%s %s\r\n", a, b); #else printf("%s %s\n", a, b); #endif } void x16_putValue(char* label, unsigned int value) { #ifdef X16 cprintf("%s: %u\r\n", label, value); #else printf("%s: %u\n", label, value); #endif } void x16_putString(char* label, char* value) { #ifdef X16 cprintf("%s: %s\r\n", label, value); #else printf("%s: %s\n", label, value); #endif } void x16_arena_draw() { int pos; #ifdef X16 unsigned char y; unsigned char x; /* gotoxy(WARRIOR_LIST_LEFT,0); for(x=0; x<WARRIORS_MAX; ++x) { textcolor(x+2); cputc('1'+x); } textcolor(DEFAULT_COLOR); */ //gotoxy(79,0); //cputc('e'); textcolor(DKGREY); for(pos=0; pos<CORESIZE/2; ++pos) { y = pos / 80; x = pos % 80; cputcxy(ARENA_LEFT+x,ARENA_TOP+y/2,SQUARE_SW); } textcolor(DEFAULT_COLOR); #else printf(" "); for(pos=0; pos<CORESIZE/2; ++pos) { printf("%c", '.'); if (pos % 78 == 77) printf("\n "); } #endif } void x16_arena_touch(int ip, unsigned char owner) { unsigned char y = ip / 160; unsigned char x = ip % 160; if (x16_stepMode > 0) return; #ifdef X16 textcolor(owner+2); // // y ranges from 0 to 50. // x ranges from 0 to 160. // // We need to "compress" x into 80 positions. // cputcxy(ARENA_LEFT+x/2, ARENA_TOP+y/2, arena_square[y%2][x%2]); // was: CIRCLE_FILLED textcolor(DEFAULT_COLOR); /* if ( epoch % 256 == 0 ) { cputcxy(79,1, '0' + (epoch*10)/MAXIMUM_EPOCHS); } */ #else printf("%u @ %u\n\n", owner, ip); #endif } /* * Mark the space underneath this warrior's ID number. */ void x16_ps(unsigned char owner, char state) { #ifdef X16 cputcxy(WARRIOR_LIST_LEFT+owner,1, state); #endif } void x16_arena_ps(unsigned char owner, unsigned char pid, char *opcode) { #ifdef X16 gotoxy((owner % 4) * 20, pid % 4); cputs(opcode); #else printf("%u:%u %s", owner, pid, opcode); #endif } void x16_ps_log(char *msg, unsigned char owner, unsigned char pid, int ip) { #ifdef X16 cprintf("%s(%u:%u @%u)\r\n", msg, owner, pid, ip); #else printf("%s(%u:%u @%u)\n", msg, owner, pid, ip); #endif } void x16_arena_dump(int start, int end) { Cell *cell; int x; int pos; int len = end - start; if (len < 0) // swap { start = end; len = -len; } for(x=0; x<len; ++x) { pos = x + start; if (pos < 0) pos += CORESIZE; if (pos > CORESIZE) pos -= CORESIZE; cell = arena_getLocation(pos); #ifdef X16 cprintf(" %5d: ", pos); #else printf(" %5d: ", pos); #endif x16_printCell(cell, " "); pos += len; if (pos > CORESIZE) pos -= CORESIZE; cell = arena_getLocation(pos); #ifdef X16 cprintf(" %5d: ", pos); #else printf(" %5d: ", pos); #endif x16_printCell(cell, "\r\n"); } x16_putValue("system status", corewar_system_status); /* #ifdef X16 cprintf("st:%u\r\n", corewar_system_status); #else printf("st:%u\n", corewar_system_status); #endif*/ }
20.612195
89
0.494853
850ad6fe07836b2bfe54cdaa4a730a006bb69943
632
c
C
src/bootpd.rh51/strerror.c
DanIverson/OpenVnmrJ
0db324603dbd8f618a6a9526b9477a999c5a4cc3
[ "Apache-2.0" ]
32
2016-06-17T05:04:26.000Z
2022-03-28T17:54:44.000Z
src/bootpd.rh51/strerror.c
timburrow/openvnmrj-source
f5e65eb2db4bded3437701f0fa91abd41928579c
[ "Apache-2.0" ]
128
2016-07-13T17:09:02.000Z
2022-03-28T17:53:52.000Z
src/bootpd.rh51/strerror.c
timburrow/openvnmrj-source
f5e65eb2db4bded3437701f0fa91abd41928579c
[ "Apache-2.0" ]
102
2016-01-23T15:27:16.000Z
2022-03-20T05:41:54.000Z
/* * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ /* * strerror() - for those systems that don't have it yet. * Doing it this way avoids yet another ifdef... */ /* These are part of the C library. (See perror.3) */ extern char *sys_errlist[]; extern int sys_nerr; static char errmsg[80]; char * strerror(en) int en; { if ((0 <= en) && (en < sys_nerr)) return sys_errlist[en]; sprintf(errmsg, "Error %d", en); return errmsg; }
21.066667
70
0.675633
8b56fe14ddd9bf501f6c84cfa5af97660ebe8dcc
2,456
h
C
components/plugin/plugintemplate.h
xuannt88/qt-material-widgets
d6493354909aaf363063da468ca954c8a230a262
[ "BSD-3-Clause" ]
1
2021-07-07T01:17:12.000Z
2021-07-07T01:17:12.000Z
components/plugin/plugintemplate.h
xuannt88/qt-material-widgets
d6493354909aaf363063da468ca954c8a230a262
[ "BSD-3-Clause" ]
null
null
null
components/plugin/plugintemplate.h
xuannt88/qt-material-widgets
d6493354909aaf363063da468ca954c8a230a262
[ "BSD-3-Clause" ]
null
null
null
#ifndef PLUGINTEMPLATE_H #define PLUGINTEMPLATE_H #define QT_DESIGN_PLUGIN(pluginName, headerFile, className) \ class pluginName : public QObject, public QDesignerCustomWidgetInterface \ { \ Q_OBJECT \ public: \ explicit pluginName(QObject *parent = nullptr):QObject(parent) {} \ \ QString name() const override { return #className; } \ QString group() const override { return "Qt Material Widgets"; } \ QString toolTip() const override { return QString(); } \ QString whatsThis() const override { return QString(); } \ QString includeFile() const override { return headerFile; } \ QIcon icon() const override { return QIcon(); } \ \ QWidget *createWidget(QWidget *parent) override { return new className(parent); } \ bool isContainer() const override { return true; } \ bool isInitialized() const override { return initialized; } \ void initialize(QDesignerFormEditorInterface * /*core*/) override { \ if (initialized) \ return; \ \ initialized = true; \ } \ \ private: \ bool initialized; \ }; \ #endif // PLUGINTEMPLATE_H
72.235294
87
0.306596
64ffc196d934d18d960eb68a20e653993e38d237
43,245
h
C
BCC102/include/windows/sdk/streamcache.h
FarouDev/Projects-for-beginner-with-Cpp
1210457c122cb5da8f7c5a4a7386eb064e8b31b0
[ "MIT" ]
null
null
null
BCC102/include/windows/sdk/streamcache.h
FarouDev/Projects-for-beginner-with-Cpp
1210457c122cb5da8f7c5a4a7386eb064e8b31b0
[ "MIT" ]
null
null
null
BCC102/include/windows/sdk/streamcache.h
FarouDev/Projects-for-beginner-with-Cpp
1210457c122cb5da8f7c5a4a7386eb064e8b31b0
[ "MIT" ]
null
null
null
#pragma option push -b -a8 -pc -A- /*P_O_Push*/ /* this ALWAYS GENERATED file contains the definitions for the interfaces */ /* File created by MIDL compiler version 7.00.0499 */ /* Compiler settings for streamcache.idl: Oicf, W1, Zp8, env=Win32 (32b run) protocol : dce , ms_ext, c_ext, robust error checks: allocation ref bounds_check enum stub_data VC __declspec() decoration level: __declspec(uuid()), __declspec(selectany), __declspec(novtable) DECLSPEC_UUID(), MIDL_INTERFACE() */ //@@MIDL_FILE_HEADING( ) #pragma warning( disable: 4049 ) /* more than 64k source lines */ /* verify that the <rpcndr.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCNDR_H_VERSION__ #define __REQUIRED_RPCNDR_H_VERSION__ 500 #endif /* verify that the <rpcsal.h> version is high enough to compile this file*/ #ifndef __REQUIRED_RPCSAL_H_VERSION__ #define __REQUIRED_RPCSAL_H_VERSION__ 100 #endif #include "rpc.h" #include "rpcndr.h" #ifndef __RPCNDR_H_VERSION__ #error this stub requires an updated version of <rpcndr.h> #endif // __RPCNDR_H_VERSION__ #ifndef COM_NO_WINDOWS_H #include "windows.h" #include "ole2.h" #endif /*COM_NO_WINDOWS_H*/ #ifndef __streamcache_h__ #define __streamcache_h__ #if defined(_MSC_VER) && (_MSC_VER >= 1020) #pragma once #endif /* Forward Declarations */ #ifndef __IWMSCacheProxy_FWD_DEFINED__ #define __IWMSCacheProxy_FWD_DEFINED__ typedef interface IWMSCacheProxy IWMSCacheProxy; #endif /* __IWMSCacheProxy_FWD_DEFINED__ */ #ifndef __IWMSCacheProxyCallback_FWD_DEFINED__ #define __IWMSCacheProxyCallback_FWD_DEFINED__ typedef interface IWMSCacheProxyCallback IWMSCacheProxyCallback; #endif /* __IWMSCacheProxyCallback_FWD_DEFINED__ */ #ifndef __IWMSCacheProxyServer_FWD_DEFINED__ #define __IWMSCacheProxyServer_FWD_DEFINED__ typedef interface IWMSCacheProxyServer IWMSCacheProxyServer; #endif /* __IWMSCacheProxyServer_FWD_DEFINED__ */ #ifndef __IWMSCacheProxyServerCallback_FWD_DEFINED__ #define __IWMSCacheProxyServerCallback_FWD_DEFINED__ typedef interface IWMSCacheProxyServerCallback IWMSCacheProxyServerCallback; #endif /* __IWMSCacheProxyServerCallback_FWD_DEFINED__ */ #ifndef __IWMSCacheItemDescriptor_FWD_DEFINED__ #define __IWMSCacheItemDescriptor_FWD_DEFINED__ typedef interface IWMSCacheItemDescriptor IWMSCacheItemDescriptor; #endif /* __IWMSCacheItemDescriptor_FWD_DEFINED__ */ #ifndef __IWMSCacheItemCollection_FWD_DEFINED__ #define __IWMSCacheItemCollection_FWD_DEFINED__ typedef interface IWMSCacheItemCollection IWMSCacheItemCollection; #endif /* __IWMSCacheItemCollection_FWD_DEFINED__ */ /* header files for imported files */ #include "objidl.h" #include "nsscore.h" #include "DataContainerVersion.h" #include "event.h" #include "WMSProxy.h" #ifdef __cplusplus extern "C"{ #endif /* interface __MIDL_itf_streamcache_0000_0000 */ /* [local] */ //***************************************************************************** // // Microsoft Windows Media // Copyright (C) Microsoft Corporation. All rights reserved. // // Automatically generated by Midl from streamCache.idl // // DO NOT EDIT THIS FILE. // //***************************************************************************** EXTERN_GUID( IID_IWMSCacheProxy, 0x2E34AB83,0x0D3D,0x11d2,0x9E,0xEE,0x00,0x60,0x97,0xD2,0xD7,0xCF ); EXTERN_GUID( IID_IWMSCacheProxyCallback, 0x2E34AB84,0x0D3D,0x11d2,0x9E,0xEE,0x00,0x60,0x97,0xD2,0xD7,0xCF ); EXTERN_GUID( IID_IWMSCacheProxyServer, 0x68F2A550,0xD815,0x11D2,0xBE,0xF6,0x00,0xA0,0xC9,0x5E,0xC3,0x43 ); EXTERN_GUID( IID_IWMSCacheProxyServerCallback, 0x68F2A551,0xD815,0x11D2,0xBE,0xF6,0x00,0xA0,0xC9,0x5E,0xC3,0x43 ); EXTERN_GUID( IID_IWMSCacheItemDescriptor, 0xC3CBA330,0xAC05,0x11D2,0xBE,0xF0,0x00,0xA0,0xC9,0x5E,0xC3,0x43 ); EXTERN_GUID( IID_IWMSCacheItemCollection, 0xE6E05D80,0xF45C,0x11D2,0xBE,0xFE,0x00,0xA0,0xC9,0x5E,0xC3,0x43 ); typedef /* [public] */ enum WMS_CACHE_QUERY_MISS_RESPONSE { WMS_CACHE_QUERY_MISS_SKIP = 0, WMS_CACHE_QUERY_MISS_DISCONNECT = ( WMS_CACHE_QUERY_MISS_SKIP + 1 ) , WMS_CACHE_QUERY_MISS_REDIRECT = ( WMS_CACHE_QUERY_MISS_DISCONNECT + 1 ) , WMS_CACHE_QUERY_MISS_REDIRECT_TO_PROXY = ( WMS_CACHE_QUERY_MISS_REDIRECT + 1 ) , WMS_CACHE_QUERY_MISS_PLAY_BROADCAST = ( WMS_CACHE_QUERY_MISS_REDIRECT_TO_PROXY + 1 ) , WMS_CACHE_QUERY_MISS_PLAY_ON_DEMAND = ( WMS_CACHE_QUERY_MISS_PLAY_BROADCAST + 1 ) , WMS_CACHE_QUERY_MISS_FORWARD_REQUEST = ( WMS_CACHE_QUERY_MISS_PLAY_ON_DEMAND + 1 ) , WMS_CACHE_QUERY_MISS_PROCESS_REQUEST = ( WMS_CACHE_QUERY_MISS_FORWARD_REQUEST + 1 ) } WMS_CACHE_QUERY_MISS_RESPONSE; typedef /* [public] */ enum WMS_CACHE_QUERY_RESPONSE { WMS_CACHE_QUERY_HIT_PLAY_ON_DEMAND = 0, WMS_CACHE_QUERY_HIT_PLAY_BROADCAST = ( WMS_CACHE_QUERY_HIT_PLAY_ON_DEMAND + 1 ) , WMS_CACHE_QUERY_HIT_PROCESS_REQUEST = ( WMS_CACHE_QUERY_HIT_PLAY_BROADCAST + 1 ) , WMS_CACHE_QUERY_MISS = ( WMS_CACHE_QUERY_HIT_PROCESS_REQUEST + 1 ) } WMS_CACHE_QUERY_RESPONSE; typedef /* [public] */ enum WMS_CACHE_VERSION_COMPARE_RESPONSE { WMS_CACHE_VERSION_FAIL_TO_CHECK_VERSION = 0, WMS_CACHE_VERSION_CACHE_STALE = ( WMS_CACHE_VERSION_FAIL_TO_CHECK_VERSION + 1 ) , WMS_CACHE_VERSION_CACHE_UP_TO_DATE = ( WMS_CACHE_VERSION_CACHE_STALE + 1 ) } WMS_CACHE_VERSION_COMPARE_RESPONSE; typedef /* [public] */ enum WMS_CACHE_CONTENT_TYPE_FLAGS { WMS_CACHE_CONTENT_TYPE_BROADCAST = 0x1, WMS_CACHE_CONTENT_TYPE_PLAYLIST = 0x2 } WMS_CACHE_CONTENT_TYPE_FLAGS; typedef /* [public] */ enum WMS_CACHE_QUERY_TYPE_FLAGS { WMS_CACHE_QUERY_OPEN = 0x1, WMS_CACHE_QUERY_GET_CONTENT_INFO = 0x2, WMS_CACHE_QUERY_CACHE_EVENT = 0x4, WMS_CACHE_QUERY_REVERSE_PROXY = 0x8, WMS_CACHE_QUERY_LOCAL_EVENT = 0x10 } WMS_CACHE_QUERY_TYPE_FLAGS; typedef /* [public] */ enum WMS_CACHE_CONTENT_DOWNLOAD_FLAGS { WMS_CONTENT_DOWNLOAD_ABORT_IF_BCAST = 0x1 } WMS_CACHE_CONTENT_DOWNLOAD_FLAGS; typedef /* [public] */ enum WMS_CACHE_REMOTE_EVENT_FLAGS { WMS_CACHE_REMOTE_OPEN = 0x1, WMS_CACHE_REMOTE_CLOSE = 0x2, WMS_CACHE_REMOTE_LOG = 0x4 } WMS_CACHE_REMOTE_EVENT_FLAGS; extern RPC_IF_HANDLE __MIDL_itf_streamcache_0000_0000_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_streamcache_0000_0000_v0_0_s_ifspec; #ifndef __IWMSCacheProxy_INTERFACE_DEFINED__ #define __IWMSCacheProxy_INTERFACE_DEFINED__ /* interface IWMSCacheProxy */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheProxy; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("2E34AB83-0D3D-11d2-9EEE-006097D2D7CF") IWMSCacheProxy : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryCache( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSCommandContext *pCommandContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ long lQueryType, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QueryCacheMissPolicy( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSCommandContext *pCommandContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IUnknown *pCachePluginContext, /* [in] */ long lQueryType, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveCacheItem( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveAllCacheItems( /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AddCacheItem( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in BSTR bstrPrestuffUrl, /* [in] */ long lExpiration, /* [in] */ long lBandwidth, /* [in] */ long lRemoteEventFlags, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE QuerySpaceForCacheItem( /* [in] */ long lContentSizeLow, /* [in] */ long lContentSizeHigh, /* [out] */ __RPC__out VARIANT_BOOL *pvarfSpaceAvail) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FindCacheItem( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [out] */ __RPC__deref_out_opt IWMSCacheItemDescriptor **ppCacheItemDescriptor) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateCacheItemCollection( /* [out] */ __RPC__deref_out_opt IWMSCacheItemCollection **ppCacheItemCollection) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnCacheClientClose( /* [in] */ HRESULT resultHr, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext) = 0; }; #else /* C style interface */ typedef struct IWMSCacheProxyVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheProxy * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheProxy * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheProxy * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryCache )( IWMSCacheProxy * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSCommandContext *pCommandContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ long lQueryType, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QueryCacheMissPolicy )( IWMSCacheProxy * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSCommandContext *pCommandContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IUnknown *pCachePluginContext, /* [in] */ long lQueryType, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveCacheItem )( IWMSCacheProxy * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveAllCacheItems )( IWMSCacheProxy * This, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddCacheItem )( IWMSCacheProxy * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in BSTR bstrPrestuffUrl, /* [in] */ long lExpiration, /* [in] */ long lBandwidth, /* [in] */ long lRemoteEventFlags, /* [in] */ __RPC__in_opt IWMSCacheProxyCallback *pCallback, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *QuerySpaceForCacheItem )( IWMSCacheProxy * This, /* [in] */ long lContentSizeLow, /* [in] */ long lContentSizeHigh, /* [out] */ __RPC__out VARIANT_BOOL *pvarfSpaceAvail); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FindCacheItem )( IWMSCacheProxy * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [out] */ __RPC__deref_out_opt IWMSCacheItemDescriptor **ppCacheItemDescriptor); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateCacheItemCollection )( IWMSCacheProxy * This, /* [out] */ __RPC__deref_out_opt IWMSCacheItemCollection **ppCacheItemCollection); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnCacheClientClose )( IWMSCacheProxy * This, /* [in] */ HRESULT resultHr, /* [in] */ __RPC__in_opt IWMSContext *pUserContext, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext); END_INTERFACE } IWMSCacheProxyVtbl; interface IWMSCacheProxy { CONST_VTBL struct IWMSCacheProxyVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheProxy_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheProxy_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheProxy_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheProxy_QueryCache(This,bstrOriginUrl,pUserContext,pCommandContext,pPresentationContext,lQueryType,pCallback,varContext) \ ( (This)->lpVtbl -> QueryCache(This,bstrOriginUrl,pUserContext,pCommandContext,pPresentationContext,lQueryType,pCallback,varContext) ) #define IWMSCacheProxy_QueryCacheMissPolicy(This,bstrOriginUrl,pUserContext,pCommandContext,pPresentationContext,pCachePluginContext,lQueryType,pCallback,varContext) \ ( (This)->lpVtbl -> QueryCacheMissPolicy(This,bstrOriginUrl,pUserContext,pCommandContext,pPresentationContext,pCachePluginContext,lQueryType,pCallback,varContext) ) #define IWMSCacheProxy_RemoveCacheItem(This,bstrOriginUrl,pCallback,varContext) \ ( (This)->lpVtbl -> RemoveCacheItem(This,bstrOriginUrl,pCallback,varContext) ) #define IWMSCacheProxy_RemoveAllCacheItems(This,pCallback,varContext) \ ( (This)->lpVtbl -> RemoveAllCacheItems(This,pCallback,varContext) ) #define IWMSCacheProxy_AddCacheItem(This,bstrOriginUrl,bstrPrestuffUrl,lExpiration,lBandwidth,lRemoteEventFlags,pCallback,varContext) \ ( (This)->lpVtbl -> AddCacheItem(This,bstrOriginUrl,bstrPrestuffUrl,lExpiration,lBandwidth,lRemoteEventFlags,pCallback,varContext) ) #define IWMSCacheProxy_QuerySpaceForCacheItem(This,lContentSizeLow,lContentSizeHigh,pvarfSpaceAvail) \ ( (This)->lpVtbl -> QuerySpaceForCacheItem(This,lContentSizeLow,lContentSizeHigh,pvarfSpaceAvail) ) #define IWMSCacheProxy_FindCacheItem(This,bstrOriginUrl,ppCacheItemDescriptor) \ ( (This)->lpVtbl -> FindCacheItem(This,bstrOriginUrl,ppCacheItemDescriptor) ) #define IWMSCacheProxy_CreateCacheItemCollection(This,ppCacheItemCollection) \ ( (This)->lpVtbl -> CreateCacheItemCollection(This,ppCacheItemCollection) ) #define IWMSCacheProxy_OnCacheClientClose(This,resultHr,pUserContext,pPresentationContext) \ ( (This)->lpVtbl -> OnCacheClientClose(This,resultHr,pUserContext,pPresentationContext) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheProxy_INTERFACE_DEFINED__ */ /* interface __MIDL_itf_streamcache_0000_0001 */ /* [local] */ extern RPC_IF_HANDLE __MIDL_itf_streamcache_0000_0001_v0_0_c_ifspec; extern RPC_IF_HANDLE __MIDL_itf_streamcache_0000_0001_v0_0_s_ifspec; #ifndef __IWMSCacheProxyCallback_INTERFACE_DEFINED__ #define __IWMSCacheProxyCallback_INTERFACE_DEFINED__ /* interface IWMSCacheProxyCallback */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheProxyCallback; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("2E34AB84-0D3D-11d2-9EEE-006097D2D7CF") IWMSCacheProxyCallback : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnQueryCache( /* [in] */ long lHr, /* [in] */ WMS_CACHE_QUERY_RESPONSE Response, /* [in] */ __RPC__in BSTR bstrCacheUrl, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ __RPC__in_opt IUnknown *pCachePluginContext, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnQueryCacheMissPolicy( /* [in] */ long lHr, /* [in] */ WMS_CACHE_QUERY_MISS_RESPONSE CacheMissPolicy, /* [in] */ __RPC__in BSTR bstrUrl, /* [in] */ __RPC__in_opt IWMSProxyContext *pProxyContext, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnRemoveCacheItem( /* [in] */ long lHr, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnRemoveAllCacheItems( /* [in] */ long lHr, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnAddCacheItem( /* [in] */ long lHr, /* [in] */ __RPC__in_opt IWMSCacheItemDescriptor *pCacheItemDescriptor, /* [in] */ VARIANT varServerContext) = 0; }; #else /* C style interface */ typedef struct IWMSCacheProxyCallbackVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheProxyCallback * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheProxyCallback * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheProxyCallback * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnQueryCache )( IWMSCacheProxyCallback * This, /* [in] */ long lHr, /* [in] */ WMS_CACHE_QUERY_RESPONSE Response, /* [in] */ __RPC__in BSTR bstrCacheUrl, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ __RPC__in_opt IUnknown *pCachePluginContext, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnQueryCacheMissPolicy )( IWMSCacheProxyCallback * This, /* [in] */ long lHr, /* [in] */ WMS_CACHE_QUERY_MISS_RESPONSE CacheMissPolicy, /* [in] */ __RPC__in BSTR bstrUrl, /* [in] */ __RPC__in_opt IWMSProxyContext *pProxyContext, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnRemoveCacheItem )( IWMSCacheProxyCallback * This, /* [in] */ long lHr, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnRemoveAllCacheItems )( IWMSCacheProxyCallback * This, /* [in] */ long lHr, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnAddCacheItem )( IWMSCacheProxyCallback * This, /* [in] */ long lHr, /* [in] */ __RPC__in_opt IWMSCacheItemDescriptor *pCacheItemDescriptor, /* [in] */ VARIANT varServerContext); END_INTERFACE } IWMSCacheProxyCallbackVtbl; interface IWMSCacheProxyCallback { CONST_VTBL struct IWMSCacheProxyCallbackVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheProxyCallback_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheProxyCallback_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheProxyCallback_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheProxyCallback_OnQueryCache(This,lHr,Response,bstrCacheUrl,pContentInfo,pCachePluginContext,varContext) \ ( (This)->lpVtbl -> OnQueryCache(This,lHr,Response,bstrCacheUrl,pContentInfo,pCachePluginContext,varContext) ) #define IWMSCacheProxyCallback_OnQueryCacheMissPolicy(This,lHr,CacheMissPolicy,bstrUrl,pProxyContext,pContentInfo,varContext) \ ( (This)->lpVtbl -> OnQueryCacheMissPolicy(This,lHr,CacheMissPolicy,bstrUrl,pProxyContext,pContentInfo,varContext) ) #define IWMSCacheProxyCallback_OnRemoveCacheItem(This,lHr,varContext) \ ( (This)->lpVtbl -> OnRemoveCacheItem(This,lHr,varContext) ) #define IWMSCacheProxyCallback_OnRemoveAllCacheItems(This,lHr,varContext) \ ( (This)->lpVtbl -> OnRemoveAllCacheItems(This,lHr,varContext) ) #define IWMSCacheProxyCallback_OnAddCacheItem(This,lHr,pCacheItemDescriptor,varServerContext) \ ( (This)->lpVtbl -> OnAddCacheItem(This,lHr,pCacheItemDescriptor,varServerContext) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheProxyCallback_INTERFACE_DEFINED__ */ #ifndef __IWMSCacheProxyServer_INTERFACE_DEFINED__ #define __IWMSCacheProxyServer_INTERFACE_DEFINED__ /* interface IWMSCacheProxyServer */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheProxyServer; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("68F2A550-D815-11D2-BEF6-00A0C95EC343") IWMSCacheProxyServer : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetContentInformation( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CompareContentInformation( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE DownloadContent( /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in BSTR bstrCacheUrl, /* [in] */ long lBandwidth, /* [in] */ long lQuotaLow, /* [in] */ long lQuotaHigh, /* [in] */ long lBitFlags, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CancelDownloadContent( /* [in] */ __RPC__in_opt IWMSContext *pArchiveContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext) = 0; }; #else /* C style interface */ typedef struct IWMSCacheProxyServerVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheProxyServer * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheProxyServer * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheProxyServer * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetContentInformation )( IWMSCacheProxyServer * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CompareContentInformation )( IWMSCacheProxyServer * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ __RPC__in_opt IWMSContext *pPresentationContext, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *DownloadContent )( IWMSCacheProxyServer * This, /* [in] */ __RPC__in BSTR bstrOriginUrl, /* [in] */ __RPC__in BSTR bstrCacheUrl, /* [in] */ long lBandwidth, /* [in] */ long lQuotaLow, /* [in] */ long lQuotaHigh, /* [in] */ long lBitFlags, /* [in] */ __RPC__in_opt IWMSCacheProxy *pICacheProxy, /* [optional][in] */ __RPC__in_opt IWMSProxyContext *pIProxyContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CancelDownloadContent )( IWMSCacheProxyServer * This, /* [in] */ __RPC__in_opt IWMSContext *pArchiveContext, /* [optional][in] */ __RPC__in_opt IWMSCacheProxyServerCallback *pCallback, /* [optional][in] */ VARIANT varContext); END_INTERFACE } IWMSCacheProxyServerVtbl; interface IWMSCacheProxyServer { CONST_VTBL struct IWMSCacheProxyServerVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheProxyServer_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheProxyServer_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheProxyServer_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheProxyServer_GetContentInformation(This,bstrOriginUrl,pPresentationContext,pICacheProxy,pIProxyContext,pCallback,varContext) \ ( (This)->lpVtbl -> GetContentInformation(This,bstrOriginUrl,pPresentationContext,pICacheProxy,pIProxyContext,pCallback,varContext) ) #define IWMSCacheProxyServer_CompareContentInformation(This,bstrOriginUrl,pContentInfo,pPresentationContext,pICacheProxy,pIProxyContext,pCallback,varContext) \ ( (This)->lpVtbl -> CompareContentInformation(This,bstrOriginUrl,pContentInfo,pPresentationContext,pICacheProxy,pIProxyContext,pCallback,varContext) ) #define IWMSCacheProxyServer_DownloadContent(This,bstrOriginUrl,bstrCacheUrl,lBandwidth,lQuotaLow,lQuotaHigh,lBitFlags,pICacheProxy,pIProxyContext,pCallback,varContext) \ ( (This)->lpVtbl -> DownloadContent(This,bstrOriginUrl,bstrCacheUrl,lBandwidth,lQuotaLow,lQuotaHigh,lBitFlags,pICacheProxy,pIProxyContext,pCallback,varContext) ) #define IWMSCacheProxyServer_CancelDownloadContent(This,pArchiveContext,pCallback,varContext) \ ( (This)->lpVtbl -> CancelDownloadContent(This,pArchiveContext,pCallback,varContext) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheProxyServer_INTERFACE_DEFINED__ */ #ifndef __IWMSCacheProxyServerCallback_INTERFACE_DEFINED__ #define __IWMSCacheProxyServerCallback_INTERFACE_DEFINED__ /* interface IWMSCacheProxyServerCallback */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheProxyServerCallback; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("68F2A551-D815-11D2-BEF6-00A0C95EC343") IWMSCacheProxyServerCallback : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnGetContentInformation( /* [in] */ long lHr, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnCompareContentInformation( /* [in] */ long lHr, /* [in] */ WMS_CACHE_VERSION_COMPARE_RESPONSE CompareResponse, /* [in] */ __RPC__in_opt IWMSContext *pNewContentInfo, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnDownloadContentProgress( /* [in] */ long lHr, /* [in] */ WMS_RECORD_PROGRESS_OPCODE opCode, /* [in] */ __RPC__in_opt IWMSContext *pArchiveContext, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnDownloadContentFinished( /* [in] */ long lHr, /* [in] */ __RPC__in SAFEARRAY * psaArchiveContexts, /* [in] */ VARIANT varContext) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnCancelDownloadContent( /* [in] */ long lHr, /* [in] */ VARIANT varContext) = 0; }; #else /* C style interface */ typedef struct IWMSCacheProxyServerCallbackVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheProxyServerCallback * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheProxyServerCallback * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheProxyServerCallback * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnGetContentInformation )( IWMSCacheProxyServerCallback * This, /* [in] */ long lHr, /* [in] */ __RPC__in_opt IWMSContext *pContentInfo, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnCompareContentInformation )( IWMSCacheProxyServerCallback * This, /* [in] */ long lHr, /* [in] */ WMS_CACHE_VERSION_COMPARE_RESPONSE CompareResponse, /* [in] */ __RPC__in_opt IWMSContext *pNewContentInfo, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnDownloadContentProgress )( IWMSCacheProxyServerCallback * This, /* [in] */ long lHr, /* [in] */ WMS_RECORD_PROGRESS_OPCODE opCode, /* [in] */ __RPC__in_opt IWMSContext *pArchiveContext, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnDownloadContentFinished )( IWMSCacheProxyServerCallback * This, /* [in] */ long lHr, /* [in] */ __RPC__in SAFEARRAY * psaArchiveContexts, /* [in] */ VARIANT varContext); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnCancelDownloadContent )( IWMSCacheProxyServerCallback * This, /* [in] */ long lHr, /* [in] */ VARIANT varContext); END_INTERFACE } IWMSCacheProxyServerCallbackVtbl; interface IWMSCacheProxyServerCallback { CONST_VTBL struct IWMSCacheProxyServerCallbackVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheProxyServerCallback_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheProxyServerCallback_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheProxyServerCallback_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheProxyServerCallback_OnGetContentInformation(This,lHr,pContentInfo,varContext) \ ( (This)->lpVtbl -> OnGetContentInformation(This,lHr,pContentInfo,varContext) ) #define IWMSCacheProxyServerCallback_OnCompareContentInformation(This,lHr,CompareResponse,pNewContentInfo,varContext) \ ( (This)->lpVtbl -> OnCompareContentInformation(This,lHr,CompareResponse,pNewContentInfo,varContext) ) #define IWMSCacheProxyServerCallback_OnDownloadContentProgress(This,lHr,opCode,pArchiveContext,varContext) \ ( (This)->lpVtbl -> OnDownloadContentProgress(This,lHr,opCode,pArchiveContext,varContext) ) #define IWMSCacheProxyServerCallback_OnDownloadContentFinished(This,lHr,psaArchiveContexts,varContext) \ ( (This)->lpVtbl -> OnDownloadContentFinished(This,lHr,psaArchiveContexts,varContext) ) #define IWMSCacheProxyServerCallback_OnCancelDownloadContent(This,lHr,varContext) \ ( (This)->lpVtbl -> OnCancelDownloadContent(This,lHr,varContext) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheProxyServerCallback_INTERFACE_DEFINED__ */ #ifndef __IWMSCacheItemDescriptor_INTERFACE_DEFINED__ #define __IWMSCacheItemDescriptor_INTERFACE_DEFINED__ /* interface IWMSCacheItemDescriptor */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheItemDescriptor; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("C3CBA330-AC05-11D2-BEF0-00A0C95EC343") IWMSCacheItemDescriptor : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetOriginUrl( /* [out] */ __RPC__deref_out_opt BSTR *pbstrOriginUrl) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCacheUrl( /* [out] */ __RPC__deref_out_opt BSTR *pbstrCacheUrl) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetContentInformation( /* [out] */ __RPC__deref_out_opt IWMSContext **ppContentInfo) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetContentSize( /* [out] */ __RPC__out long *plContentSizeLow, /* [out] */ __RPC__out long *plContentSizeHigh) = 0; }; #else /* C style interface */ typedef struct IWMSCacheItemDescriptorVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheItemDescriptor * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheItemDescriptor * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheItemDescriptor * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetOriginUrl )( IWMSCacheItemDescriptor * This, /* [out] */ __RPC__deref_out_opt BSTR *pbstrOriginUrl); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCacheUrl )( IWMSCacheItemDescriptor * This, /* [out] */ __RPC__deref_out_opt BSTR *pbstrCacheUrl); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetContentInformation )( IWMSCacheItemDescriptor * This, /* [out] */ __RPC__deref_out_opt IWMSContext **ppContentInfo); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetContentSize )( IWMSCacheItemDescriptor * This, /* [out] */ __RPC__out long *plContentSizeLow, /* [out] */ __RPC__out long *plContentSizeHigh); END_INTERFACE } IWMSCacheItemDescriptorVtbl; interface IWMSCacheItemDescriptor { CONST_VTBL struct IWMSCacheItemDescriptorVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheItemDescriptor_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheItemDescriptor_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheItemDescriptor_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheItemDescriptor_GetOriginUrl(This,pbstrOriginUrl) \ ( (This)->lpVtbl -> GetOriginUrl(This,pbstrOriginUrl) ) #define IWMSCacheItemDescriptor_GetCacheUrl(This,pbstrCacheUrl) \ ( (This)->lpVtbl -> GetCacheUrl(This,pbstrCacheUrl) ) #define IWMSCacheItemDescriptor_GetContentInformation(This,ppContentInfo) \ ( (This)->lpVtbl -> GetContentInformation(This,ppContentInfo) ) #define IWMSCacheItemDescriptor_GetContentSize(This,plContentSizeLow,plContentSizeHigh) \ ( (This)->lpVtbl -> GetContentSize(This,plContentSizeLow,plContentSizeHigh) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheItemDescriptor_INTERFACE_DEFINED__ */ #ifndef __IWMSCacheItemCollection_INTERFACE_DEFINED__ #define __IWMSCacheItemCollection_INTERFACE_DEFINED__ /* interface IWMSCacheItemCollection */ /* [helpstring][version][uuid][unique][object] */ EXTERN_C const IID IID_IWMSCacheItemCollection; #if defined(__cplusplus) && !defined(CINTERFACE) MIDL_INTERFACE("E6E05D80-F45C-11D2-BEFE-00A0C95EC343") IWMSCacheItemCollection : public IUnknown { public: virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCount( /* [out] */ __RPC__out long *plNumCacheItemDescriptors) = 0; virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetItem( /* [in] */ long lIndex, /* [out] */ __RPC__deref_out_opt IWMSCacheItemDescriptor **ppCacheItemDescriptor) = 0; }; #else /* C style interface */ typedef struct IWMSCacheItemCollectionVtbl { BEGIN_INTERFACE HRESULT ( STDMETHODCALLTYPE *QueryInterface )( IWMSCacheItemCollection * This, /* [in] */ __RPC__in REFIID riid, /* [iid_is][out] */ __RPC__deref_out void **ppvObject); ULONG ( STDMETHODCALLTYPE *AddRef )( IWMSCacheItemCollection * This); ULONG ( STDMETHODCALLTYPE *Release )( IWMSCacheItemCollection * This); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCount )( IWMSCacheItemCollection * This, /* [out] */ __RPC__out long *plNumCacheItemDescriptors); /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetItem )( IWMSCacheItemCollection * This, /* [in] */ long lIndex, /* [out] */ __RPC__deref_out_opt IWMSCacheItemDescriptor **ppCacheItemDescriptor); END_INTERFACE } IWMSCacheItemCollectionVtbl; interface IWMSCacheItemCollection { CONST_VTBL struct IWMSCacheItemCollectionVtbl *lpVtbl; }; #ifdef COBJMACROS #define IWMSCacheItemCollection_QueryInterface(This,riid,ppvObject) \ ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) #define IWMSCacheItemCollection_AddRef(This) \ ( (This)->lpVtbl -> AddRef(This) ) #define IWMSCacheItemCollection_Release(This) \ ( (This)->lpVtbl -> Release(This) ) #define IWMSCacheItemCollection_GetCount(This,plNumCacheItemDescriptors) \ ( (This)->lpVtbl -> GetCount(This,plNumCacheItemDescriptors) ) #define IWMSCacheItemCollection_GetItem(This,lIndex,ppCacheItemDescriptor) \ ( (This)->lpVtbl -> GetItem(This,lIndex,ppCacheItemDescriptor) ) #endif /* COBJMACROS */ #endif /* C style interface */ #endif /* __IWMSCacheItemCollection_INTERFACE_DEFINED__ */ /* Additional Prototypes for ALL interfaces */ unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); unsigned long __RPC_USER LPSAFEARRAY_UserSize( unsigned long *, unsigned long , LPSAFEARRAY * ); unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal( unsigned long *, unsigned char *, LPSAFEARRAY * ); unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); void __RPC_USER LPSAFEARRAY_UserFree( unsigned long *, LPSAFEARRAY * ); unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * ); unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * ); unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * ); void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * ); unsigned long __RPC_USER BSTR_UserSize64( unsigned long *, unsigned long , BSTR * ); unsigned char * __RPC_USER BSTR_UserMarshal64( unsigned long *, unsigned char *, BSTR * ); unsigned char * __RPC_USER BSTR_UserUnmarshal64(unsigned long *, unsigned char *, BSTR * ); void __RPC_USER BSTR_UserFree64( unsigned long *, BSTR * ); unsigned long __RPC_USER LPSAFEARRAY_UserSize64( unsigned long *, unsigned long , LPSAFEARRAY * ); unsigned char * __RPC_USER LPSAFEARRAY_UserMarshal64( unsigned long *, unsigned char *, LPSAFEARRAY * ); unsigned char * __RPC_USER LPSAFEARRAY_UserUnmarshal64(unsigned long *, unsigned char *, LPSAFEARRAY * ); void __RPC_USER LPSAFEARRAY_UserFree64( unsigned long *, LPSAFEARRAY * ); unsigned long __RPC_USER VARIANT_UserSize64( unsigned long *, unsigned long , VARIANT * ); unsigned char * __RPC_USER VARIANT_UserMarshal64( unsigned long *, unsigned char *, VARIANT * ); unsigned char * __RPC_USER VARIANT_UserUnmarshal64(unsigned long *, unsigned char *, VARIANT * ); void __RPC_USER VARIANT_UserFree64( unsigned long *, VARIANT * ); /* end of Additional Prototypes */ #ifdef __cplusplus } #endif #endif #pragma option pop /*P_O_Pop*/
39.52925
170
0.66477
3a64058a34632c7022a5e44701f97448bf5f379f
377
h
C
includes/playfair.h
Helios77760/Cryptic
1c6880b0948ce45b8dcadc9b27f140df2ee3db86
[ "MIT" ]
null
null
null
includes/playfair.h
Helios77760/Cryptic
1c6880b0948ce45b8dcadc9b27f140df2ee3db86
[ "MIT" ]
null
null
null
includes/playfair.h
Helios77760/Cryptic
1c6880b0948ce45b8dcadc9b27f140df2ee3db86
[ "MIT" ]
null
null
null
// // Created by Dylan Brasseur on 28/01/2018. // #ifndef CRYPTIC_PLAYFAIR_H #define CRYPTIC_PLAYFAIR_H #include "../utils.h" void ef_playfair(routineInfo info ); void df_playfair(routineInfo info); void cf_playfair(routineInfo info); char* es_playfair(routineInfo info); char* ds_playfair(routineInfo info); char* cs_playfair(routineInfo info); #endif //CRYPTIC_PLAYFAIR_H
22.176471
43
0.785146
d9dec2baf1b7e8733d38974e767f38410b83d32e
9,193
c
C
net/ip/ip_buf.c
32bitmicro/zephyr
c8c078442f2a2781ec770517579c4c6306964157
[ "Apache-2.0" ]
null
null
null
net/ip/ip_buf.c
32bitmicro/zephyr
c8c078442f2a2781ec770517579c4c6306964157
[ "Apache-2.0" ]
null
null
null
net/ip/ip_buf.c
32bitmicro/zephyr
c8c078442f2a2781ec770517579c4c6306964157
[ "Apache-2.0" ]
null
null
null
/** @file @brief Network buffers for IP stack IP data is passed between application and IP stack via a net_buf struct. */ /* * Copyright (c) 2015 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. */ #include <nanokernel.h> #include <toolchain.h> #include <string.h> #include <stdint.h> #include <net/net_core.h> #include <net/buf.h> #include <net/ip_buf.h> #include <net/net_ip.h> #include "ip/uip.h" #if !defined(CONFIG_NETWORK_IP_STACK_DEBUG_NET_BUF) #undef NET_DBG #define NET_DBG(...) #endif extern struct net_tuple *net_context_get_tuple(struct net_context *context); /* Available (free) buffers queue */ #ifndef IP_BUF_RX_SIZE #if CONFIG_IP_BUF_RX_SIZE > 0 #define IP_BUF_RX_SIZE CONFIG_IP_BUF_RX_SIZE #else #define IP_BUF_RX_SIZE 1 #endif #endif #ifndef IP_BUF_TX_SIZE #if CONFIG_IP_BUF_TX_SIZE > 0 #define IP_BUF_TX_SIZE CONFIG_IP_BUF_TX_SIZE #else #define IP_BUF_TX_SIZE 1 #endif #endif #ifdef DEBUG_IP_BUFS static int num_free_rx_bufs = IP_BUF_RX_SIZE; static int num_free_tx_bufs = IP_BUF_TX_SIZE; static inline void dec_free_rx_bufs(struct net_buf *buf) { if (!buf) { return; } num_free_rx_bufs--; if (num_free_rx_bufs < 0) { NET_DBG("*** ERROR *** Invalid RX buffer count.\n"); num_free_rx_bufs = 0; } } static inline void inc_free_rx_bufs(struct net_buf *buf) { if (!buf) { return; } if (num_free_rx_bufs > IP_BUF_RX_SIZE) { num_free_rx_bufs = IP_BUF_RX_SIZE; } else { num_free_rx_bufs++; } } static inline void dec_free_tx_bufs(struct net_buf *buf) { if (!buf) { return; } num_free_tx_bufs--; if (num_free_tx_bufs < 0) { NET_DBG("*** ERROR *** Invalid TX buffer count.\n"); num_free_tx_bufs = 0; } } static inline void inc_free_tx_bufs(struct net_buf *buf) { if (!buf) { return; } if (num_free_tx_bufs > IP_BUF_TX_SIZE) { num_free_tx_bufs = IP_BUF_TX_SIZE; } else { num_free_tx_bufs++; } } static inline int get_frees(enum ip_buf_type type) { switch (type) { case IP_BUF_RX: return num_free_rx_bufs; case IP_BUF_TX: return num_free_tx_bufs; } return 0xffffffff; } #define inc_free_rx_bufs_func inc_free_rx_bufs #define inc_free_tx_bufs_func inc_free_tx_bufs #else #define dec_free_rx_bufs(...) #define inc_free_rx_bufs(...) #define dec_free_tx_bufs(...) #define inc_free_tx_bufs(...) #define inc_free_rx_bufs_func(...) #define inc_free_tx_bufs_func(...) #endif static struct nano_fifo free_rx_bufs; static struct nano_fifo free_tx_bufs; static inline void free_rx_bufs_func(struct net_buf *buf) { inc_free_rx_bufs_func(buf); nano_fifo_put(buf->free, buf); } static inline void free_tx_bufs_func(struct net_buf *buf) { inc_free_tx_bufs_func(buf); nano_fifo_put(buf->free, buf); } static NET_BUF_POOL(rx_buffers, IP_BUF_RX_SIZE, IP_BUF_MAX_DATA, \ &free_rx_bufs, free_rx_bufs_func, \ sizeof(struct ip_buf)); static NET_BUF_POOL(tx_buffers, IP_BUF_TX_SIZE, IP_BUF_MAX_DATA, \ &free_tx_bufs, free_tx_bufs_func, \ sizeof(struct ip_buf)); static inline const char *type2str(enum ip_buf_type type) { switch (type) { case IP_BUF_RX: return "RX"; case IP_BUF_TX: return "TX"; } return NULL; } #ifdef DEBUG_IP_BUFS static struct net_buf *ip_buf_get_reserve_debug(enum ip_buf_type type, uint16_t reserve_head, const char *caller, int line) #else static struct net_buf *ip_buf_get_reserve(enum ip_buf_type type, uint16_t reserve_head) #endif { struct net_buf *buf = NULL; /* Note that we do not reserve any space in front of the * buffer so buf->data points to first byte of the IP header. * This is done like this so that IP stack works the same * way as BT and 802.15.4 stacks. * * The reserve_head variable in the function will tell * the size of the IP + other headers if there are any. * That variable is only used to calculate the pointer * where the application data starts. */ switch (type) { case IP_BUF_RX: buf = net_buf_get(&free_rx_bufs, 0); dec_free_rx_bufs(buf); break; case IP_BUF_TX: buf = net_buf_get(&free_tx_bufs, 0); dec_free_tx_bufs(buf); break; } if (!buf) { #ifdef DEBUG_IP_BUFS NET_ERR("Failed to get free %s buffer (%s():%d)\n", type2str(type), caller, line); #else NET_ERR("Failed to get free %s buffer\n", type2str(type)); #endif return NULL; } ip_buf_type(buf) = type; ip_buf_appdata(buf) = buf->data + reserve_head; ip_buf_appdatalen(buf) = 0; ip_buf_reserve(buf) = reserve_head; net_buf_add(buf, reserve_head); NET_BUF_CHECK_IF_NOT_IN_USE(buf); #ifdef DEBUG_IP_BUFS NET_DBG("%s [%d] buf %p reserve %u ref %d (%s():%d)\n", type2str(type), get_frees(type), buf, reserve_head, buf->ref, caller, line); #else NET_DBG("%s buf %p reserve %u ref %d\n", type2str(type), buf, reserve_head, buf->ref); #endif return buf; } #ifdef DEBUG_IP_BUFS struct net_buf *ip_buf_get_reserve_rx_debug(uint16_t reserve_head, const char *caller, int line) #else struct net_buf *ip_buf_get_reserve_rx(uint16_t reserve_head) #endif { #ifdef DEBUG_IP_BUFS return ip_buf_get_reserve_debug(IP_BUF_RX, reserve_head, caller, line); #else return ip_buf_get_reserve(IP_BUF_RX, reserve_head); #endif } #ifdef DEBUG_IP_BUFS struct net_buf *ip_buf_get_reserve_tx_debug(uint16_t reserve_head, const char *caller, int line) #else struct net_buf *ip_buf_get_reserve_tx(uint16_t reserve_head) #endif { #ifdef DEBUG_IP_BUFS return ip_buf_get_reserve_debug(IP_BUF_TX, reserve_head, caller, line); #else return ip_buf_get_reserve(IP_BUF_TX, reserve_head); #endif } #ifdef DEBUG_IP_BUFS static struct net_buf *ip_buf_get_debug(enum ip_buf_type type, struct net_context *context, const char *caller, int line) #else static struct net_buf *ip_buf_get(enum ip_buf_type type, struct net_context *context) #endif { struct net_buf *buf; struct net_tuple *tuple; uint16_t reserve = 0; tuple = net_context_get_tuple(context); if (!tuple) { return NULL; } switch (tuple->ip_proto) { case IPPROTO_UDP: reserve = UIP_IPUDPH_LEN + UIP_LLH_LEN; break; case IPPROTO_TCP: reserve = UIP_IPTCPH_LEN + UIP_LLH_LEN; break; case IPPROTO_ICMPV6: reserve = UIP_IPICMPH_LEN + UIP_LLH_LEN; break; } #ifdef DEBUG_IP_BUFS buf = ip_buf_get_reserve_debug(type, reserve, caller, line); #else buf = ip_buf_get_reserve(type, reserve); #endif if (!buf) { return buf; } ip_buf_context(buf) = context; return buf; } #ifdef DEBUG_IP_BUFS struct net_buf *ip_buf_get_rx_debug(struct net_context *context, const char *caller, int line) #else struct net_buf *ip_buf_get_rx(struct net_context *context) #endif { #ifdef DEBUG_IP_BUFS return ip_buf_get_debug(IP_BUF_RX, context, caller, line); #else return ip_buf_get(IP_BUF_RX, context); #endif } #ifdef DEBUG_IP_BUFS struct net_buf *ip_buf_get_tx_debug(struct net_context *context, const char *caller, int line) #else struct net_buf *ip_buf_get_tx(struct net_context *context) #endif { #ifdef DEBUG_IP_BUFS return ip_buf_get_debug(IP_BUF_TX, context, caller, line); #else return ip_buf_get(IP_BUF_TX, context); #endif } #ifdef DEBUG_IP_BUFS void ip_buf_unref_debug(struct net_buf *buf, const char *caller, int line) #else void ip_buf_unref(struct net_buf *buf) #endif { if (!buf) { #ifdef DEBUG_IP_BUFS NET_DBG("*** ERROR *** buf %p (%s():%d)\n", buf, caller, line); #else NET_DBG("*** ERROR *** buf %p\n", buf); #endif return; } if (!buf->ref) { #ifdef DEBUG_IP_BUFS NET_DBG("*** ERROR *** buf %p is freed already (%s():%d)\n", buf, caller, line); #else NET_DBG("*** ERROR *** buf %p is freed already\n", buf); #endif return; } #ifdef DEBUG_IP_BUFS NET_DBG("%s [%d] buf %p ref %d (%s():%d)\n", type2str(ip_buf_type(buf)), get_frees(ip_buf_type(buf)), buf, buf->ref - 1, caller, line); #else NET_DBG("%s buf %p ref %d\n", type2str(ip_buf_type(buf)), buf, buf->ref - 1); #endif net_buf_unref(buf); } #ifdef DEBUG_IP_BUFS struct net_buf *ip_buf_ref_debug(struct net_buf *buf, const char *caller, int line) #else struct net_buf *ip_buf_ref(struct net_buf *buf) #endif { if (!buf) { #ifdef DEBUG_IP_BUFS NET_DBG("*** ERROR *** buf %p (%s():%d)\n", buf, caller, line); #else NET_DBG("*** ERROR *** buf %p\n", buf); #endif return NULL; } #ifdef DEBUG_IP_BUFS NET_DBG("%s [%d] buf %p ref %d (%s():%d)\n", type2str(ip_buf_type(buf)), get_frees(ip_buf_type(buf)), buf, buf->ref + 1, caller, line); #else NET_DBG("%s buf %p ref %d\n", type2str(ip_buf_type(buf)), buf, buf->ref + 1); #endif return net_buf_ref(buf); } void ip_buf_init(void) { NET_DBG("Allocating %d RX and %d TX buffers for IP stack\n", IP_BUF_RX_SIZE, IP_BUF_TX_SIZE); net_buf_pool_init(rx_buffers); net_buf_pool_init(tx_buffers); }
22.421951
96
0.724899
8dc5fbf32562e0adb06cd1aa6c5ced048d34f5a9
3,667
h
C
lib/DS2/DS2.h
cosmosm3/openOBC
8215defb2c0c072afe4f80a350bc58be8e3103f9
[ "MIT" ]
null
null
null
lib/DS2/DS2.h
cosmosm3/openOBC
8215defb2c0c072afe4f80a350bc58be8e3103f9
[ "MIT" ]
null
null
null
lib/DS2/DS2.h
cosmosm3/openOBC
8215defb2c0c072afe4f80a350bc58be8e3103f9
[ "MIT" ]
null
null
null
/* Copyright (c) 2012 <benemorius@gmail.com> 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 DS2_H #define DS2_H #include <stdint.h> #include <cstdio> #include <deque> #include "DS2Packet.h" #include "DS2Bus.h" #include "Timer.h" #define MAX_PACKET_COUNT (64) #define MAX_PACKET_LENGTH (RECEIVE_BUFFER_SIZE) #if MAX_PACKET_LENGTH > RECEIVE_BUFFER_SIZE #error MAX_PACKET_LENGTH cannot be greater than RECEIVE_BUFFER_SIZE #endif class DS2 { public: DS2(DS2Bus& k, DS2Bus& l); /** * Write a packet to the specified bus * * @param txPacket packet to be transmitted * @param txBus which bus to transmit on * @return true if packet was transmitted successfully */ bool write(const DS2Packet& txPacket, DS2BusType txBus = DS2_BOTH); /** * Returns a packet from the specified packet buffer, or null if none. * * @param bus which packet buffer to read from * @return pointer to new packet */ DS2Packet* read(DS2BusType bus = DS2_BOTH); /** * Sends a packet on the specified bus and waits for a reply. * Returns a new packet on the heap or null if no reply. * Return pointer must be deleted if not null. * * @param txPacket packet to be transmitted * @param txBus which bus to transmit on * @param timeout_ms time to wait for reply * @return reply packet */ DS2Packet* query(const DS2Packet& txPacket, DS2BusType txBus = DS2_BOTH, int timeout_ms = 200); /** * Check for new packets in receive buffers, validate them, pop them onto * the packet buffer, and call any attached callbacks. * Must be run often enough to prevent receive buffer overruns. */ void task(); void receiveHandlerK(); void receiveHandlerL(); template<typename T> void attach(T* classPointer, void (T::*methodPointer)()) { if((methodPointer != 0) && (classPointer != 0)) { callback.attach(classPointer, methodPointer); } } template<typename T> void detach(T* classPointer, void (T::*methodPointer)()) { if((methodPointer != 0) && (classPointer != 0)) { callback.detach(classPointer, methodPointer); } } void attach(void (*functionPointer)()) { callback.attach(functionPointer); } void detach(void (*functionPointer)()) { callback.detach(functionPointer); } private: DS2Packet* getPacketFromBus(DS2BusType bus); DS2Bus& k; DS2Bus& l; Timer receiveTimeoutK; Timer receiveTimeoutL; std::deque<DS2Packet*> packetBufferK; std::deque<DS2Packet*> packetBufferL; FunctionPointer<void, void> callback; volatile bool taskEnabled; bool interceptPackets; std::deque<uint8_t>* bufferK; std::deque<uint8_t>* bufferL; }; #endif // DS2_H
28.426357
96
0.725934
c01e893cdcaaae42ce1a66ef4c6a4e33cd2179b6
4,695
h
C
example/ofp_vs/include/ofp_vs_tcpip.h
mfhw/ofp
064dba8b3da7e4a1ad9b639a581c7423ed1b7490
[ "BSD-3-Clause" ]
10
2016-11-17T04:25:54.000Z
2019-10-04T12:21:04.000Z
example/ofp_vs/include/ofp_vs_tcpip.h
mfhw/ofp
064dba8b3da7e4a1ad9b639a581c7423ed1b7490
[ "BSD-3-Clause" ]
null
null
null
example/ofp_vs/include/ofp_vs_tcpip.h
mfhw/ofp
064dba8b3da7e4a1ad9b639a581c7423ed1b7490
[ "BSD-3-Clause" ]
11
2017-03-20T02:10:03.000Z
2021-04-29T18:08:36.000Z
#ifndef __OFP_VS_TCP_H__ #define __OFP_VS_TCP_H__ #include <asm/byteorder.h> #include <rte_ip.h> #include <netinet/tcp.h> #include <netinet/udp.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h> /* struct iphdr { #if defined(__LITTLE_ENDIAN_BITFIELD) __u8 ihl:4, version:4; #elif defined (__BIG_ENDIAN_BITFIELD) __u8 version:4, ihl:4; #else #error "Please fix <asm/byteorder.h>" #endif __u8 tos; __be16 tot_len; __be16 id; __be16 frag_off; __u8 ttl; __u8 protocol; __u16 check; __be32 saddr; __be32 daddr; }; */ /* struct tcphdr { __be16 source; __be16 dest; __be32 seq; __be32 ack_seq; #if defined(__LITTLE_ENDIAN_BITFIELD) __u16 res1:4, doff:4, fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1; #elif defined(__BIG_ENDIAN_BITFIELD) __u16 doff:4, res1:4, cwr:1, ece:1, urg:1, ack:1, psh:1, rst:1, syn:1, fin:1; #else #error "Adjust your <asm/byteorder.h> defines" #endif __be16 window; __u16 check; __be16 urg_ptr; }; */ struct __tcphdr { uint16_t source; /**< TCP source port. */ uint16_t dest; /**< TCP destination port. */ uint32_t seq; /**< TX data sequence number. */ uint32_t ack_seq; /**< RX data acknowledgement sequence number. */ union { uint8_t doff; /**< Data offset. */ struct { uint8_t rsvd:4, hlen:4; }; }; union { uint8_t tcp_flags; /**< TCP flags */ struct { uint8_t fin:1, syn:1, rst:1, psh:1, ack:1, urg:1, ece:1, cwr:1; }; }; uint16_t window; /**< RX flow control window. */ uint16_t check; /**< TCP checksum. */ uint16_t urg_ptr; /**< TCP urgent pointer, if any. */ } __attribute__((__packed__)); #define ip_hdr(__mbuf) \ (struct iphdr *)(rte_pktmbuf_mtod(__mbuf, unsigned char *) + \ sizeof(struct ether_hdr)) #define ip_hdrlen(__iphdr) \ ((__iphdr)->ihl << 2) //sizeof(struct ipv4_hdr) #define tcp_hdr(iph) \ (struct tcphdr *)((unsigned char *)(iph) + ip_hdrlen((iph))) #define udp_hdr(iph) \ (struct udphdr *)((unsigned char *)(iph) + ip_hdrlen((iph))) #define icmp_hdr(iph) \ (struct icmphdr *)((unsigned char *)(iph) + ip_hdrlen((iph))) static inline uint16_t ofp_vs_ipv4_udptcp_cksum(const struct iphdr *iphdr, const void *l4_hdr) { uint32_t cksum; uint32_t l4_len; const struct ipv4_hdr *ipv4_hdr = (const struct ipv4_hdr *)iphdr; l4_len = rte_be_to_cpu_16(ipv4_hdr->total_length) - ip_hdrlen(iphdr); cksum = rte_raw_cksum(l4_hdr, l4_len); cksum += rte_ipv4_phdr_cksum(ipv4_hdr, 0); cksum = ((cksum & 0xffff0000) >> 16) + (cksum & 0xffff); cksum = (~cksum) & 0xffff; if (cksum == 0) cksum = 0xffff; return cksum; } static inline uint16_t ofp_vs_ipv4_cksum(const struct iphdr *iphdr) { uint16_t cksum; cksum = rte_raw_cksum((const struct ipv4_hdr *)iphdr, ip_hdrlen(iphdr)); return (cksum == 0xffff) ? cksum : ~cksum; } static inline int before(__u32 seq1, __u32 seq2) { return (__s32)(seq1 - seq2) < 0; } /* * TCP option */ #define TCPOPT_NOP 1 /* Padding */ #define TCPOPT_EOL 0 /* End of options */ #define TCPOPT_MSS 2 /* Segment size negotiating */ #define TCPOPT_WINDOW 3 /* Window scaling */ #define TCPOPT_SACK_PERM 4 /* SACK Permitted */ #define TCPOPT_SACK 5 /* SACK Block */ #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ #define TCPOPT_MD5SIG 19 /* MD5 Signature (RFC2385) */ /* * TCP option lengths */ #define TCPOLEN_MSS 4 #define TCPOLEN_WINDOW 3 #define TCPOLEN_SACK_PERM 2 #define TCPOLEN_TIMESTAMP 10 #define TCPOLEN_MD5SIG 18 /* But this is what stacks really send out. */ #define TCPOLEN_TSTAMP_ALIGNED 12 #define TCPOLEN_WSCALE_ALIGNED 4 #define TCPOLEN_SACKPERM_ALIGNED 4 #define TCPOLEN_SACK_BASE 2 #define TCPOLEN_SACK_BASE_ALIGNED 4 #define TCPOLEN_SACK_PERBLOCK 8 #define TCPOLEN_MD5SIG_ALIGNED 20 #define TCPOLEN_MSS_ALIGNED 4 /* tcp flags */ #define TCPCB_FLAG_FIN 0x01 #define TCPCB_FLAG_SYN 0x02 #define TCPCB_FLAG_RST 0x04 #define TCPCB_FLAG_PSH 0x08 #define TCPCB_FLAG_ACK 0x10 #define TCPCB_FLAG_URG 0x20 #define TCPCB_FLAG_ECE 0x40 #define TCPCB_FLAG_CWR 0x80 /* IP flags. */ #define IP_CE 0x8000 /* Flag: "Congestion" */ #define IP_DF 0x4000 /* Flag: "Don't Fragment" */ #define IP_MF 0x2000 /* Flag: "More Fragments" */ #define IP_OFFSET 0x1FFF /* "Fragment Offset" part */ #define IPTOS_TOS_MASK 0x1E #define RT_TOS(tos) ((tos)&IPTOS_TOS_MASK) #define IPDEFTTL 64 #endif
22.791262
73
0.64771
0d28602a4889ff1a417ba4310ef84527f4cf7913
118,610
h
C
Data/Juliet-C/Juliet-C-v102/testcases/CWE126_Buffer_Overread/testcases.h
b19e93n/PLC-Pyramid
6d5b57be6995a94ef7402144cee965862713b031
[ "MIT" ]
null
null
null
Data/Juliet-C/Juliet-C-v102/testcases/CWE126_Buffer_Overread/testcases.h
b19e93n/PLC-Pyramid
6d5b57be6995a94ef7402144cee965862713b031
[ "MIT" ]
null
null
null
Data/Juliet-C/Juliet-C-v102/testcases/CWE126_Buffer_Overread/testcases.h
b19e93n/PLC-Pyramid
6d5b57be6995a94ef7402144cee965862713b031
[ "MIT" ]
null
null
null
// NOTE - eventually this file will be automatically updated using a Perl script that understand // the naming of test case files, functions, and namespaces. #ifndef _TESTCASES_H #define _TESTCASES_H #ifdef __cplusplus extern "C" { #endif // declare C good and bad functions #ifndef OMITGOOD /* BEGIN-AUTOGENERATED-C-GOOD-FUNCTION-DECLARATIONS */ void CWE126_Buffer_Overread__char_alloca_loop_01_good(); void CWE126_Buffer_Overread__char_alloca_loop_02_good(); void CWE126_Buffer_Overread__char_alloca_loop_03_good(); void CWE126_Buffer_Overread__char_alloca_loop_04_good(); void CWE126_Buffer_Overread__char_alloca_loop_05_good(); void CWE126_Buffer_Overread__char_alloca_loop_06_good(); void CWE126_Buffer_Overread__char_alloca_loop_07_good(); void CWE126_Buffer_Overread__char_alloca_loop_08_good(); void CWE126_Buffer_Overread__char_alloca_loop_09_good(); void CWE126_Buffer_Overread__char_alloca_loop_10_good(); void CWE126_Buffer_Overread__char_alloca_loop_11_good(); void CWE126_Buffer_Overread__char_alloca_loop_12_good(); void CWE126_Buffer_Overread__char_alloca_loop_13_good(); void CWE126_Buffer_Overread__char_alloca_loop_14_good(); void CWE126_Buffer_Overread__char_alloca_loop_15_good(); void CWE126_Buffer_Overread__char_alloca_loop_16_good(); void CWE126_Buffer_Overread__char_alloca_loop_17_good(); void CWE126_Buffer_Overread__char_alloca_loop_18_good(); void CWE126_Buffer_Overread__char_alloca_loop_19_good(); void CWE126_Buffer_Overread__char_alloca_loop_31_good(); void CWE126_Buffer_Overread__char_alloca_loop_32_good(); void CWE126_Buffer_Overread__char_alloca_loop_34_good(); void CWE126_Buffer_Overread__char_alloca_loop_41_good(); void CWE126_Buffer_Overread__char_alloca_loop_44_good(); void CWE126_Buffer_Overread__char_alloca_loop_45_good(); void CWE126_Buffer_Overread__char_alloca_loop_51_good(); void CWE126_Buffer_Overread__char_alloca_loop_52_good(); void CWE126_Buffer_Overread__char_alloca_loop_53_good(); void CWE126_Buffer_Overread__char_alloca_loop_54_good(); void CWE126_Buffer_Overread__char_alloca_loop_63_good(); void CWE126_Buffer_Overread__char_alloca_loop_64_good(); void CWE126_Buffer_Overread__char_alloca_loop_65_good(); void CWE126_Buffer_Overread__char_alloca_loop_66_good(); void CWE126_Buffer_Overread__char_alloca_loop_67_good(); void CWE126_Buffer_Overread__char_alloca_loop_68_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_01_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_02_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_03_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_04_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_05_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_06_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_07_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_08_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_09_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_10_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_11_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_12_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_13_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_14_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_15_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_16_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_17_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_18_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_19_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_31_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_32_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_34_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_41_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_44_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_45_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_51_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_52_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_53_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_54_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_63_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_64_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_65_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_66_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_67_good(); void CWE126_Buffer_Overread__char_alloca_memcpy_68_good(); void CWE126_Buffer_Overread__char_alloca_memmove_01_good(); void CWE126_Buffer_Overread__char_alloca_memmove_02_good(); void CWE126_Buffer_Overread__char_alloca_memmove_03_good(); void CWE126_Buffer_Overread__char_alloca_memmove_04_good(); void CWE126_Buffer_Overread__char_alloca_memmove_05_good(); void CWE126_Buffer_Overread__char_alloca_memmove_06_good(); void CWE126_Buffer_Overread__char_alloca_memmove_07_good(); void CWE126_Buffer_Overread__char_alloca_memmove_08_good(); void CWE126_Buffer_Overread__char_alloca_memmove_09_good(); void CWE126_Buffer_Overread__char_alloca_memmove_10_good(); void CWE126_Buffer_Overread__char_alloca_memmove_11_good(); void CWE126_Buffer_Overread__char_alloca_memmove_12_good(); void CWE126_Buffer_Overread__char_alloca_memmove_13_good(); void CWE126_Buffer_Overread__char_alloca_memmove_14_good(); void CWE126_Buffer_Overread__char_alloca_memmove_15_good(); void CWE126_Buffer_Overread__char_alloca_memmove_16_good(); void CWE126_Buffer_Overread__char_alloca_memmove_17_good(); void CWE126_Buffer_Overread__char_alloca_memmove_18_good(); void CWE126_Buffer_Overread__char_alloca_memmove_19_good(); void CWE126_Buffer_Overread__char_alloca_memmove_31_good(); void CWE126_Buffer_Overread__char_alloca_memmove_32_good(); void CWE126_Buffer_Overread__char_alloca_memmove_34_good(); void CWE126_Buffer_Overread__char_alloca_memmove_41_good(); void CWE126_Buffer_Overread__char_alloca_memmove_44_good(); void CWE126_Buffer_Overread__char_alloca_memmove_45_good(); void CWE126_Buffer_Overread__char_alloca_memmove_51_good(); void CWE126_Buffer_Overread__char_alloca_memmove_52_good(); void CWE126_Buffer_Overread__char_alloca_memmove_53_good(); void CWE126_Buffer_Overread__char_alloca_memmove_54_good(); void CWE126_Buffer_Overread__char_alloca_memmove_63_good(); void CWE126_Buffer_Overread__char_alloca_memmove_64_good(); void CWE126_Buffer_Overread__char_alloca_memmove_65_good(); void CWE126_Buffer_Overread__char_alloca_memmove_66_good(); void CWE126_Buffer_Overread__char_alloca_memmove_67_good(); void CWE126_Buffer_Overread__char_alloca_memmove_68_good(); void CWE126_Buffer_Overread__char_declare_loop_01_good(); void CWE126_Buffer_Overread__char_declare_loop_02_good(); void CWE126_Buffer_Overread__char_declare_loop_03_good(); void CWE126_Buffer_Overread__char_declare_loop_04_good(); void CWE126_Buffer_Overread__char_declare_loop_05_good(); void CWE126_Buffer_Overread__char_declare_loop_06_good(); void CWE126_Buffer_Overread__char_declare_loop_07_good(); void CWE126_Buffer_Overread__char_declare_loop_08_good(); void CWE126_Buffer_Overread__char_declare_loop_09_good(); void CWE126_Buffer_Overread__char_declare_loop_10_good(); void CWE126_Buffer_Overread__char_declare_loop_11_good(); void CWE126_Buffer_Overread__char_declare_loop_12_good(); void CWE126_Buffer_Overread__char_declare_loop_13_good(); void CWE126_Buffer_Overread__char_declare_loop_14_good(); void CWE126_Buffer_Overread__char_declare_loop_15_good(); void CWE126_Buffer_Overread__char_declare_loop_16_good(); void CWE126_Buffer_Overread__char_declare_loop_17_good(); void CWE126_Buffer_Overread__char_declare_loop_18_good(); void CWE126_Buffer_Overread__char_declare_loop_19_good(); void CWE126_Buffer_Overread__char_declare_loop_31_good(); void CWE126_Buffer_Overread__char_declare_loop_32_good(); void CWE126_Buffer_Overread__char_declare_loop_34_good(); void CWE126_Buffer_Overread__char_declare_loop_41_good(); void CWE126_Buffer_Overread__char_declare_loop_44_good(); void CWE126_Buffer_Overread__char_declare_loop_45_good(); void CWE126_Buffer_Overread__char_declare_loop_51_good(); void CWE126_Buffer_Overread__char_declare_loop_52_good(); void CWE126_Buffer_Overread__char_declare_loop_53_good(); void CWE126_Buffer_Overread__char_declare_loop_54_good(); void CWE126_Buffer_Overread__char_declare_loop_63_good(); void CWE126_Buffer_Overread__char_declare_loop_64_good(); void CWE126_Buffer_Overread__char_declare_loop_65_good(); void CWE126_Buffer_Overread__char_declare_loop_66_good(); void CWE126_Buffer_Overread__char_declare_loop_67_good(); void CWE126_Buffer_Overread__char_declare_loop_68_good(); void CWE126_Buffer_Overread__char_declare_memcpy_01_good(); void CWE126_Buffer_Overread__char_declare_memcpy_02_good(); void CWE126_Buffer_Overread__char_declare_memcpy_03_good(); void CWE126_Buffer_Overread__char_declare_memcpy_04_good(); void CWE126_Buffer_Overread__char_declare_memcpy_05_good(); void CWE126_Buffer_Overread__char_declare_memcpy_06_good(); void CWE126_Buffer_Overread__char_declare_memcpy_07_good(); void CWE126_Buffer_Overread__char_declare_memcpy_08_good(); void CWE126_Buffer_Overread__char_declare_memcpy_09_good(); void CWE126_Buffer_Overread__char_declare_memcpy_10_good(); void CWE126_Buffer_Overread__char_declare_memcpy_11_good(); void CWE126_Buffer_Overread__char_declare_memcpy_12_good(); void CWE126_Buffer_Overread__char_declare_memcpy_13_good(); void CWE126_Buffer_Overread__char_declare_memcpy_14_good(); void CWE126_Buffer_Overread__char_declare_memcpy_15_good(); void CWE126_Buffer_Overread__char_declare_memcpy_16_good(); void CWE126_Buffer_Overread__char_declare_memcpy_17_good(); void CWE126_Buffer_Overread__char_declare_memcpy_18_good(); void CWE126_Buffer_Overread__char_declare_memcpy_19_good(); void CWE126_Buffer_Overread__char_declare_memcpy_31_good(); void CWE126_Buffer_Overread__char_declare_memcpy_32_good(); void CWE126_Buffer_Overread__char_declare_memcpy_34_good(); void CWE126_Buffer_Overread__char_declare_memcpy_41_good(); void CWE126_Buffer_Overread__char_declare_memcpy_44_good(); void CWE126_Buffer_Overread__char_declare_memcpy_45_good(); void CWE126_Buffer_Overread__char_declare_memcpy_51_good(); void CWE126_Buffer_Overread__char_declare_memcpy_52_good(); void CWE126_Buffer_Overread__char_declare_memcpy_53_good(); void CWE126_Buffer_Overread__char_declare_memcpy_54_good(); void CWE126_Buffer_Overread__char_declare_memcpy_63_good(); void CWE126_Buffer_Overread__char_declare_memcpy_64_good(); void CWE126_Buffer_Overread__char_declare_memcpy_65_good(); void CWE126_Buffer_Overread__char_declare_memcpy_66_good(); void CWE126_Buffer_Overread__char_declare_memcpy_67_good(); void CWE126_Buffer_Overread__char_declare_memcpy_68_good(); void CWE126_Buffer_Overread__char_declare_memmove_01_good(); void CWE126_Buffer_Overread__char_declare_memmove_02_good(); void CWE126_Buffer_Overread__char_declare_memmove_03_good(); void CWE126_Buffer_Overread__char_declare_memmove_04_good(); void CWE126_Buffer_Overread__char_declare_memmove_05_good(); void CWE126_Buffer_Overread__char_declare_memmove_06_good(); void CWE126_Buffer_Overread__char_declare_memmove_07_good(); void CWE126_Buffer_Overread__char_declare_memmove_08_good(); void CWE126_Buffer_Overread__char_declare_memmove_09_good(); void CWE126_Buffer_Overread__char_declare_memmove_10_good(); void CWE126_Buffer_Overread__char_declare_memmove_11_good(); void CWE126_Buffer_Overread__char_declare_memmove_12_good(); void CWE126_Buffer_Overread__char_declare_memmove_13_good(); void CWE126_Buffer_Overread__char_declare_memmove_14_good(); void CWE126_Buffer_Overread__char_declare_memmove_15_good(); void CWE126_Buffer_Overread__char_declare_memmove_16_good(); void CWE126_Buffer_Overread__char_declare_memmove_17_good(); void CWE126_Buffer_Overread__char_declare_memmove_18_good(); void CWE126_Buffer_Overread__char_declare_memmove_19_good(); void CWE126_Buffer_Overread__char_declare_memmove_31_good(); void CWE126_Buffer_Overread__char_declare_memmove_32_good(); void CWE126_Buffer_Overread__char_declare_memmove_34_good(); void CWE126_Buffer_Overread__char_declare_memmove_41_good(); void CWE126_Buffer_Overread__char_declare_memmove_44_good(); void CWE126_Buffer_Overread__char_declare_memmove_45_good(); void CWE126_Buffer_Overread__char_declare_memmove_51_good(); void CWE126_Buffer_Overread__char_declare_memmove_52_good(); void CWE126_Buffer_Overread__char_declare_memmove_53_good(); void CWE126_Buffer_Overread__char_declare_memmove_54_good(); void CWE126_Buffer_Overread__char_declare_memmove_63_good(); void CWE126_Buffer_Overread__char_declare_memmove_64_good(); void CWE126_Buffer_Overread__char_declare_memmove_65_good(); void CWE126_Buffer_Overread__char_declare_memmove_66_good(); void CWE126_Buffer_Overread__char_declare_memmove_67_good(); void CWE126_Buffer_Overread__char_declare_memmove_68_good(); void CWE126_Buffer_Overread__malloc_char_loop_01_good(); void CWE126_Buffer_Overread__malloc_char_loop_02_good(); void CWE126_Buffer_Overread__malloc_char_loop_03_good(); void CWE126_Buffer_Overread__malloc_char_loop_04_good(); void CWE126_Buffer_Overread__malloc_char_loop_05_good(); void CWE126_Buffer_Overread__malloc_char_loop_06_good(); void CWE126_Buffer_Overread__malloc_char_loop_07_good(); void CWE126_Buffer_Overread__malloc_char_loop_08_good(); void CWE126_Buffer_Overread__malloc_char_loop_09_good(); void CWE126_Buffer_Overread__malloc_char_loop_10_good(); void CWE126_Buffer_Overread__malloc_char_loop_11_good(); void CWE126_Buffer_Overread__malloc_char_loop_12_good(); void CWE126_Buffer_Overread__malloc_char_loop_13_good(); void CWE126_Buffer_Overread__malloc_char_loop_14_good(); void CWE126_Buffer_Overread__malloc_char_loop_15_good(); void CWE126_Buffer_Overread__malloc_char_loop_16_good(); void CWE126_Buffer_Overread__malloc_char_loop_17_good(); void CWE126_Buffer_Overread__malloc_char_loop_18_good(); void CWE126_Buffer_Overread__malloc_char_loop_19_good(); void CWE126_Buffer_Overread__malloc_char_loop_31_good(); void CWE126_Buffer_Overread__malloc_char_loop_32_good(); void CWE126_Buffer_Overread__malloc_char_loop_34_good(); void CWE126_Buffer_Overread__malloc_char_loop_41_good(); void CWE126_Buffer_Overread__malloc_char_loop_42_good(); void CWE126_Buffer_Overread__malloc_char_loop_44_good(); void CWE126_Buffer_Overread__malloc_char_loop_45_good(); void CWE126_Buffer_Overread__malloc_char_loop_51_good(); void CWE126_Buffer_Overread__malloc_char_loop_52_good(); void CWE126_Buffer_Overread__malloc_char_loop_53_good(); void CWE126_Buffer_Overread__malloc_char_loop_54_good(); void CWE126_Buffer_Overread__malloc_char_loop_61_good(); void CWE126_Buffer_Overread__malloc_char_loop_63_good(); void CWE126_Buffer_Overread__malloc_char_loop_64_good(); void CWE126_Buffer_Overread__malloc_char_loop_65_good(); void CWE126_Buffer_Overread__malloc_char_loop_66_good(); void CWE126_Buffer_Overread__malloc_char_loop_67_good(); void CWE126_Buffer_Overread__malloc_char_loop_68_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_01_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_02_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_03_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_04_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_05_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_06_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_07_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_08_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_09_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_10_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_11_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_12_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_13_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_14_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_15_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_16_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_17_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_18_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_19_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_31_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_32_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_34_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_41_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_42_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_44_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_45_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_51_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_52_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_53_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_54_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_61_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_63_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_64_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_65_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_66_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_67_good(); void CWE126_Buffer_Overread__malloc_char_memcpy_68_good(); void CWE126_Buffer_Overread__malloc_char_memmove_01_good(); void CWE126_Buffer_Overread__malloc_char_memmove_02_good(); void CWE126_Buffer_Overread__malloc_char_memmove_03_good(); void CWE126_Buffer_Overread__malloc_char_memmove_04_good(); void CWE126_Buffer_Overread__malloc_char_memmove_05_good(); void CWE126_Buffer_Overread__malloc_char_memmove_06_good(); void CWE126_Buffer_Overread__malloc_char_memmove_07_good(); void CWE126_Buffer_Overread__malloc_char_memmove_08_good(); void CWE126_Buffer_Overread__malloc_char_memmove_09_good(); void CWE126_Buffer_Overread__malloc_char_memmove_10_good(); void CWE126_Buffer_Overread__malloc_char_memmove_11_good(); void CWE126_Buffer_Overread__malloc_char_memmove_12_good(); void CWE126_Buffer_Overread__malloc_char_memmove_13_good(); void CWE126_Buffer_Overread__malloc_char_memmove_14_good(); void CWE126_Buffer_Overread__malloc_char_memmove_15_good(); void CWE126_Buffer_Overread__malloc_char_memmove_16_good(); void CWE126_Buffer_Overread__malloc_char_memmove_17_good(); void CWE126_Buffer_Overread__malloc_char_memmove_18_good(); void CWE126_Buffer_Overread__malloc_char_memmove_19_good(); void CWE126_Buffer_Overread__malloc_char_memmove_31_good(); void CWE126_Buffer_Overread__malloc_char_memmove_32_good(); void CWE126_Buffer_Overread__malloc_char_memmove_34_good(); void CWE126_Buffer_Overread__malloc_char_memmove_41_good(); void CWE126_Buffer_Overread__malloc_char_memmove_42_good(); void CWE126_Buffer_Overread__malloc_char_memmove_44_good(); void CWE126_Buffer_Overread__malloc_char_memmove_45_good(); void CWE126_Buffer_Overread__malloc_char_memmove_51_good(); void CWE126_Buffer_Overread__malloc_char_memmove_52_good(); void CWE126_Buffer_Overread__malloc_char_memmove_53_good(); void CWE126_Buffer_Overread__malloc_char_memmove_54_good(); void CWE126_Buffer_Overread__malloc_char_memmove_61_good(); void CWE126_Buffer_Overread__malloc_char_memmove_63_good(); void CWE126_Buffer_Overread__malloc_char_memmove_64_good(); void CWE126_Buffer_Overread__malloc_char_memmove_65_good(); void CWE126_Buffer_Overread__malloc_char_memmove_66_good(); void CWE126_Buffer_Overread__malloc_char_memmove_67_good(); void CWE126_Buffer_Overread__malloc_char_memmove_68_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_01_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_02_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_03_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_04_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_05_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_06_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_07_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_08_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_09_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_10_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_11_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_12_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_13_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_14_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_15_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_16_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_17_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_18_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_19_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_31_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_32_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_34_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_41_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_42_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_44_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_45_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_51_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_52_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_53_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_54_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_61_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_63_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_64_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_65_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_66_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_67_good(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_68_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_01_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_02_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_03_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_04_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_05_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_06_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_07_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_08_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_09_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_10_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_11_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_12_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_13_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_14_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_15_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_16_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_17_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_18_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_19_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_31_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_32_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_34_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_41_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_42_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_44_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_45_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_51_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_52_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_53_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_54_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_61_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_63_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_64_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_65_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_66_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_67_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_68_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_01_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_02_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_03_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_04_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_05_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_06_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_07_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_08_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_09_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_10_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_11_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_12_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_13_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_14_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_15_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_16_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_17_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_18_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_19_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_31_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_32_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_34_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_41_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_42_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_44_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_45_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_51_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_52_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_53_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_54_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_61_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_63_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_64_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_65_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_66_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_67_good(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_68_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_01_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_02_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_03_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_04_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_05_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_06_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_07_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_08_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_09_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_10_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_11_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_12_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_13_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_14_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_15_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_16_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_17_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_18_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_19_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_31_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_32_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_34_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_41_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_44_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_45_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_51_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_52_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_53_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_54_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_63_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_64_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_65_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_66_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_67_good(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_68_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_01_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_02_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_03_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_04_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_05_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_06_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_07_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_08_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_09_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_10_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_11_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_12_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_13_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_14_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_15_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_16_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_17_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_18_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_19_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_31_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_32_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_34_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_41_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_44_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_45_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_51_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_52_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_53_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_54_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_63_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_64_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_65_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_66_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_67_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_68_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_01_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_02_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_03_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_04_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_05_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_06_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_07_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_08_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_09_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_10_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_11_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_12_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_13_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_14_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_15_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_16_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_17_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_18_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_19_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_31_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_32_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_34_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_41_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_44_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_45_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_51_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_52_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_53_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_54_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_63_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_64_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_65_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_66_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_67_good(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_68_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_01_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_02_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_03_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_04_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_05_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_06_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_07_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_08_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_09_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_10_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_11_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_12_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_13_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_14_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_15_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_16_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_17_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_18_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_19_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_31_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_32_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_34_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_41_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_44_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_45_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_51_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_52_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_53_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_54_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_63_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_64_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_65_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_66_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_67_good(); void CWE126_Buffer_Overread__wchar_t_declare_loop_68_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_01_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_02_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_03_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_04_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_05_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_06_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_07_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_08_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_09_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_10_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_11_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_12_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_13_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_14_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_15_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_16_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_17_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_18_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_19_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_31_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_32_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_34_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_41_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_44_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_45_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_51_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_52_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_53_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_54_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_63_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_64_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_65_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_66_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_67_good(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_68_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_01_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_02_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_03_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_04_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_05_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_06_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_07_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_08_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_09_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_10_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_11_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_12_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_13_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_14_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_15_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_16_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_17_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_18_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_19_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_31_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_32_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_34_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_41_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_44_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_45_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_51_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_52_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_53_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_54_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_63_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_64_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_65_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_66_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_67_good(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_68_good(); /* END-AUTOGENERATED-C-GOOD-FUNCTION-DECLARATIONS */ #endif // OMITGOOD #ifndef OMITBAD /* BEGIN-AUTOGENERATED-C-BAD-FUNCTION-DECLARATIONS */ void CWE126_Buffer_Overread__char_alloca_loop_01_bad(); void CWE126_Buffer_Overread__char_alloca_loop_02_bad(); void CWE126_Buffer_Overread__char_alloca_loop_03_bad(); void CWE126_Buffer_Overread__char_alloca_loop_04_bad(); void CWE126_Buffer_Overread__char_alloca_loop_05_bad(); void CWE126_Buffer_Overread__char_alloca_loop_06_bad(); void CWE126_Buffer_Overread__char_alloca_loop_07_bad(); void CWE126_Buffer_Overread__char_alloca_loop_08_bad(); void CWE126_Buffer_Overread__char_alloca_loop_09_bad(); void CWE126_Buffer_Overread__char_alloca_loop_10_bad(); void CWE126_Buffer_Overread__char_alloca_loop_11_bad(); void CWE126_Buffer_Overread__char_alloca_loop_12_bad(); void CWE126_Buffer_Overread__char_alloca_loop_13_bad(); void CWE126_Buffer_Overread__char_alloca_loop_14_bad(); void CWE126_Buffer_Overread__char_alloca_loop_15_bad(); void CWE126_Buffer_Overread__char_alloca_loop_16_bad(); void CWE126_Buffer_Overread__char_alloca_loop_17_bad(); void CWE126_Buffer_Overread__char_alloca_loop_18_bad(); void CWE126_Buffer_Overread__char_alloca_loop_19_bad(); void CWE126_Buffer_Overread__char_alloca_loop_31_bad(); void CWE126_Buffer_Overread__char_alloca_loop_32_bad(); void CWE126_Buffer_Overread__char_alloca_loop_34_bad(); void CWE126_Buffer_Overread__char_alloca_loop_41_bad(); void CWE126_Buffer_Overread__char_alloca_loop_44_bad(); void CWE126_Buffer_Overread__char_alloca_loop_45_bad(); void CWE126_Buffer_Overread__char_alloca_loop_51_bad(); void CWE126_Buffer_Overread__char_alloca_loop_52_bad(); void CWE126_Buffer_Overread__char_alloca_loop_53_bad(); void CWE126_Buffer_Overread__char_alloca_loop_54_bad(); void CWE126_Buffer_Overread__char_alloca_loop_63_bad(); void CWE126_Buffer_Overread__char_alloca_loop_64_bad(); void CWE126_Buffer_Overread__char_alloca_loop_65_bad(); void CWE126_Buffer_Overread__char_alloca_loop_66_bad(); void CWE126_Buffer_Overread__char_alloca_loop_67_bad(); void CWE126_Buffer_Overread__char_alloca_loop_68_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_01_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_02_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_03_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_04_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_05_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_06_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_07_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_08_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_09_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_10_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_11_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_12_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_13_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_14_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_15_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_16_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_17_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_18_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_19_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_31_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_32_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_34_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_41_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_44_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_45_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_51_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_52_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_53_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_54_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_63_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_64_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_65_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_66_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_67_bad(); void CWE126_Buffer_Overread__char_alloca_memcpy_68_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_01_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_02_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_03_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_04_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_05_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_06_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_07_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_08_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_09_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_10_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_11_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_12_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_13_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_14_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_15_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_16_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_17_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_18_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_19_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_31_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_32_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_34_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_41_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_44_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_45_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_51_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_52_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_53_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_54_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_63_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_64_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_65_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_66_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_67_bad(); void CWE126_Buffer_Overread__char_alloca_memmove_68_bad(); void CWE126_Buffer_Overread__char_declare_loop_01_bad(); void CWE126_Buffer_Overread__char_declare_loop_02_bad(); void CWE126_Buffer_Overread__char_declare_loop_03_bad(); void CWE126_Buffer_Overread__char_declare_loop_04_bad(); void CWE126_Buffer_Overread__char_declare_loop_05_bad(); void CWE126_Buffer_Overread__char_declare_loop_06_bad(); void CWE126_Buffer_Overread__char_declare_loop_07_bad(); void CWE126_Buffer_Overread__char_declare_loop_08_bad(); void CWE126_Buffer_Overread__char_declare_loop_09_bad(); void CWE126_Buffer_Overread__char_declare_loop_10_bad(); void CWE126_Buffer_Overread__char_declare_loop_11_bad(); void CWE126_Buffer_Overread__char_declare_loop_12_bad(); void CWE126_Buffer_Overread__char_declare_loop_13_bad(); void CWE126_Buffer_Overread__char_declare_loop_14_bad(); void CWE126_Buffer_Overread__char_declare_loop_15_bad(); void CWE126_Buffer_Overread__char_declare_loop_16_bad(); void CWE126_Buffer_Overread__char_declare_loop_17_bad(); void CWE126_Buffer_Overread__char_declare_loop_18_bad(); void CWE126_Buffer_Overread__char_declare_loop_19_bad(); void CWE126_Buffer_Overread__char_declare_loop_31_bad(); void CWE126_Buffer_Overread__char_declare_loop_32_bad(); void CWE126_Buffer_Overread__char_declare_loop_34_bad(); void CWE126_Buffer_Overread__char_declare_loop_41_bad(); void CWE126_Buffer_Overread__char_declare_loop_44_bad(); void CWE126_Buffer_Overread__char_declare_loop_45_bad(); void CWE126_Buffer_Overread__char_declare_loop_51_bad(); void CWE126_Buffer_Overread__char_declare_loop_52_bad(); void CWE126_Buffer_Overread__char_declare_loop_53_bad(); void CWE126_Buffer_Overread__char_declare_loop_54_bad(); void CWE126_Buffer_Overread__char_declare_loop_63_bad(); void CWE126_Buffer_Overread__char_declare_loop_64_bad(); void CWE126_Buffer_Overread__char_declare_loop_65_bad(); void CWE126_Buffer_Overread__char_declare_loop_66_bad(); void CWE126_Buffer_Overread__char_declare_loop_67_bad(); void CWE126_Buffer_Overread__char_declare_loop_68_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_01_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_02_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_03_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_04_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_05_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_06_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_07_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_08_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_09_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_10_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_11_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_12_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_13_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_14_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_15_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_16_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_17_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_18_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_19_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_31_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_32_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_34_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_41_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_44_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_45_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_51_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_52_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_53_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_54_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_63_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_64_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_65_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_66_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_67_bad(); void CWE126_Buffer_Overread__char_declare_memcpy_68_bad(); void CWE126_Buffer_Overread__char_declare_memmove_01_bad(); void CWE126_Buffer_Overread__char_declare_memmove_02_bad(); void CWE126_Buffer_Overread__char_declare_memmove_03_bad(); void CWE126_Buffer_Overread__char_declare_memmove_04_bad(); void CWE126_Buffer_Overread__char_declare_memmove_05_bad(); void CWE126_Buffer_Overread__char_declare_memmove_06_bad(); void CWE126_Buffer_Overread__char_declare_memmove_07_bad(); void CWE126_Buffer_Overread__char_declare_memmove_08_bad(); void CWE126_Buffer_Overread__char_declare_memmove_09_bad(); void CWE126_Buffer_Overread__char_declare_memmove_10_bad(); void CWE126_Buffer_Overread__char_declare_memmove_11_bad(); void CWE126_Buffer_Overread__char_declare_memmove_12_bad(); void CWE126_Buffer_Overread__char_declare_memmove_13_bad(); void CWE126_Buffer_Overread__char_declare_memmove_14_bad(); void CWE126_Buffer_Overread__char_declare_memmove_15_bad(); void CWE126_Buffer_Overread__char_declare_memmove_16_bad(); void CWE126_Buffer_Overread__char_declare_memmove_17_bad(); void CWE126_Buffer_Overread__char_declare_memmove_18_bad(); void CWE126_Buffer_Overread__char_declare_memmove_19_bad(); void CWE126_Buffer_Overread__char_declare_memmove_31_bad(); void CWE126_Buffer_Overread__char_declare_memmove_32_bad(); void CWE126_Buffer_Overread__char_declare_memmove_34_bad(); void CWE126_Buffer_Overread__char_declare_memmove_41_bad(); void CWE126_Buffer_Overread__char_declare_memmove_44_bad(); void CWE126_Buffer_Overread__char_declare_memmove_45_bad(); void CWE126_Buffer_Overread__char_declare_memmove_51_bad(); void CWE126_Buffer_Overread__char_declare_memmove_52_bad(); void CWE126_Buffer_Overread__char_declare_memmove_53_bad(); void CWE126_Buffer_Overread__char_declare_memmove_54_bad(); void CWE126_Buffer_Overread__char_declare_memmove_63_bad(); void CWE126_Buffer_Overread__char_declare_memmove_64_bad(); void CWE126_Buffer_Overread__char_declare_memmove_65_bad(); void CWE126_Buffer_Overread__char_declare_memmove_66_bad(); void CWE126_Buffer_Overread__char_declare_memmove_67_bad(); void CWE126_Buffer_Overread__char_declare_memmove_68_bad(); void CWE126_Buffer_Overread__malloc_char_loop_01_bad(); void CWE126_Buffer_Overread__malloc_char_loop_02_bad(); void CWE126_Buffer_Overread__malloc_char_loop_03_bad(); void CWE126_Buffer_Overread__malloc_char_loop_04_bad(); void CWE126_Buffer_Overread__malloc_char_loop_05_bad(); void CWE126_Buffer_Overread__malloc_char_loop_06_bad(); void CWE126_Buffer_Overread__malloc_char_loop_07_bad(); void CWE126_Buffer_Overread__malloc_char_loop_08_bad(); void CWE126_Buffer_Overread__malloc_char_loop_09_bad(); void CWE126_Buffer_Overread__malloc_char_loop_10_bad(); void CWE126_Buffer_Overread__malloc_char_loop_11_bad(); void CWE126_Buffer_Overread__malloc_char_loop_12_bad(); void CWE126_Buffer_Overread__malloc_char_loop_13_bad(); void CWE126_Buffer_Overread__malloc_char_loop_14_bad(); void CWE126_Buffer_Overread__malloc_char_loop_15_bad(); void CWE126_Buffer_Overread__malloc_char_loop_16_bad(); void CWE126_Buffer_Overread__malloc_char_loop_17_bad(); void CWE126_Buffer_Overread__malloc_char_loop_18_bad(); void CWE126_Buffer_Overread__malloc_char_loop_19_bad(); void CWE126_Buffer_Overread__malloc_char_loop_31_bad(); void CWE126_Buffer_Overread__malloc_char_loop_32_bad(); void CWE126_Buffer_Overread__malloc_char_loop_34_bad(); void CWE126_Buffer_Overread__malloc_char_loop_41_bad(); void CWE126_Buffer_Overread__malloc_char_loop_42_bad(); void CWE126_Buffer_Overread__malloc_char_loop_44_bad(); void CWE126_Buffer_Overread__malloc_char_loop_45_bad(); void CWE126_Buffer_Overread__malloc_char_loop_51_bad(); void CWE126_Buffer_Overread__malloc_char_loop_52_bad(); void CWE126_Buffer_Overread__malloc_char_loop_53_bad(); void CWE126_Buffer_Overread__malloc_char_loop_54_bad(); void CWE126_Buffer_Overread__malloc_char_loop_61_bad(); void CWE126_Buffer_Overread__malloc_char_loop_63_bad(); void CWE126_Buffer_Overread__malloc_char_loop_64_bad(); void CWE126_Buffer_Overread__malloc_char_loop_65_bad(); void CWE126_Buffer_Overread__malloc_char_loop_66_bad(); void CWE126_Buffer_Overread__malloc_char_loop_67_bad(); void CWE126_Buffer_Overread__malloc_char_loop_68_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_01_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_02_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_03_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_04_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_05_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_06_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_07_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_08_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_09_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_10_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_11_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_12_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_13_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_14_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_15_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_16_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_17_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_18_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_19_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_31_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_32_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_34_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_41_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_42_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_44_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_45_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_51_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_52_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_53_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_54_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_61_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_63_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_64_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_65_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_66_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_67_bad(); void CWE126_Buffer_Overread__malloc_char_memcpy_68_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_01_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_02_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_03_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_04_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_05_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_06_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_07_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_08_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_09_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_10_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_11_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_12_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_13_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_14_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_15_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_16_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_17_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_18_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_19_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_31_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_32_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_34_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_41_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_42_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_44_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_45_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_51_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_52_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_53_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_54_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_61_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_63_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_64_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_65_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_66_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_67_bad(); void CWE126_Buffer_Overread__malloc_char_memmove_68_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_01_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_02_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_03_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_04_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_05_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_06_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_07_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_08_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_09_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_10_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_11_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_12_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_13_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_14_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_15_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_16_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_17_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_18_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_19_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_31_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_32_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_34_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_41_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_42_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_44_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_45_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_51_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_52_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_53_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_54_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_61_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_63_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_64_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_65_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_66_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_67_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_loop_68_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_01_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_02_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_03_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_04_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_05_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_06_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_07_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_08_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_09_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_10_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_11_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_12_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_13_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_14_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_15_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_16_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_17_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_18_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_19_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_31_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_32_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_34_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_41_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_42_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_44_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_45_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_51_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_52_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_53_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_54_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_61_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_63_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_64_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_65_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_66_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_67_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memcpy_68_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_01_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_02_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_03_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_04_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_05_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_06_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_07_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_08_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_09_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_10_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_11_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_12_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_13_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_14_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_15_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_16_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_17_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_18_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_19_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_31_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_32_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_34_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_41_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_42_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_44_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_45_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_51_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_52_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_53_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_54_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_61_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_63_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_64_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_65_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_66_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_67_bad(); void CWE126_Buffer_Overread__malloc_wchar_t_memmove_68_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_01_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_02_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_03_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_04_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_05_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_06_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_07_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_08_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_09_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_10_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_11_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_12_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_13_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_14_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_15_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_16_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_17_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_18_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_19_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_31_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_32_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_34_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_41_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_44_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_45_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_51_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_52_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_53_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_54_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_63_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_64_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_65_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_66_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_67_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_loop_68_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_01_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_02_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_03_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_04_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_05_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_06_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_07_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_08_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_09_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_10_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_11_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_12_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_13_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_14_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_15_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_16_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_17_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_18_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_19_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_31_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_32_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_34_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_41_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_44_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_45_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_51_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_52_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_53_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_54_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_63_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_64_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_65_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_66_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_67_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memcpy_68_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_01_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_02_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_03_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_04_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_05_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_06_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_07_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_08_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_09_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_10_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_11_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_12_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_13_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_14_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_15_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_16_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_17_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_18_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_19_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_31_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_32_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_34_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_41_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_44_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_45_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_51_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_52_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_53_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_54_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_63_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_64_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_65_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_66_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_67_bad(); void CWE126_Buffer_Overread__wchar_t_alloca_memmove_68_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_01_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_02_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_03_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_04_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_05_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_06_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_07_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_08_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_09_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_10_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_11_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_12_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_13_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_14_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_15_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_16_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_17_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_18_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_19_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_31_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_32_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_34_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_41_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_44_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_45_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_51_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_52_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_53_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_54_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_63_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_64_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_65_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_66_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_67_bad(); void CWE126_Buffer_Overread__wchar_t_declare_loop_68_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_01_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_02_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_03_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_04_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_05_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_06_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_07_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_08_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_09_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_10_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_11_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_12_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_13_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_14_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_15_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_16_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_17_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_18_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_19_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_31_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_32_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_34_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_41_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_44_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_45_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_51_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_52_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_53_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_54_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_63_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_64_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_65_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_66_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_67_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memcpy_68_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_01_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_02_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_03_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_04_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_05_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_06_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_07_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_08_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_09_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_10_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_11_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_12_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_13_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_14_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_15_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_16_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_17_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_18_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_19_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_31_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_32_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_34_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_41_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_44_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_45_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_51_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_52_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_53_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_54_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_63_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_64_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_65_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_66_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_67_bad(); void CWE126_Buffer_Overread__wchar_t_declare_memmove_68_bad(); /* END-AUTOGENERATED-C-BAD-FUNCTION-DECLARATIONS */ #endif // OMITBAD #ifdef __cplusplus } // end extern "C" #endif #ifdef __cplusplus // declare C++ namespaces and good and bad functions #ifndef OMITGOOD /* BEGIN-AUTOGENERATED-CPP-GOOD-FUNCTION-DECLARATIONS */ namespace CWE126_Buffer_Overread__new_char_loop_01 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_02 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_03 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_04 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_05 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_06 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_07 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_08 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_09 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_10 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_11 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_12 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_13 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_14 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_15 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_16 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_17 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_18 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_19 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_31 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_32 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_33 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_34 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_41 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_42 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_43 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_44 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_45 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_51 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_52 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_53 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_54 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_61 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_62 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_63 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_64 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_65 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_66 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_67 { void good();} namespace CWE126_Buffer_Overread__new_char_loop_68 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_01 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_02 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_03 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_04 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_05 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_06 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_07 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_08 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_09 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_10 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_11 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_12 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_13 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_14 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_15 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_16 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_17 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_18 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_19 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_31 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_32 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_33 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_34 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_41 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_42 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_43 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_44 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_45 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_51 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_52 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_53 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_54 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_61 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_62 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_63 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_64 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_65 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_66 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_67 { void good();} namespace CWE126_Buffer_Overread__new_char_memcpy_68 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_01 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_02 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_03 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_04 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_05 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_06 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_07 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_08 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_09 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_10 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_11 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_12 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_13 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_14 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_15 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_16 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_17 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_18 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_19 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_31 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_32 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_33 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_34 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_41 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_42 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_43 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_44 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_45 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_51 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_52 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_53 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_54 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_61 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_62 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_63 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_64 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_65 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_66 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_67 { void good();} namespace CWE126_Buffer_Overread__new_char_memmove_68 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_01 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_02 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_03 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_04 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_05 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_06 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_07 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_08 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_09 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_10 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_11 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_12 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_13 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_14 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_15 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_16 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_17 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_18 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_19 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_31 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_32 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_33 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_34 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_41 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_42 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_43 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_44 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_45 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_51 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_52 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_53 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_54 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_61 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_62 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_63 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_64 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_65 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_66 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_67 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_68 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_01 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_02 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_03 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_04 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_05 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_06 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_07 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_08 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_09 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_10 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_11 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_12 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_13 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_14 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_15 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_16 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_17 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_18 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_19 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_31 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_32 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_33 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_34 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_41 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_42 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_43 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_44 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_45 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_51 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_52 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_53 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_54 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_61 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_62 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_63 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_64 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_65 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_66 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_67 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_68 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_01 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_02 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_03 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_04 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_05 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_06 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_07 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_08 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_09 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_10 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_11 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_12 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_13 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_14 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_15 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_16 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_17 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_18 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_19 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_31 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_32 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_33 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_34 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_41 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_42 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_43 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_44 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_45 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_51 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_52 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_53 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_54 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_61 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_62 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_63 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_64 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_65 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_66 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_67 { void good();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_68 { void good();} /* END-AUTOGENERATED-CPP-GOOD-FUNCTION-DECLARATIONS */ #endif // OMITGOOD #ifndef OMITBAD /* BEGIN-AUTOGENERATED-CPP-BAD-FUNCTION-DECLARATIONS */ namespace CWE126_Buffer_Overread__new_char_loop_01 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_02 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_03 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_04 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_05 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_06 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_07 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_08 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_09 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_10 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_11 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_12 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_13 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_14 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_15 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_16 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_17 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_18 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_19 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_31 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_32 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_33 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_34 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_41 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_42 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_43 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_44 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_45 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_51 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_52 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_53 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_54 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_61 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_62 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_63 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_64 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_65 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_66 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_67 { void bad();} namespace CWE126_Buffer_Overread__new_char_loop_68 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_01 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_02 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_03 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_04 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_05 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_06 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_07 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_08 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_09 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_10 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_11 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_12 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_13 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_14 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_15 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_16 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_17 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_18 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_19 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_31 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_32 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_33 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_34 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_41 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_42 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_43 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_44 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_45 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_51 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_52 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_53 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_54 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_61 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_62 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_63 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_64 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_65 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_66 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_67 { void bad();} namespace CWE126_Buffer_Overread__new_char_memcpy_68 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_01 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_02 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_03 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_04 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_05 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_06 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_07 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_08 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_09 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_10 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_11 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_12 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_13 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_14 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_15 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_16 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_17 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_18 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_19 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_31 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_32 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_33 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_34 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_41 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_42 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_43 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_44 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_45 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_51 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_52 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_53 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_54 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_61 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_62 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_63 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_64 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_65 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_66 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_67 { void bad();} namespace CWE126_Buffer_Overread__new_char_memmove_68 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_01 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_02 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_03 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_04 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_05 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_06 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_07 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_08 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_09 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_10 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_11 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_12 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_13 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_14 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_15 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_16 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_17 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_18 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_19 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_31 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_32 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_33 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_34 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_41 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_42 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_43 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_44 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_45 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_51 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_52 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_53 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_54 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_61 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_62 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_63 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_64 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_65 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_66 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_67 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_loop_68 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_01 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_02 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_03 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_04 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_05 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_06 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_07 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_08 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_09 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_10 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_11 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_12 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_13 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_14 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_15 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_16 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_17 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_18 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_19 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_31 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_32 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_33 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_34 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_41 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_42 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_43 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_44 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_45 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_51 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_52 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_53 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_54 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_61 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_62 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_63 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_64 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_65 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_66 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_67 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memcpy_68 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_01 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_02 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_03 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_04 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_05 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_06 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_07 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_08 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_09 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_10 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_11 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_12 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_13 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_14 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_15 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_16 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_17 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_18 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_19 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_31 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_32 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_33 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_34 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_41 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_42 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_43 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_44 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_45 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_51 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_52 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_53 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_54 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_61 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_62 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_63 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_64 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_65 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_66 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_67 { void bad();} namespace CWE126_Buffer_Overread__new_wchar_t_memmove_68 { void bad();} /* END-AUTOGENERATED-CPP-BAD-FUNCTION-DECLARATIONS */ #endif // OMITBAD #endif // __cplusplus #endif // _TESTCASES_H
33.186905
97
0.843361
b4994e60bd78c7ad0a72c3fc6495af951ac145e8
1,043
h
C
GlacierFormats/src/RenderAsset.h
pawREP/GlacierFormats
9eece4541d863e288fc950087c4f6ec111258fe9
[ "MIT" ]
3
2020-04-03T00:01:35.000Z
2021-02-04T04:20:58.000Z
GlacierFormats/src/RenderAsset.h
pawREP/GlacierFormats
9eece4541d863e288fc950087c4f6ec111258fe9
[ "MIT" ]
1
2021-03-02T05:31:10.000Z
2021-03-02T05:31:10.000Z
GlacierFormats/src/RenderAsset.h
pawREP/GlacierFormats
9eece4541d863e288fc950087c4f6ec111258fe9
[ "MIT" ]
null
null
null
#pragma once #include "ResourceNode.h" #include "IRenderAsset.h" #include <vector> #include <string> #include <memory> //Facade that provides convinient access to a complete 3D model, including geometry, rig and textures //as implemented in PRIM, BORG and TEXD respectively. namespace GlacierFormats { class GlacierRenderAsset : public IRenderAsset { private: std::unique_ptr<IResourceNode> root; std::vector<IMaterial*> materials_; std::vector<IMesh*> meshes_; IRig* rig_; public: GlacierRenderAsset(RuntimeId root_prim_id); GlacierRenderAsset(IMesh* mesh); void sortMeshes(); //Interface const std::vector<IMaterial*> materials() const override final; const std::vector<IMesh*> meshes() const override final; const IRig* rig() const override final; std::string name() const override final; }; } //TODO: GlacierRenderAsset has some ownership inconsistencies. The two constructors result in difference ownership situations. //Maybe split the non owning case off into something like GenericRednerResource.
28.972222
126
0.763183
35379ab88d854f08e3f4509da94cf1bdfc7c8d65
3,619
h
C
src/sequencer/sequencer.h
CarloCattano/Midier
ad4f9020540ec129f264dd74fd1faed30903e0ef
[ "MIT" ]
null
null
null
src/sequencer/sequencer.h
CarloCattano/Midier
ad4f9020540ec129f264dd74fd1faed30903e0ef
[ "MIT" ]
null
null
null
src/sequencer/sequencer.h
CarloCattano/Midier
ad4f9020540ec129f264dd74fd1faed30903e0ef
[ "MIT" ]
null
null
null
#pragma once #include "../layers/layers.h" namespace midier { struct Sequencer { enum class Assist : char { No, Half = 2, Full = 1, }; enum class Bar : signed char { None = -1, Same = 0, // bar index }; enum class Run : char { Sync, Async, }; // this class is made to hide the underlying `Layer` from the client // so he or she will not call `Layer` methods directly but will call // `Sequencer` methods only struct Handle { config::Viewed * config = nullptr; private: friend class Sequencer; Layer * _layer = nullptr; }; // creation Sequencer(ILayers layers); Sequencer(ILayers layers, const Config & config); Sequencer(ILayers layers, unsigned char bpm); Sequencer(ILayers layers, const Config & config, unsigned char bpm); // queries bool recording() const; // start and stop layers Handle start(Degree degree); Handle start(Degree degree, const Config & config); void stop(Handle handle); // revoke the last recorded layer // doing nothing if wandering void revoke(); // state changes void record(); // toggle between record/playback/overlay modes void wander(); // go back to wandering // click the next subdivision in a bar and run the logic: // 1) manage state changes // 2) reset the beat if reached the end of the recorded loop // 3) click all layers // // this can be done either synchronously or asynchronously // // synchronous calls are blocking and wait for enough time to pass before // actually clicking the next subdivision in order for the bar to take // the correct amount of time according to `bpm` // // asynchronous calls are non-blocking and return `Bar::Same` if it's too // soon to actually click // // returns an indicator of any changes in the record loop bar or its index // if we are currently inside a record loop // Bar click(Run run); // run synchronously for a certain time duration // these methods are blocking and return after the time duration has fully passed void run(const Time::Duration & duration); // synchronously play a scale degree for a certain time duration // the scale degree is stopped at the end of the duration void play(Degree degree, const Time::Duration & duration); void play(Degree degree, const Time::Duration & duration, const Config & config); // exposed members Assist assist = Assist::No; ILayers layers; unsigned char bpm; Config config; // common layer configuration private: enum class State : char { Wander, Prerecord, Record, Playback, Overlay, }; unsigned long long _clicked = -1; // timestamp of previous click struct { Time when; // when we started to record char bars; // # of recorded bars } _record; // this is the subdivision of the first note ever played. // it is used to delay the start of new layers to match the rhythm when in assist mode. // we record full bars only. therefore, even if the time will be changed because of // resetting it at the end of the recorded loop, only the bar will change and the // subdivision will be kept the same. calculating delays in terms of subdivisions // is robust to beat changes and frugal in memory. char _started = -1; State _state = State::Wander; State _previous = _state; }; } // midier
27.838462
91
0.637469
3721d33174c2f4a6df26f6d8531fda44ebdb2b26
4,023
h
C
src/gui/cbProgressBar.h
dadair-ca/tactics
0f3c9fbd4dd4c2b93e5bbc68ccd0f2292bfbbe1d
[ "BSD-3-Clause" ]
null
null
null
src/gui/cbProgressBar.h
dadair-ca/tactics
0f3c9fbd4dd4c2b93e5bbc68ccd0f2292bfbbe1d
[ "BSD-3-Clause" ]
null
null
null
src/gui/cbProgressBar.h
dadair-ca/tactics
0f3c9fbd4dd4c2b93e5bbc68ccd0f2292bfbbe1d
[ "BSD-3-Clause" ]
null
null
null
/*========================================================================= Program: Cerebra Module: cbProgressBar.h Copyright (c) 2011-2013 Qian Lu 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 Calgary Image Processing and Analysis Centre (CIPAC), the University of Calgary, nor the names of any authors nor 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. =========================================================================*/ #ifndef CBPROGRESSBAR_H #define CBPROGRESSBAR_H #include <qprogressbar.h> #include "itkProcessObject.h" #include "itkCommand.h" class QLabel; class QObject; class QString; class QWidget; class itkObject; class vtkCallbackCommand; class vtkObject; //! Convert ITK, VTK progress event to QProgressBar /*! * cbProgressBar receive start, end and progress event from either ITK event * object or VTK event object, then set callback to QProgressBar. */ class cbProgressBar : public ::QProgressBar { Q_OBJECT public: cbProgressBar(QWidget *p); ~cbProgressBar(); typedef itk::MemberCommand<cbProgressBar> itkCommandType; //! Manage VTK start event static void StartEventVTK(vtkObject *caller, unsigned long eventId, void* clientData, void* callData); //! Manage VTK end event static void EndEventVTK(vtkObject *caller, unsigned long eventId, void* clientData, void* callData); //! Manage VTK progress event static void ProgressEventVTK(vtkObject *caller, unsigned long eventId, void* clientData, void* callData); //! Set an observer for VTK event void Observe(vtkObject *caller); //! Manage ITK start event void StartEventITK(itk::Object * caller, const itk::EventObject & event); //! Manage ITK end event void EndEventITK(itk::Object * caller, const itk::EventObject & event); //! Manage ITK progress event void ProgressEventITK(itk::Object * caller, const itk::EventObject & event); //! Set an observer for ITK event void Observe(itk::Object *caller); //! Send progress label to cbStatusBar void SetTextWidget(QLabel *textWidget); private: void CallbackProgress(double progress); void CallbackStart(); void CallbackEnd(); vtkCallbackCommand *m_ProgressCommandVTK; vtkCallbackCommand *m_StartCommandVTK; vtkCallbackCommand *m_EndCommandVTK; itkCommandType::Pointer m_StartCommandITK; itkCommandType::Pointer m_EndCommandITK; itkCommandType::Pointer m_ProgressCommandITK; QString m_text; QLabel *m_TextWidget; }; #endif // CBPROGRESSBAR_H
34.09322
78
0.704698
b0cdf2f4dd48a54f490610137ca94facef8a82fe
484
h
C
04-feeling-2/4.1-HelloGUI/HelloGUIApp.h
d2school/bhcpp
aaa3cb41e816634ce55db6c06735c90c1f536c0e
[ "Apache-2.0" ]
6
2019-10-08T05:41:29.000Z
2022-02-17T06:48:13.000Z
04-feeling-2/4.1-HelloGUI/HelloGUIApp.h
huizhang556/bhcpp
aaa3cb41e816634ce55db6c06735c90c1f536c0e
[ "Apache-2.0" ]
null
null
null
04-feeling-2/4.1-HelloGUI/HelloGUIApp.h
huizhang556/bhcpp
aaa3cb41e816634ce55db6c06735c90c1f536c0e
[ "Apache-2.0" ]
8
2019-11-11T13:03:02.000Z
2022-01-16T15:54:16.000Z
/*************************************************************** * Name: HelloGUIApp.h * Purpose: Defines Application Class * Author: NanYU (nanyu@sina.com) * Created: 2008-10-26 * Copyright: NanYU (www.d2school.com) * License: **************************************************************/ #ifndef HELLOGUIAPP_H #define HELLOGUIAPP_H #include <wx/app.h> class HelloGUIApp : public wxApp { public: virtual bool OnInit(); }; #endif // HELLOGUIAPP_H
22
64
0.491736
693c566fc5b8c86125c18a426b8eb8483f59f562
2,768
c
C
lib/firmware/keyboard/lightpad/backlight.c
byepolr/ErgoDox-EZ-Reactor
f484133122d11160ebe8142594bcc557ccd4bf62
[ "MIT" ]
54
2015-12-21T13:07:43.000Z
2019-04-16T20:06:25.000Z
lib/firmware/keyboard/lightpad/backlight.c
0buffer/reactor
cdf832e299157580cb8be91b9375cab189f6b0c7
[ "MIT" ]
10
2015-10-31T15:16:14.000Z
2019-03-12T13:25:29.000Z
lib/firmware/keyboard/lightpad/backlight.c
0buffer/reactor
cdf832e299157580cb8be91b9375cab189f6b0c7
[ "MIT" ]
30
2015-12-27T21:44:56.000Z
2019-03-26T07:13:26.000Z
/* Copyright 2014 Ralf Schmitt <ralf@bunkertor.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. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <avr/io.h> #include "backlight.h" /* Backlight pin configuration * * FN1 PB0 (low) * FN2 PB5 (low) * FN3 PB4 (low) * FN4 PD7 (low) * REAR PD6 (high) * NUMPAD PB2 (high) * NUMLOCK PB1 (low) */ void backlight_init_ports() { DDRB |= (1<<0) | (1<<1) | (1<<2) | (1<<4) | (1<<5); DDRD |= (1<<6) | (1<<7); backlight_disable_numlock(); } void backlight_set(uint8_t level) { (level & BACKLIGHT_FN1) ? backlight_enable_fn1() : backlight_disable_fn1(); (level & BACKLIGHT_FN2) ? backlight_enable_fn2() : backlight_disable_fn2(); (level & BACKLIGHT_FN3) ? backlight_enable_fn3() : backlight_disable_fn3(); (level & BACKLIGHT_FN4) ? backlight_enable_fn4() : backlight_disable_fn4(); (level & BACKLIGHT_NUMPAD) ? backlight_enable_numpad() : backlight_disable_numpad(); (level & BACKLIGHT_REAR) ? backlight_enable_rear() : backlight_disable_rear(); } void backlight_enable_fn1() { PORTB &= ~(1<<0); } void backlight_disable_fn1() { PORTB |= (1<<0); } void backlight_invert_fn1() { PORTB ^= (1<<0); } void backlight_enable_fn2() { PORTB &= ~(1<<5); } void backlight_disable_fn2() { PORTB |= (1<<5); } void backlight_invert_fn2() { PORTB ^= (1<<5); } void backlight_enable_fn3() { PORTB &= ~(1<<4); } void backlight_disable_fn3() { PORTB |= (1<<4); } void backlight_invert_fn3() { PORTB ^= (1<<4); } void backlight_enable_fn4() { PORTD &= ~(1<<7); } void backlight_disable_fn4() { PORTD |= (1<<7); } void backlight_invert_fn4() { PORTD ^= (1<<7); } void backlight_enable_numpad() { PORTB |= (1<<2); } void backlight_disable_numpad() { PORTB &= ~(1<<2); } void backlight_invert_numpad() { PORTB ^= (1<<2); } void backlight_enable_numlock() { PORTB &= ~(1<<1); } void backlight_disable_numlock() { PORTB |= (1<<1); } void backlight_invert_numlock() { PORTB ^= (1<<1); } void backlight_enable_rear() { PORTD |= (1<<6); } void backlight_disable_rear() { PORTD &= ~(1<<6); } void backlight_invert_rear() { PORTD ^= (1<<6); }
21.292308
88
0.651012
e6460c117cc64c2558ccf0982a435946399b73f9
5,873
h
C
Headers/APMDatabase.h
chuiizeet/stickers-daily-headers
d779869a384b0334e709ea24830bee5b063276a9
[ "MIT" ]
null
null
null
Headers/APMDatabase.h
chuiizeet/stickers-daily-headers
d779869a384b0334e709ea24830bee5b063276a9
[ "MIT" ]
null
null
null
Headers/APMDatabase.h
chuiizeet/stickers-daily-headers
d779869a384b0334e709ea24830bee5b063276a9
[ "MIT" ]
null
null
null
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> @class APMPersistedConfig, APMSqliteStore; @interface APMDatabase : NSObject { APMSqliteStore *_sqliteStore; APMPersistedConfig *_persistedConfig; } - (void).cxx_destruct; - (_Bool)updateDataType:(id)arg1 inTableWithName:(id)arg2 columnName:(id)arg3 columnValue:(id)arg4 error:(id *)arg5 createDictionaryBlock:(CDUnknownBlockType)arg6; - (_Bool)upsertDataType:(id)arg1 inTableWithName:(id)arg2 columnName:(id)arg3 columnValue:(id)arg4 tableLimit:(long long)arg5 error:(id *)arg6 createDictionaryBlock:(CDUnknownBlockType)arg7; - (_Bool)insertDataType:(id)arg1 inTableWithName:(id)arg2 error:(id *)arg3 createDictionaryBlock:(CDUnknownBlockType)arg4; - (id)dataTypesFromTableWithName:(id)arg1 columnName:(id)arg2 columnValue:(id)arg3 error:(id *)arg4 createDataTypeBlock:(CDUnknownBlockType)arg5; - (id)allDataTypesFromTableWithName:(id)arg1 tableLimit:(long long)arg2 error:(id *)arg3 createDataTypeBlock:(CDUnknownBlockType)arg4; - (_Bool)ensureAllTables; - (_Bool)initializeDatabaseResourcesWithContext:(id)arg1 databasePath:(id)arg2; - (_Bool)deleteComplexEventForAudienceEvaluationWithEventID:(long long)arg1 error:(id *)arg2; - (_Bool)updateComplexEventForAudienceEvaluationWithEventID:(long long)arg1 childEventCount:(long long)arg2 mainEvent:(id)arg3 error:(id *)arg4; - (id)mainEventAndChildCountPairWithEventID:(long long)arg1 error:(id *)arg2; - (id)conditionalUserPropertiesWithCondition:(id)arg1 parameterValues:(id)arg2 error:(id *)arg3; - (id)conditionalUserPropertiesWithPrefix:(id)arg1 filterByOrigin:(id)arg2 error:(id *)arg3; - (id)triggeredConditionalUserPropertiesWithEventName:(id)arg1 error:(id *)arg2; - (id)expiredConditionalUserPropertiesWithError:(id *)arg1; - (id)timedOutConditionalUserPropertiesWithError:(id *)arg1; - (_Bool)deleteConditionalUserPropertyWithName:(id)arg1 error:(id *)arg2; - (_Bool)updateConditionalUserProperty:(id)arg1 error:(id *)arg2; - (id)conditionalUserPropertyWithName:(id)arg1 error:(id *)arg2; - (id)insertIfNotDuplicatePurchaseFingerprint:(id)arg1 error:(id *)arg2; - (id)lastRemoteConfigUpdateTimestamp:(id *)arg1; - (id)queryMeasurementConfigWithError:(id *)arg1; - (_Bool)updateRemoteConfigSuccessfulTimestamp:(double)arg1 error:(id *)arg2; - (_Bool)updateRemoteConfig:(id)arg1 error:(id *)arg2; - (_Bool)deleteAllPropertyFilters:(id *)arg1; - (_Bool)deleteAllEventFilters:(id *)arg1; - (_Bool)deletePropertyFilters:(id)arg1 error:(id *)arg2; - (_Bool)deleteEventFilters:(id)arg1 error:(id *)arg2; - (_Bool)updateFilterResults:(id)arg1 error:(id *)arg2; - (_Bool)updatePropertyFilters:(id)arg1 error:(id *)arg2; - (_Bool)updateEventFilters:(id)arg1 error:(id *)arg2; - (id)allSessionScopedFilters:(id *)arg1; - (_Bool)deleteFilterResults:(id)arg1 error:(id *)arg2; - (id)filterResultForAudienceID:(int)arg1 error:(id *)arg2; - (id)propertyFiltersForPropertyName:(id)arg1 error:(id *)arg2; - (id)eventFiltersForEventName:(id)arg1 error:(id *)arg2; - (id)allAudienceIDs:(id *)arg1; - (id)allFilterResults:(id *)arg1; - (_Bool)deleteUserAttributeWithName:(id)arg1 error:(id *)arg2; - (_Bool)updateUserAttribute:(id)arg1 error:(id *)arg2; - (id)userAttributesIncludingInternal:(_Bool)arg1 error:(id *)arg2; - (id)allLifetimeValueUserAttributes:(id *)arg1; - (id)userAttributeWithName:(id)arg1 error:(id *)arg2; - (id)containsUserAttributeWithName:(id)arg1 error:(id *)arg2; - (id)userAttributeCountForOrigin:(id)arg1 error:(id *)arg2; - (id)publicUserAttributeCount:(id *)arg1; - (_Bool)clearCurrentSessionCounts:(id *)arg1; - (_Bool)updateEventAggregates:(id)arg1 error:(id *)arg2; - (id)eventAggregatesWithName:(id)arg1 error:(id *)arg2; - (id)allEventAggregates:(id *)arg1; - (id)publicEventCount:(id *)arg1; - (id)containsRealtimeBundlesWithError:(id *)arg1; - (id)queryLatestBundleTime:(id *)arg1; - (_Bool)deleteStaleBundlesOlderThanMaxAge:(double)arg1 error:(id *)arg2; - (id)maybeDeleteStaleData:(id *)arg1; - (_Bool)deleteBundlesWithRowIDs:(id)arg1 error:(id *)arg2; - (id)queryBundlesWithRowIDs:(id)arg1 error:(id *)arg2; - (id)queryBundlesWithCountLimit:(long long)arg1 sizeLimit:(long long)arg2 error:(id *)arg3; - (_Bool)incrementRetryCounterForBundlesWithIDs:(id)arg1 error:(id *)arg2; - (_Bool)insertBundle:(id)arg1 isRealtime:(_Bool)arg2 error:(id *)arg3; - (id)isQueuedBundleTableEmpty:(id *)arg1; - (id)containsRealtimeRawEventsWithError:(id *)arg1; - (id)rawEventDataFromDictionary:(id)arg1 error:(id *)arg2; - (id)nextMetadataFingerprintToProcess:(id *)arg1; - (_Bool)deleteStaleRawEventsDataOlderThanMaxAge:(double)arg1 error:(id *)arg2; - (id)deleteRawEventsOverAbsoluteLimit:(id *)arg1; - (_Bool)deleteRawEventsWithMaxRowID:(long long)arg1 error:(id *)arg2; - (id)containsRawEventWithMetadataFingerprint:(long long)arg1 error:(id *)arg2; - (id)rawEventsWithMetadataFingerprint:(long long)arg1 error:(id *)arg2 eventFilter:(CDUnknownBlockType)arg3; - (id)queryLatestRawEventTime:(id *)arg1; - (_Bool)insertRawEvent:(id)arg1 metadataFingerprint:(long long)arg2 isRealtime:(_Bool)arg3 error:(id *)arg4; - (id)isRawEventsTableEmpty:(id *)arg1; - (_Bool)deleteUnusedRawEventsMetadata:(id *)arg1; - (_Bool)deleteRawEventMetadataWithMetadataFingerprint:(long long)arg1 error:(id *)arg2; - (id)queryRawEventsMetadataWithFingerprint:(long long)arg1 error:(id *)arg2; - (_Bool)insertIfNotExistsRawEventMetadata:(id)arg1 error:(id *)arg2; - (_Bool)updateDailyCounts:(id)arg1 error:(id *)arg2; - (id)dailyCounts:(id *)arg1; - (_Bool)updateAppMetadata:(id)arg1 error:(id *)arg2; - (id)queryAppMetadata:(id *)arg1; - (_Bool)initializeAppMetadata; - (_Bool)performTransaction:(CDUnknownBlockType)arg1; - (void)reset; - (id)initWithDatabaseName:(id)arg1 persistedConfig:(id)arg2; @end
56.471154
190
0.772518
fd88b3dae56b808714804e6f0ef0939a2d0580dd
1,998
c
C
asn1c_defs/all-defs/ENBConfigurationUpdateFailure.c
o-ran-sc/ric-app-kpimon
b402550220ed60118aea67031516f4164b82a8ac
[ "Apache-2.0" ]
null
null
null
asn1c_defs/all-defs/ENBConfigurationUpdateFailure.c
o-ran-sc/ric-app-kpimon
b402550220ed60118aea67031516f4164b82a8ac
[ "Apache-2.0" ]
null
null
null
asn1c_defs/all-defs/ENBConfigurationUpdateFailure.c
o-ran-sc/ric-app-kpimon
b402550220ed60118aea67031516f4164b82a8ac
[ "Apache-2.0" ]
null
null
null
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "X2AP-PDU-Contents" * found in "../../asn_defs/asn1/x2ap-modified-15-05.asn" * `asn1c -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-OER` */ #include "ENBConfigurationUpdateFailure.h" asn_TYPE_member_t asn_MBR_ENBConfigurationUpdateFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct ENBConfigurationUpdateFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_ProtocolIE_Container_8180P30, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_ENBConfigurationUpdateFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_ENBConfigurationUpdateFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_ENBConfigurationUpdateFailure_specs_1 = { sizeof(struct ENBConfigurationUpdateFailure), offsetof(struct ENBConfigurationUpdateFailure, _asn_ctx), asn_MAP_ENBConfigurationUpdateFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_ENBConfigurationUpdateFailure = { "ENBConfigurationUpdateFailure", "ENBConfigurationUpdateFailure", &asn_OP_SEQUENCE, asn_DEF_ENBConfigurationUpdateFailure_tags_1, sizeof(asn_DEF_ENBConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_ENBConfigurationUpdateFailure_tags_1[0]), /* 1 */ asn_DEF_ENBConfigurationUpdateFailure_tags_1, /* Same as above */ sizeof(asn_DEF_ENBConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_ENBConfigurationUpdateFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_ENBConfigurationUpdateFailure_1, 1, /* Elements count */ &asn_SPC_ENBConfigurationUpdateFailure_specs_1 /* Additional specs */ };
39.176471
88
0.74975
5af9d685496a68081435dcdf437e319972d0794c
765
h
C
include/codepoint.h
josephmcl/crater-lang
7219d7bc246ac421489e789e06d09beba733dd13
[ "MIT" ]
null
null
null
include/codepoint.h
josephmcl/crater-lang
7219d7bc246ac421489e789e06d09beba733dd13
[ "MIT" ]
null
null
null
include/codepoint.h
josephmcl/crater-lang
7219d7bc246ac421489e789e06d09beba733dd13
[ "MIT" ]
1
2019-12-21T01:03:05.000Z
2019-12-21T01:03:05.000Z
/*codepoint.h Copyright ©2018 Joseph McLaughlin This file is covered by the MIT license. Refer to the LICENSE file in the root directory of this project for more information. */ #ifndef CRATER_LANG_CODEPOINT_H_ #define CRATER_LANG_CODEPOINT_H_ #include <stdint.h> #include <stdio.h> int code_point_cmp(uint8_t *a, uint8_t *b); int utf8_whitespace(uint8_t *code_point); int utf8_code_point_length(uint8_t c); int utf8_code_point_to_int(uint8_t *code_point); int utf8_code_point_alpha(uint8_t code_point); //TODO remove this? int is_alpha(uint8_t c); int utf8_code_point_digit(uint8_t code_point); //TODO remove this? int is_digit(uint8_t c); int is_digit19(uint8_t c); int is_alphanum(uint8_t c); uint8_t *consume_digit(uint8_t *head); #endif
21.857143
72
0.781699
ee2981eaf01e39853ad97850ad2a65d8abf66680
378
h
C
MT_GuoKe/MT_Guoke/Guoke/View/MTCollectionTableViewCell.h
Massare/MTGuoKe
2e63737a55214973aeb9d0ae878b75726c2ea6e5
[ "Apache-2.0" ]
null
null
null
MT_GuoKe/MT_Guoke/Guoke/View/MTCollectionTableViewCell.h
Massare/MTGuoKe
2e63737a55214973aeb9d0ae878b75726c2ea6e5
[ "Apache-2.0" ]
null
null
null
MT_GuoKe/MT_Guoke/Guoke/View/MTCollectionTableViewCell.h
Massare/MTGuoKe
2e63737a55214973aeb9d0ae878b75726c2ea6e5
[ "Apache-2.0" ]
null
null
null
// // MTCollectionTableViewCell.h // MT_Guoke // // Created by Austen on 16/2/17. // Copyright © 2016年 mlc. All rights reserved. // #import <UIKit/UIKit.h> @class MTArticle; @class MTArticleFrame; @interface MTCollectionTableViewCell : UITableViewCell @property (nonatomic, strong) MTArticle *article; //@property (nonatomic, strong) MTArticleFrame *articleFrame; @end
18.9
61
0.740741
09f05f4edc0ac7a4044b43d997c9134173a3d0e6
54,412
c
C
testsuite/EXP_3/test478.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
34
2017-07-04T14:16:12.000Z
2021-04-22T21:04:43.000Z
testsuite/EXP_3/test478.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
1
2017-07-06T03:43:44.000Z
2017-07-06T03:43:44.000Z
testsuite/EXP_3/test478.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
6
2017-07-04T16:30:42.000Z
2019-10-16T05:37:29.000Z
/* CF3 Copyright (c) 2015 ishiura-lab. Released under the MIT license. https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md */ #include<stdio.h> #include<stdint.h> #include<stdlib.h> #include"test1.h" volatile uint64_t x5 = 3464788943254241LLU; int16_t x6 = 757; volatile int16_t x12 = INT16_MAX; volatile uint8_t x24 = 33U; volatile uint16_t x26 = 407U; int64_t x33 = -1LL; int32_t x34 = INT32_MAX; uint16_t x39 = 1425U; static int32_t x40 = 96; int32_t t9 = 6062587; uint32_t x56 = 1816U; uint32_t x64 = UINT32_MAX; int32_t x66 = -1; int16_t x82 = 142; int64_t t17 = -439382384277643LL; int8_t x85 = 1; uint8_t x87 = 50U; static volatile uint32_t x88 = 2U; uint32_t x96 = 18310794U; volatile uint32_t x100 = 3328U; volatile uint64_t x104 = 3LLU; static uint8_t x112 = 6U; int16_t x121 = -425; uint16_t x122 = 17244U; uint64_t x134 = UINT64_MAX; uint64_t x152 = 19751LLU; static volatile int16_t x166 = -1; static int32_t t32 = -307; int32_t x170 = 511947; int64_t x183 = -338768620243LL; static int64_t t34 = -26668614LL; int64_t x185 = -1LL; volatile uint16_t x188 = UINT16_MAX; static int32_t x197 = -144515; int8_t x200 = INT8_MIN; int16_t x209 = INT16_MIN; uint32_t t38 = 586U; static int32_t x213 = INT32_MAX; volatile uint64_t x220 = UINT64_MAX; static uint8_t x222 = 1U; uint8_t x224 = 30U; static int8_t x227 = 1; int16_t x228 = INT16_MIN; uint8_t x236 = 7U; int8_t x239 = 13; uint64_t t45 = 51481LLU; int8_t x259 = INT8_MIN; uint32_t x266 = 0U; int8_t x275 = -1; uint64_t x279 = UINT64_MAX; volatile uint64_t t50 = 2030382LLU; volatile int64_t t51 = -65904316043704855LL; static int32_t x290 = INT32_MAX; static volatile int32_t t52 = -4142168; int64_t t53 = -207329LL; uint8_t x300 = 10U; int32_t t54 = 4; static int16_t x314 = 419; static volatile int64_t x319 = INT64_MAX; volatile uint64_t x320 = 67611380618LLU; volatile int32_t x321 = 5; uint64_t x326 = 789440959LLU; static int64_t x328 = INT64_MAX; uint8_t x331 = 5U; int32_t x345 = INT32_MIN; int64_t x347 = -3LL; uint32_t x351 = 1U; static int32_t t67 = -55145988; static uint32_t x367 = 116432728U; static uint64_t x371 = 2919604565114LLU; uint8_t x384 = UINT8_MAX; uint32_t x392 = UINT32_MAX; uint16_t x398 = 10U; static volatile uint16_t x400 = 408U; uint32_t x401 = 1U; static volatile int16_t x402 = -3; static uint64_t x413 = UINT64_MAX; uint64_t x420 = 3726760LLU; int16_t x429 = 0; volatile uint32_t t81 = 78548368U; int32_t t84 = -5902977; volatile int16_t x446 = INT16_MIN; uint8_t x453 = 3U; int32_t x454 = INT32_MIN; static uint32_t x457 = 81U; uint8_t x461 = 9U; volatile int64_t x464 = INT64_MAX; uint8_t x465 = 7U; volatile uint64_t x466 = 18468354297102LLU; volatile uint32_t t90 = 382680087U; uint64_t x471 = UINT64_MAX; uint32_t x474 = 1986U; int64_t x479 = -2LL; volatile uint8_t x483 = UINT8_MAX; uint32_t x484 = 37536684U; uint16_t x498 = UINT16_MAX; volatile int32_t x510 = INT32_MIN; volatile uint64_t x512 = UINT64_MAX; static volatile uint16_t x518 = 11U; int8_t x533 = INT8_MIN; uint64_t x540 = UINT64_MAX; uint16_t x542 = 16372U; int16_t x550 = INT16_MAX; volatile uint64_t x552 = 505600810LLU; static int16_t x558 = -892; uint32_t x563 = 2U; uint64_t x576 = UINT64_MAX; uint16_t x583 = 399U; int32_t x585 = -1; int64_t x587 = INT64_MAX; uint16_t x590 = UINT16_MAX; static uint16_t x594 = UINT16_MAX; volatile uint64_t x607 = 8585496020929LLU; uint64_t x624 = UINT64_MAX; int16_t x642 = 459; uint16_t x645 = 202U; static volatile int32_t x659 = -1; volatile uint64_t t126 = 69968330868720383LLU; int16_t x663 = INT16_MIN; static int16_t x671 = -856; volatile int64_t x673 = -9375354805LL; volatile int16_t x674 = -1; int8_t x693 = INT8_MIN; int16_t x696 = -2; int64_t x698 = 870615918732LL; uint64_t t134 = 288009329820719287LLU; int16_t x701 = INT16_MAX; uint32_t x705 = UINT32_MAX; int16_t x709 = -4511; int16_t x710 = INT16_MIN; uint32_t x711 = 9231U; int16_t x715 = INT16_MIN; volatile uint16_t x722 = 10U; uint64_t x724 = 3174808180467942LLU; volatile int64_t t140 = -114800363831603593LL; volatile int8_t x731 = -5; volatile int16_t x737 = INT16_MIN; int32_t x738 = INT32_MIN; volatile uint8_t x740 = UINT8_MAX; int8_t x742 = 0; uint64_t t143 = 382536051038477LLU; static int64_t x753 = 2704LL; int8_t x757 = INT8_MIN; uint16_t x758 = 86U; static int16_t x759 = INT16_MIN; static uint64_t x768 = 3LLU; uint64_t t149 = 48495118LLU; volatile uint64_t x775 = 68549211119029023LLU; int16_t x783 = -1; uint32_t x787 = UINT32_MAX; uint64_t x789 = 171605614LLU; int16_t x791 = 375; volatile uint8_t x792 = 9U; volatile int32_t t153 = -941; int32_t x793 = 16201; uint64_t t154 = 22571187090439386LLU; int8_t x801 = 1; static volatile uint64_t x808 = 1LLU; static volatile int64_t x810 = INT64_MIN; uint8_t x812 = 0U; static int64_t x817 = INT64_MAX; int8_t x818 = INT8_MIN; uint64_t x819 = UINT64_MAX; int16_t x820 = INT16_MIN; int32_t x830 = -1; int32_t x847 = 203090; volatile uint64_t t165 = 1667LLU; uint32_t x864 = 572899U; int32_t x865 = 127; int64_t x875 = -18022750076086789LL; int32_t x883 = INT32_MIN; uint32_t x884 = 3498U; uint32_t t170 = 8338060U; volatile uint32_t x902 = 798820893U; static volatile int32_t t174 = -163; static uint8_t x913 = 3U; volatile int8_t x920 = INT8_MIN; volatile uint64_t t178 = 2896442432LLU; volatile uint16_t x929 = UINT16_MAX; static uint16_t x931 = 30U; static int64_t x954 = INT64_MIN; int64_t t181 = -10406691LL; uint32_t x958 = UINT32_MAX; int8_t x961 = 0; int32_t x964 = -1; static uint64_t t183 = 3027LLU; int64_t x970 = -692LL; static int16_t x980 = -1; int32_t x1003 = -1; volatile uint32_t x1004 = UINT32_MAX; static uint64_t t191 = 407214119840107057LLU; volatile uint64_t x1021 = 28LLU; static int16_t x1027 = -1; int32_t x1046 = INT32_MIN; uint16_t x1048 = 0U; int8_t x1053 = INT8_MIN; uint32_t x1054 = 529U; volatile int8_t x1059 = INT8_MIN; volatile int64_t x1060 = -1LL; uint64_t x1064 = 122589712354306LLU; void f0(void) { volatile uint8_t x1 = UINT8_MAX; int32_t x2 = 358392; uint64_t x3 = 2569114442484LLU; int8_t x4 = INT8_MAX; uint64_t t0 = 194808050LLU; t0 = ((x1!=x2)-(x3*x4)); if (t0 != 18446417796175356149LLU) { NG(); } else { ; } } void f1(void) { int8_t x7 = INT8_MAX; int64_t x8 = -1LL; int64_t t1 = 822423099552LL; t1 = ((x5!=x6)-(x7*x8)); if (t1 != 128LL) { NG(); } else { ; } } void f2(void) { int8_t x9 = INT8_MIN; static uint32_t x10 = 1931592849U; uint64_t x11 = 150568396055493LLU; uint64_t t2 = 88LLU; t2 = ((x9!=x10)-(x11*x12)); if (t2 != 13513069440159212486LLU) { NG(); } else { ; } } void f3(void) { int16_t x13 = INT16_MAX; uint16_t x14 = 25U; int16_t x15 = INT16_MAX; volatile uint32_t x16 = 72321U; uint32_t t3 = 10241941U; t3 = ((x13!=x14)-(x15*x16)); if (t3 != 1925225090U) { NG(); } else { ; } } void f4(void) { int16_t x21 = INT16_MAX; int16_t x22 = INT16_MIN; uint64_t x23 = UINT64_MAX; volatile uint64_t t4 = 31910LLU; t4 = ((x21!=x22)-(x23*x24)); if (t4 != 34LLU) { NG(); } else { ; } } void f5(void) { int8_t x25 = 22; static int16_t x27 = 0; static uint64_t x28 = 61105LLU; uint64_t t5 = 40480405LLU; t5 = ((x25!=x26)-(x27*x28)); if (t5 != 1LLU) { NG(); } else { ; } } void f6(void) { volatile uint8_t x29 = 108U; uint64_t x30 = 1301682070274847944LLU; int8_t x31 = -1; volatile uint8_t x32 = 49U; volatile int32_t t6 = 61794; t6 = ((x29!=x30)-(x31*x32)); if (t6 != 50) { NG(); } else { ; } } void f7(void) { int64_t x35 = 136LL; int64_t x36 = 2119870281LL; int64_t t7 = 7238741332LL; t7 = ((x33!=x34)-(x35*x36)); if (t7 != -288302358215LL) { NG(); } else { ; } } void f8(void) { volatile uint16_t x37 = UINT16_MAX; int32_t x38 = INT32_MIN; int32_t t8 = -890721; t8 = ((x37!=x38)-(x39*x40)); if (t8 != -136799) { NG(); } else { ; } } void f9(void) { int32_t x45 = -1280; static int8_t x46 = -1; int8_t x47 = INT8_MAX; static int16_t x48 = -1; t9 = ((x45!=x46)-(x47*x48)); if (t9 != 128) { NG(); } else { ; } } void f10(void) { int16_t x49 = -1; int16_t x50 = -1; uint64_t x51 = UINT64_MAX; volatile int16_t x52 = INT16_MIN; volatile uint64_t t10 = 8117LLU; t10 = ((x49!=x50)-(x51*x52)); if (t10 != 18446744073709518848LLU) { NG(); } else { ; } } void f11(void) { int32_t x53 = 0; int32_t x54 = INT32_MIN; volatile uint8_t x55 = 107U; uint32_t t11 = 18U; t11 = ((x53!=x54)-(x55*x56)); if (t11 != 4294772985U) { NG(); } else { ; } } void f12(void) { volatile uint8_t x61 = 1U; uint32_t x62 = 2U; int32_t x63 = -1; uint32_t t12 = 10U; t12 = ((x61!=x62)-(x63*x64)); if (t12 != 0U) { NG(); } else { ; } } void f13(void) { int8_t x65 = -1; uint16_t x67 = UINT16_MAX; uint16_t x68 = 4U; volatile int32_t t13 = -2; t13 = ((x65!=x66)-(x67*x68)); if (t13 != -262140) { NG(); } else { ; } } void f14(void) { int16_t x69 = -1961; int32_t x70 = INT32_MIN; int8_t x71 = -1; static int64_t x72 = -1LL; int64_t t14 = -2337436842140348LL; t14 = ((x69!=x70)-(x71*x72)); if (t14 != 0LL) { NG(); } else { ; } } void f15(void) { volatile int32_t x73 = INT32_MIN; int8_t x74 = INT8_MIN; uint8_t x75 = UINT8_MAX; int8_t x76 = INT8_MAX; int32_t t15 = 697151559; t15 = ((x73!=x74)-(x75*x76)); if (t15 != -32384) { NG(); } else { ; } } void f16(void) { int64_t x77 = -1LL; static uint64_t x78 = 3447915651669264348LLU; volatile int8_t x79 = INT8_MIN; static int8_t x80 = 13; int32_t t16 = 56; t16 = ((x77!=x78)-(x79*x80)); if (t16 != 1665) { NG(); } else { ; } } void f17(void) { uint16_t x81 = 1278U; static int16_t x83 = INT16_MIN; int64_t x84 = 76951764LL; t17 = ((x81!=x82)-(x83*x84)); if (t17 != 2521555402753LL) { NG(); } else { ; } } void f18(void) { volatile int64_t x86 = INT64_MAX; uint32_t t18 = 1U; t18 = ((x85!=x86)-(x87*x88)); if (t18 != 4294967197U) { NG(); } else { ; } } void f19(void) { uint32_t x89 = 25647U; volatile int8_t x90 = INT8_MAX; static uint64_t x91 = 19916LLU; static int32_t x92 = INT32_MIN; volatile uint64_t t19 = 166267336975286LLU; t19 = ((x89!=x90)-(x91*x92)); if (t19 != 42769284333569LLU) { NG(); } else { ; } } void f20(void) { static volatile int64_t x93 = -1LL; int64_t x94 = INT64_MIN; uint64_t x95 = 15157654836LLU; uint64_t t20 = 107313982LLU; t20 = ((x93!=x94)-(x95*x96)); if (t20 != 18169195378484451833LLU) { NG(); } else { ; } } void f21(void) { int8_t x97 = INT8_MIN; int16_t x98 = -1; int8_t x99 = INT8_MAX; static uint32_t t21 = 3U; t21 = ((x97!=x98)-(x99*x100)); if (t21 != 4294544641U) { NG(); } else { ; } } void f22(void) { volatile int8_t x101 = -3; static volatile int16_t x102 = INT16_MIN; static uint64_t x103 = UINT64_MAX; static uint64_t t22 = 1127190942187183LLU; t22 = ((x101!=x102)-(x103*x104)); if (t22 != 4LLU) { NG(); } else { ; } } void f23(void) { static uint8_t x109 = 7U; uint64_t x110 = 1956498048927921LLU; int8_t x111 = INT8_MIN; int32_t t23 = 280; t23 = ((x109!=x110)-(x111*x112)); if (t23 != 769) { NG(); } else { ; } } void f24(void) { int32_t x113 = INT32_MIN; int64_t x114 = -1LL; int64_t x115 = -2272818808LL; uint8_t x116 = 31U; int64_t t24 = -1182135194671LL; t24 = ((x113!=x114)-(x115*x116)); if (t24 != 70457383049LL) { NG(); } else { ; } } void f25(void) { static volatile int16_t x123 = 915; static int8_t x124 = -1; volatile int32_t t25 = -6; t25 = ((x121!=x122)-(x123*x124)); if (t25 != 916) { NG(); } else { ; } } void f26(void) { uint8_t x133 = UINT8_MAX; int8_t x135 = -1; uint32_t x136 = UINT32_MAX; uint32_t t26 = 24U; t26 = ((x133!=x134)-(x135*x136)); if (t26 != 0U) { NG(); } else { ; } } void f27(void) { volatile int8_t x137 = INT8_MIN; int8_t x138 = INT8_MIN; static int16_t x139 = INT16_MAX; static uint64_t x140 = 5269717389208LLU; volatile uint64_t t27 = 1334330792LLU; t27 = ((x137!=x138)-(x139*x140)); if (t27 != 18274071244017373080LLU) { NG(); } else { ; } } void f28(void) { int16_t x145 = 0; static volatile int32_t x146 = INT32_MIN; int16_t x147 = -1; uint64_t x148 = 6851572841064LLU; uint64_t t28 = 12205703LLU; t28 = ((x145!=x146)-(x147*x148)); if (t28 != 6851572841065LLU) { NG(); } else { ; } } void f29(void) { int32_t x149 = -142098805; volatile int8_t x150 = INT8_MIN; uint16_t x151 = 3152U; uint64_t t29 = 15553LLU; t29 = ((x149!=x150)-(x151*x152)); if (t29 != 18446744073647296465LLU) { NG(); } else { ; } } void f30(void) { volatile uint8_t x153 = UINT8_MAX; int32_t x154 = INT32_MIN; int16_t x155 = -258; uint16_t x156 = 116U; volatile int32_t t30 = 4060; t30 = ((x153!=x154)-(x155*x156)); if (t30 != 29929) { NG(); } else { ; } } void f31(void) { static volatile uint64_t x161 = UINT64_MAX; int16_t x162 = 2; uint8_t x163 = 47U; int64_t x164 = 8447822653LL; int64_t t31 = -24250LL; t31 = ((x161!=x162)-(x163*x164)); if (t31 != -397047664690LL) { NG(); } else { ; } } void f32(void) { uint64_t x165 = 4381358LLU; int16_t x167 = INT16_MIN; uint8_t x168 = 1U; t32 = ((x165!=x166)-(x167*x168)); if (t32 != 32769) { NG(); } else { ; } } void f33(void) { static uint8_t x169 = 33U; volatile int8_t x171 = INT8_MIN; uint32_t x172 = UINT32_MAX; volatile uint32_t t33 = 29826843U; t33 = ((x169!=x170)-(x171*x172)); if (t33 != 4294967169U) { NG(); } else { ; } } void f34(void) { int32_t x181 = INT32_MAX; volatile uint32_t x182 = 33272U; int16_t x184 = INT16_MIN; t34 = ((x181!=x182)-(x183*x184)); if (t34 != -11100770148122623LL) { NG(); } else { ; } } void f35(void) { int16_t x186 = 3; static int8_t x187 = -1; int32_t t35 = 3662; t35 = ((x185!=x186)-(x187*x188)); if (t35 != 65536) { NG(); } else { ; } } void f36(void) { uint64_t x198 = UINT64_MAX; static int16_t x199 = INT16_MIN; static volatile int32_t t36 = 1024673897; t36 = ((x197!=x198)-(x199*x200)); if (t36 != -4194303) { NG(); } else { ; } } void f37(void) { int32_t x205 = INT32_MIN; uint32_t x206 = 576255U; int16_t x207 = INT16_MIN; volatile uint16_t x208 = UINT16_MAX; int32_t t37 = -23277169; t37 = ((x205!=x206)-(x207*x208)); if (t37 != 2147450881) { NG(); } else { ; } } void f38(void) { uint8_t x210 = 82U; uint32_t x211 = 3892U; int16_t x212 = -1; t38 = ((x209!=x210)-(x211*x212)); if (t38 != 3893U) { NG(); } else { ; } } void f39(void) { static int32_t x214 = -1; uint64_t x215 = 45536774279LLU; int32_t x216 = 987811; volatile uint64_t t39 = 1570LLU; t39 = ((x213!=x214)-(x215*x216)); if (t39 != 18401762347172238348LLU) { NG(); } else { ; } } void f40(void) { static int32_t x217 = INT32_MIN; int32_t x218 = INT32_MAX; int8_t x219 = INT8_MAX; volatile uint64_t t40 = 13805LLU; t40 = ((x217!=x218)-(x219*x220)); if (t40 != 128LLU) { NG(); } else { ; } } void f41(void) { uint64_t x221 = 0LLU; static uint32_t x223 = 3710U; uint32_t t41 = 6339764U; t41 = ((x221!=x222)-(x223*x224)); if (t41 != 4294855997U) { NG(); } else { ; } } void f42(void) { uint32_t x225 = 52109947U; static int8_t x226 = INT8_MAX; int32_t t42 = 1; t42 = ((x225!=x226)-(x227*x228)); if (t42 != 32769) { NG(); } else { ; } } void f43(void) { int64_t x233 = INT64_MIN; static int32_t x234 = -1; static uint16_t x235 = 485U; int32_t t43 = -68807; t43 = ((x233!=x234)-(x235*x236)); if (t43 != -3394) { NG(); } else { ; } } void f44(void) { int8_t x237 = INT8_MIN; int32_t x238 = INT32_MIN; int8_t x240 = -1; volatile int32_t t44 = -30; t44 = ((x237!=x238)-(x239*x240)); if (t44 != 14) { NG(); } else { ; } } void f45(void) { static uint8_t x249 = 2U; volatile int32_t x250 = INT32_MIN; volatile uint64_t x251 = UINT64_MAX; int16_t x252 = INT16_MIN; t45 = ((x249!=x250)-(x251*x252)); if (t45 != 18446744073709518849LLU) { NG(); } else { ; } } void f46(void) { static int32_t x257 = -1; int16_t x258 = -1; int64_t x260 = 1853828LL; int64_t t46 = 21LL; t46 = ((x257!=x258)-(x259*x260)); if (t46 != 237289984LL) { NG(); } else { ; } } void f47(void) { uint32_t x261 = 88377189U; int8_t x262 = -1; static int16_t x263 = 3; static uint8_t x264 = UINT8_MAX; volatile int32_t t47 = 20521; t47 = ((x261!=x262)-(x263*x264)); if (t47 != -764) { NG(); } else { ; } } void f48(void) { static int8_t x265 = INT8_MIN; volatile uint8_t x267 = 45U; int64_t x268 = -23856LL; int64_t t48 = -821368LL; t48 = ((x265!=x266)-(x267*x268)); if (t48 != 1073521LL) { NG(); } else { ; } } void f49(void) { int8_t x273 = INT8_MIN; int16_t x274 = -1; static volatile uint32_t x276 = 0U; uint32_t t49 = 487606014U; t49 = ((x273!=x274)-(x275*x276)); if (t49 != 1U) { NG(); } else { ; } } void f50(void) { volatile int8_t x277 = 5; int32_t x278 = INT32_MIN; int16_t x280 = -1; t50 = ((x277!=x278)-(x279*x280)); if (t50 != 0LLU) { NG(); } else { ; } } void f51(void) { int8_t x285 = -3; int8_t x286 = 16; int64_t x287 = -1LL; uint8_t x288 = 2U; t51 = ((x285!=x286)-(x287*x288)); if (t51 != 3LL) { NG(); } else { ; } } void f52(void) { int32_t x289 = -378232; static uint8_t x291 = 50U; int8_t x292 = INT8_MIN; t52 = ((x289!=x290)-(x291*x292)); if (t52 != 6401) { NG(); } else { ; } } void f53(void) { int16_t x293 = INT16_MIN; static uint64_t x294 = 48456335541044LLU; int16_t x295 = 3910; static volatile int64_t x296 = -1LL; t53 = ((x293!=x294)-(x295*x296)); if (t53 != 3911LL) { NG(); } else { ; } } void f54(void) { uint8_t x297 = 0U; static int8_t x298 = INT8_MAX; int16_t x299 = 5; t54 = ((x297!=x298)-(x299*x300)); if (t54 != -49) { NG(); } else { ; } } void f55(void) { static volatile int8_t x301 = -1; volatile uint16_t x302 = UINT16_MAX; int16_t x303 = 203; int64_t x304 = 98354680929LL; volatile int64_t t55 = 17824240295456LL; t55 = ((x301!=x302)-(x303*x304)); if (t55 != -19966000228586LL) { NG(); } else { ; } } void f56(void) { uint16_t x305 = 49U; static uint16_t x306 = 4010U; int8_t x307 = 1; int64_t x308 = INT64_MAX; volatile int64_t t56 = 482LL; t56 = ((x305!=x306)-(x307*x308)); if (t56 != -9223372036854775806LL) { NG(); } else { ; } } void f57(void) { int8_t x309 = INT8_MIN; volatile int8_t x310 = INT8_MAX; uint32_t x311 = 0U; uint16_t x312 = 47U; volatile uint32_t t57 = 11659441U; t57 = ((x309!=x310)-(x311*x312)); if (t57 != 1U) { NG(); } else { ; } } void f58(void) { static int16_t x313 = -5; uint64_t x315 = 700568LLU; static int64_t x316 = -1LL; volatile uint64_t t58 = 0LLU; t58 = ((x313!=x314)-(x315*x316)); if (t58 != 700569LLU) { NG(); } else { ; } } void f59(void) { int16_t x317 = 764; uint32_t x318 = 487592860U; uint64_t t59 = 4134987770694735653LLU; t59 = ((x317!=x318)-(x319*x320)); if (t59 != 67611380619LLU) { NG(); } else { ; } } void f60(void) { int16_t x322 = INT16_MIN; static volatile int32_t x323 = -48112; volatile int8_t x324 = INT8_MIN; volatile int32_t t60 = 1470378; t60 = ((x321!=x322)-(x323*x324)); if (t60 != -6158335) { NG(); } else { ; } } void f61(void) { static int8_t x325 = 10; uint64_t x327 = 15485325LLU; static volatile uint64_t t61 = 2907550422954044254LLU; t61 = ((x325!=x326)-(x327*x328)); if (t61 != 9223372036870261134LLU) { NG(); } else { ; } } void f62(void) { volatile uint64_t x329 = 7843730425LLU; uint32_t x330 = UINT32_MAX; int16_t x332 = INT16_MIN; int32_t t62 = 9; t62 = ((x329!=x330)-(x331*x332)); if (t62 != 163841) { NG(); } else { ; } } void f63(void) { static volatile uint16_t x333 = 2576U; static uint8_t x334 = 20U; int64_t x335 = INT64_MAX; static int8_t x336 = 1; static volatile int64_t t63 = 159LL; t63 = ((x333!=x334)-(x335*x336)); if (t63 != -9223372036854775806LL) { NG(); } else { ; } } void f64(void) { static uint8_t x341 = 44U; uint64_t x342 = 96024554969486LLU; uint32_t x343 = 143U; volatile int16_t x344 = INT16_MIN; uint32_t t64 = 8074U; t64 = ((x341!=x342)-(x343*x344)); if (t64 != 4685825U) { NG(); } else { ; } } void f65(void) { int32_t x346 = -1020013297; int32_t x348 = INT32_MIN; volatile int64_t t65 = 31392500037328448LL; t65 = ((x345!=x346)-(x347*x348)); if (t65 != -6442450943LL) { NG(); } else { ; } } void f66(void) { static uint32_t x349 = 769645464U; uint64_t x350 = 5014138631975378899LLU; static int32_t x352 = -1; uint32_t t66 = 82304606U; t66 = ((x349!=x350)-(x351*x352)); if (t66 != 2U) { NG(); } else { ; } } void f67(void) { static int32_t x357 = INT32_MIN; volatile int64_t x358 = -2898425412LL; static volatile int32_t x359 = 1336273; static int32_t x360 = 0; t67 = ((x357!=x358)-(x359*x360)); if (t67 != 1) { NG(); } else { ; } } void f68(void) { static int64_t x361 = INT64_MIN; static volatile uint32_t x362 = UINT32_MAX; volatile int16_t x363 = INT16_MAX; uint64_t x364 = 6571499286646LLU; static volatile uint64_t t68 = 413LLU; t68 = ((x361!=x362)-(x363*x364)); if (t68 != 18231415756584022135LLU) { NG(); } else { ; } } void f69(void) { volatile int16_t x365 = INT16_MIN; static int64_t x366 = INT64_MIN; int32_t x368 = -1; volatile uint32_t t69 = 795669U; t69 = ((x365!=x366)-(x367*x368)); if (t69 != 116432729U) { NG(); } else { ; } } void f70(void) { int8_t x369 = INT8_MIN; uint64_t x370 = UINT64_MAX; int32_t x372 = INT32_MAX; uint64_t t70 = 823824854LLU; t70 = ((x369!=x370)-(x371*x372)); if (t70 != 2089925772385858683LLU) { NG(); } else { ; } } void f71(void) { int16_t x377 = INT16_MAX; volatile int16_t x378 = -1; volatile uint32_t x379 = 38787364U; uint64_t x380 = UINT64_MAX; static uint64_t t71 = 2543210685501LLU; t71 = ((x377!=x378)-(x379*x380)); if (t71 != 38787365LLU) { NG(); } else { ; } } void f72(void) { static uint64_t x381 = 19854964369309LLU; int64_t x382 = 20307175305LL; int8_t x383 = -1; int32_t t72 = 1; t72 = ((x381!=x382)-(x383*x384)); if (t72 != 256) { NG(); } else { ; } } void f73(void) { uint32_t x389 = 57U; uint64_t x390 = 15484LLU; volatile uint64_t x391 = 38283886105LLU; uint64_t t73 = 209970963LLU; t73 = ((x389!=x390)-(x391*x392)); if (t73 != 1592657916906028570LLU) { NG(); } else { ; } } void f74(void) { static uint8_t x393 = 2U; int32_t x394 = INT32_MIN; uint64_t x395 = 11647LLU; int8_t x396 = INT8_MAX; volatile uint64_t t74 = 1231611809841954461LLU; t74 = ((x393!=x394)-(x395*x396)); if (t74 != 18446744073708072448LLU) { NG(); } else { ; } } void f75(void) { int16_t x397 = INT16_MAX; uint32_t x399 = 101358236U; static volatile uint32_t t75 = 170U; t75 = ((x397!=x398)-(x399*x400)); if (t75 != 1595512673U) { NG(); } else { ; } } void f76(void) { int16_t x403 = INT16_MIN; static uint64_t x404 = UINT64_MAX; static uint64_t t76 = 2LLU; t76 = ((x401!=x402)-(x403*x404)); if (t76 != 18446744073709518849LLU) { NG(); } else { ; } } void f77(void) { int8_t x409 = INT8_MIN; volatile int16_t x410 = INT16_MIN; uint64_t x411 = UINT64_MAX; static int16_t x412 = -1; volatile uint64_t t77 = 4123135276270LLU; t77 = ((x409!=x410)-(x411*x412)); if (t77 != 0LLU) { NG(); } else { ; } } void f78(void) { uint64_t x414 = 406844LLU; static uint32_t x415 = 367948U; uint32_t x416 = UINT32_MAX; uint32_t t78 = 2803U; t78 = ((x413!=x414)-(x415*x416)); if (t78 != 367949U) { NG(); } else { ; } } void f79(void) { int8_t x417 = 0; int8_t x418 = -1; int64_t x419 = INT64_MIN; volatile uint64_t t79 = 238168LLU; t79 = ((x417!=x418)-(x419*x420)); if (t79 != 1LLU) { NG(); } else { ; } } void f80(void) { uint8_t x425 = 3U; volatile int8_t x426 = -1; int16_t x427 = INT16_MAX; uint32_t x428 = UINT32_MAX; static volatile uint32_t t80 = 0U; t80 = ((x425!=x426)-(x427*x428)); if (t80 != 32768U) { NG(); } else { ; } } void f81(void) { uint8_t x430 = 1U; uint8_t x431 = 9U; uint32_t x432 = 1037979186U; t81 = ((x429!=x430)-(x431*x432)); if (t81 != 3543089215U) { NG(); } else { ; } } void f82(void) { int32_t x433 = -664989; int8_t x434 = 6; int8_t x435 = INT8_MAX; int32_t x436 = 1728; static volatile int32_t t82 = 6657; t82 = ((x433!=x434)-(x435*x436)); if (t82 != -219455) { NG(); } else { ; } } void f83(void) { int16_t x437 = INT16_MIN; int64_t x438 = INT64_MAX; int64_t x439 = -1LL; int16_t x440 = INT16_MIN; int64_t t83 = 499512080LL; t83 = ((x437!=x438)-(x439*x440)); if (t83 != -32767LL) { NG(); } else { ; } } void f84(void) { uint16_t x441 = 13U; uint32_t x442 = 939U; uint16_t x443 = 6U; uint8_t x444 = 1U; t84 = ((x441!=x442)-(x443*x444)); if (t84 != -5) { NG(); } else { ; } } void f85(void) { int16_t x445 = -1; int64_t x447 = 7529878695LL; int16_t x448 = -1; int64_t t85 = -7LL; t85 = ((x445!=x446)-(x447*x448)); if (t85 != 7529878696LL) { NG(); } else { ; } } void f86(void) { int64_t x449 = -1LL; volatile int16_t x450 = -11; static int64_t x451 = INT64_MIN; int16_t x452 = 0; volatile int64_t t86 = -1LL; t86 = ((x449!=x450)-(x451*x452)); if (t86 != 1LL) { NG(); } else { ; } } void f87(void) { uint16_t x455 = 14U; static volatile uint64_t x456 = 6635215819180178400LLU; static uint64_t t87 = 3145153LLU; t87 = ((x453!=x454)-(x455*x456)); if (t87 != 17787442973734812097LLU) { NG(); } else { ; } } void f88(void) { int64_t x458 = INT64_MAX; static int16_t x459 = 658; int8_t x460 = 1; int32_t t88 = -73; t88 = ((x457!=x458)-(x459*x460)); if (t88 != -657) { NG(); } else { ; } } void f89(void) { int16_t x462 = -27; uint64_t x463 = UINT64_MAX; uint64_t t89 = 560218LLU; t89 = ((x461!=x462)-(x463*x464)); if (t89 != 9223372036854775808LLU) { NG(); } else { ; } } void f90(void) { static volatile uint32_t x467 = UINT32_MAX; int8_t x468 = INT8_MAX; t90 = ((x465!=x466)-(x467*x468)); if (t90 != 128U) { NG(); } else { ; } } void f91(void) { int16_t x469 = -1; int32_t x470 = 1999; int32_t x472 = INT32_MIN; volatile uint64_t t91 = 31983792LLU; t91 = ((x469!=x470)-(x471*x472)); if (t91 != 18446744071562067969LLU) { NG(); } else { ; } } void f92(void) { uint16_t x473 = 104U; int16_t x475 = 5923; volatile uint8_t x476 = 33U; static volatile int32_t t92 = 386462870; t92 = ((x473!=x474)-(x475*x476)); if (t92 != -195458) { NG(); } else { ; } } void f93(void) { uint64_t x477 = UINT64_MAX; static int8_t x478 = -9; int64_t x480 = -1LL; int64_t t93 = -22664796161574806LL; t93 = ((x477!=x478)-(x479*x480)); if (t93 != -1LL) { NG(); } else { ; } } void f94(void) { int16_t x481 = INT16_MAX; int64_t x482 = 33429455308LL; volatile uint32_t t94 = 114641U; t94 = ((x481!=x482)-(x483*x484)); if (t94 != 3313047469U) { NG(); } else { ; } } void f95(void) { int32_t x485 = -2557; volatile int8_t x486 = -45; int16_t x487 = -1; volatile int16_t x488 = -1; volatile int32_t t95 = 447; t95 = ((x485!=x486)-(x487*x488)); if (t95 != 0) { NG(); } else { ; } } void f96(void) { volatile int8_t x497 = -1; uint64_t x499 = 17171215651910LLU; int8_t x500 = 4; uint64_t t96 = 1474311396366433LLU; t96 = ((x497!=x498)-(x499*x500)); if (t96 != 18446675388846943977LLU) { NG(); } else { ; } } void f97(void) { static int32_t x501 = -3087; static uint16_t x502 = 10U; static uint64_t x503 = 57937970LLU; int16_t x504 = INT16_MAX; static uint64_t t97 = 3156LLU; t97 = ((x501!=x502)-(x503*x504)); if (t97 != 18446742175256088627LLU) { NG(); } else { ; } } void f98(void) { int32_t x505 = -2; int16_t x506 = -7; static uint32_t x507 = 58U; volatile int8_t x508 = -1; uint32_t t98 = 1035363507U; t98 = ((x505!=x506)-(x507*x508)); if (t98 != 59U) { NG(); } else { ; } } void f99(void) { int16_t x509 = -10; int16_t x511 = -7032; static volatile uint64_t t99 = 43705LLU; t99 = ((x509!=x510)-(x511*x512)); if (t99 != 18446744073709544585LLU) { NG(); } else { ; } } void f100(void) { uint8_t x517 = 38U; static uint64_t x519 = 28017361981909108LLU; uint32_t x520 = 434U; uint64_t t100 = 3LLU; t100 = ((x517!=x518)-(x519*x520)); if (t100 != 6287208973560998745LLU) { NG(); } else { ; } } void f101(void) { int32_t x521 = -318; uint16_t x522 = UINT16_MAX; int16_t x523 = -1; volatile uint64_t x524 = 38605898LLU; uint64_t t101 = 2979796LLU; t101 = ((x521!=x522)-(x523*x524)); if (t101 != 38605899LLU) { NG(); } else { ; } } void f102(void) { volatile int32_t x525 = INT32_MIN; int8_t x526 = -1; static uint8_t x527 = UINT8_MAX; volatile int32_t x528 = -1; volatile int32_t t102 = -1411; t102 = ((x525!=x526)-(x527*x528)); if (t102 != 256) { NG(); } else { ; } } void f103(void) { volatile int64_t x529 = 105818959LL; volatile int16_t x530 = INT16_MAX; int32_t x531 = -2324; static uint64_t x532 = UINT64_MAX; uint64_t t103 = 30524592LLU; t103 = ((x529!=x530)-(x531*x532)); if (t103 != 18446744073709549293LLU) { NG(); } else { ; } } void f104(void) { int16_t x534 = 3; volatile int16_t x535 = 1; int16_t x536 = 220; int32_t t104 = -1610566; t104 = ((x533!=x534)-(x535*x536)); if (t104 != -219) { NG(); } else { ; } } void f105(void) { static volatile uint8_t x537 = 0U; volatile uint32_t x538 = 3U; uint32_t x539 = UINT32_MAX; volatile uint64_t t105 = 7397222815836778738LLU; t105 = ((x537!=x538)-(x539*x540)); if (t105 != 4294967296LLU) { NG(); } else { ; } } void f106(void) { static int16_t x541 = INT16_MIN; int8_t x543 = INT8_MIN; int8_t x544 = -1; volatile int32_t t106 = 939; t106 = ((x541!=x542)-(x543*x544)); if (t106 != -127) { NG(); } else { ; } } void f107(void) { int64_t x549 = -1LL; int16_t x551 = 893; static uint64_t t107 = 31691889092708LLU; t107 = ((x549!=x550)-(x551*x552)); if (t107 != 18446743622208028287LLU) { NG(); } else { ; } } void f108(void) { static int32_t x553 = INT32_MIN; volatile int16_t x554 = INT16_MIN; int64_t x555 = 2013783964LL; int32_t x556 = INT32_MAX; int64_t t108 = -315507LL; t108 = ((x553!=x554)-(x555*x556)); if (t108 != -4324568131280836707LL) { NG(); } else { ; } } void f109(void) { int16_t x557 = 54; volatile uint64_t x559 = 8510907159973610164LLU; volatile int8_t x560 = INT8_MIN; static uint64_t t109 = 4647080315162735237LLU; t109 = ((x557!=x558)-(x559*x560)); if (t109 != 1038216127758555649LLU) { NG(); } else { ; } } void f110(void) { volatile int8_t x561 = -1; int64_t x562 = -1LL; int8_t x564 = -4; volatile uint32_t t110 = 55U; t110 = ((x561!=x562)-(x563*x564)); if (t110 != 8U) { NG(); } else { ; } } void f111(void) { int16_t x573 = -74; int32_t x574 = -4441414; int8_t x575 = INT8_MIN; volatile uint64_t t111 = 87134039137LLU; t111 = ((x573!=x574)-(x575*x576)); if (t111 != 18446744073709551489LLU) { NG(); } else { ; } } void f112(void) { int64_t x581 = 104LL; uint8_t x582 = 74U; uint64_t x584 = UINT64_MAX; volatile uint64_t t112 = 18575211117156897LLU; t112 = ((x581!=x582)-(x583*x584)); if (t112 != 400LLU) { NG(); } else { ; } } void f113(void) { int32_t x586 = INT32_MAX; int16_t x588 = 1; int64_t t113 = 121030LL; t113 = ((x585!=x586)-(x587*x588)); if (t113 != -9223372036854775806LL) { NG(); } else { ; } } void f114(void) { static int8_t x589 = INT8_MAX; int64_t x591 = -1LL; static volatile uint64_t x592 = 310305516470098LLU; volatile uint64_t t114 = 78LLU; t114 = ((x589!=x590)-(x591*x592)); if (t114 != 310305516470099LLU) { NG(); } else { ; } } void f115(void) { int32_t x593 = 37241; int32_t x595 = -2345169; int8_t x596 = INT8_MAX; int32_t t115 = 62865818; t115 = ((x593!=x594)-(x595*x596)); if (t115 != 297836464) { NG(); } else { ; } } void f116(void) { volatile int8_t x597 = INT8_MIN; volatile int16_t x598 = INT16_MIN; volatile uint8_t x599 = 49U; int64_t x600 = -85LL; int64_t t116 = 350809754LL; t116 = ((x597!=x598)-(x599*x600)); if (t116 != 4166LL) { NG(); } else { ; } } void f117(void) { static int8_t x605 = INT8_MIN; static int64_t x606 = INT64_MAX; int64_t x608 = INT64_MIN; static volatile uint64_t t117 = 46297058735522849LLU; t117 = ((x605!=x606)-(x607*x608)); if (t117 != 9223372036854775809LLU) { NG(); } else { ; } } void f118(void) { uint8_t x609 = 26U; static uint32_t x610 = 646547U; uint8_t x611 = 105U; int32_t x612 = -3111; static volatile int32_t t118 = -348788; t118 = ((x609!=x610)-(x611*x612)); if (t118 != 326656) { NG(); } else { ; } } void f119(void) { int32_t x613 = 0; int64_t x614 = INT64_MIN; int32_t x615 = -1; int64_t x616 = -23168554211LL; static int64_t t119 = -171LL; t119 = ((x613!=x614)-(x615*x616)); if (t119 != -23168554210LL) { NG(); } else { ; } } void f120(void) { volatile int64_t x621 = -1LL; int16_t x622 = INT16_MIN; static int32_t x623 = -1; static volatile uint64_t t120 = 15384038LLU; t120 = ((x621!=x622)-(x623*x624)); if (t120 != 0LLU) { NG(); } else { ; } } void f121(void) { uint16_t x633 = UINT16_MAX; int8_t x634 = INT8_MIN; uint16_t x635 = 1U; int32_t x636 = INT32_MAX; int32_t t121 = -92839461; t121 = ((x633!=x634)-(x635*x636)); if (t121 != -2147483646) { NG(); } else { ; } } void f122(void) { uint64_t x641 = 1376260214968782LLU; volatile int8_t x643 = -1; volatile uint64_t x644 = 131930686550LLU; uint64_t t122 = 98329533291004LLU; t122 = ((x641!=x642)-(x643*x644)); if (t122 != 131930686551LLU) { NG(); } else { ; } } void f123(void) { int64_t x646 = INT64_MIN; static int8_t x647 = INT8_MAX; int8_t x648 = INT8_MIN; static int32_t t123 = 4132; t123 = ((x645!=x646)-(x647*x648)); if (t123 != 16257) { NG(); } else { ; } } void f124(void) { volatile int16_t x649 = -4022; int32_t x650 = INT32_MIN; uint32_t x651 = 26194U; int32_t x652 = -1; uint32_t t124 = 7010846U; t124 = ((x649!=x650)-(x651*x652)); if (t124 != 26195U) { NG(); } else { ; } } void f125(void) { int64_t x653 = INT64_MIN; static volatile int8_t x654 = INT8_MIN; int32_t x655 = 1; static volatile int64_t x656 = 16LL; static int64_t t125 = -2127738510012237LL; t125 = ((x653!=x654)-(x655*x656)); if (t125 != -15LL) { NG(); } else { ; } } void f126(void) { int8_t x657 = -2; uint64_t x658 = UINT64_MAX; uint64_t x660 = 8LLU; t126 = ((x657!=x658)-(x659*x660)); if (t126 != 9LLU) { NG(); } else { ; } } void f127(void) { static uint16_t x661 = 9U; int8_t x662 = INT8_MIN; volatile uint32_t x664 = 2009U; uint32_t t127 = 600346561U; t127 = ((x661!=x662)-(x663*x664)); if (t127 != 65830913U) { NG(); } else { ; } } void f128(void) { int32_t x669 = -642730; volatile int64_t x670 = 75LL; int64_t x672 = -1856LL; int64_t t128 = -1582830LL; t128 = ((x669!=x670)-(x671*x672)); if (t128 != -1588735LL) { NG(); } else { ; } } void f129(void) { uint64_t x675 = 13LLU; static int32_t x676 = INT32_MIN; static uint64_t t129 = 311239LLU; t129 = ((x673!=x674)-(x675*x676)); if (t129 != 27917287425LLU) { NG(); } else { ; } } void f130(void) { volatile int8_t x677 = -7; volatile int8_t x678 = -1; int8_t x679 = INT8_MIN; int16_t x680 = -1; int32_t t130 = -252982856; t130 = ((x677!=x678)-(x679*x680)); if (t130 != -127) { NG(); } else { ; } } void f131(void) { int64_t x685 = 4890LL; int8_t x686 = INT8_MAX; int16_t x687 = 869; volatile uint64_t x688 = UINT64_MAX; volatile uint64_t t131 = 1474935LLU; t131 = ((x685!=x686)-(x687*x688)); if (t131 != 870LLU) { NG(); } else { ; } } void f132(void) { int32_t x689 = -1; int16_t x690 = INT16_MIN; uint16_t x691 = 0U; int64_t x692 = INT64_MAX; volatile int64_t t132 = -53200LL; t132 = ((x689!=x690)-(x691*x692)); if (t132 != 1LL) { NG(); } else { ; } } void f133(void) { volatile int64_t x694 = 385679611128325949LL; static volatile int8_t x695 = INT8_MAX; volatile int32_t t133 = 6998; t133 = ((x693!=x694)-(x695*x696)); if (t133 != 255) { NG(); } else { ; } } void f134(void) { static int16_t x697 = -1; int32_t x699 = INT32_MIN; static volatile uint64_t x700 = 254505LLU; t134 = ((x697!=x698)-(x699*x700)); if (t134 != 546545325834241LLU) { NG(); } else { ; } } void f135(void) { volatile int16_t x702 = INT16_MIN; static uint16_t x703 = 2U; uint8_t x704 = 109U; static volatile int32_t t135 = 25; t135 = ((x701!=x702)-(x703*x704)); if (t135 != -217) { NG(); } else { ; } } void f136(void) { uint64_t x706 = 3311155571202419996LLU; volatile uint64_t x707 = UINT64_MAX; int16_t x708 = INT16_MIN; uint64_t t136 = 564229342LLU; t136 = ((x705!=x706)-(x707*x708)); if (t136 != 18446744073709518849LLU) { NG(); } else { ; } } void f137(void) { static volatile int8_t x712 = 1; volatile uint32_t t137 = 220599U; t137 = ((x709!=x710)-(x711*x712)); if (t137 != 4294958066U) { NG(); } else { ; } } void f138(void) { uint32_t x713 = UINT32_MAX; int16_t x714 = INT16_MIN; volatile uint8_t x716 = 14U; int32_t t138 = 0; t138 = ((x713!=x714)-(x715*x716)); if (t138 != 458753) { NG(); } else { ; } } void f139(void) { int64_t x721 = -106381409LL; int16_t x723 = INT16_MIN; static volatile uint64_t t139 = 24005202368LLU; t139 = ((x721!=x722)-(x723*x724)); if (t139 != 11798394089025765377LLU) { NG(); } else { ; } } void f140(void) { static int32_t x725 = -454; static int16_t x726 = INT16_MIN; uint32_t x727 = UINT32_MAX; int64_t x728 = -1LL; t140 = ((x725!=x726)-(x727*x728)); if (t140 != 4294967296LL) { NG(); } else { ; } } void f141(void) { int64_t x729 = -1LL; int32_t x730 = INT32_MIN; int16_t x732 = 461; volatile int32_t t141 = 6054701; t141 = ((x729!=x730)-(x731*x732)); if (t141 != 2306) { NG(); } else { ; } } void f142(void) { uint16_t x739 = 5315U; volatile int32_t t142 = -153; t142 = ((x737!=x738)-(x739*x740)); if (t142 != -1355324) { NG(); } else { ; } } void f143(void) { uint64_t x741 = 2085LLU; uint32_t x743 = UINT32_MAX; static uint64_t x744 = UINT64_MAX; t143 = ((x741!=x742)-(x743*x744)); if (t143 != 4294967296LLU) { NG(); } else { ; } } void f144(void) { uint16_t x749 = 102U; uint16_t x750 = 40U; volatile int8_t x751 = 3; int16_t x752 = -1; int32_t t144 = 47926; t144 = ((x749!=x750)-(x751*x752)); if (t144 != 4) { NG(); } else { ; } } void f145(void) { int8_t x754 = -1; static uint64_t x755 = 454593LLU; int16_t x756 = 1; static volatile uint64_t t145 = 16283592648LLU; t145 = ((x753!=x754)-(x755*x756)); if (t145 != 18446744073709097024LLU) { NG(); } else { ; } } void f146(void) { uint32_t x760 = 949936U; volatile uint32_t t146 = 9U; t146 = ((x757!=x758)-(x759*x760)); if (t146 != 1062731777U) { NG(); } else { ; } } void f147(void) { uint32_t x761 = UINT32_MAX; int64_t x762 = INT64_MIN; uint32_t x763 = UINT32_MAX; int32_t x764 = 235340; volatile uint32_t t147 = 183U; t147 = ((x761!=x762)-(x763*x764)); if (t147 != 235341U) { NG(); } else { ; } } void f148(void) { uint16_t x765 = 0U; uint16_t x766 = 0U; static int8_t x767 = -15; uint64_t t148 = 7364961826LLU; t148 = ((x765!=x766)-(x767*x768)); if (t148 != 45LLU) { NG(); } else { ; } } void f149(void) { volatile int32_t x769 = 443890610; static int16_t x770 = INT16_MIN; int32_t x771 = -18; uint64_t x772 = 183024576601LLU; t149 = ((x769!=x770)-(x771*x772)); if (t149 != 3294442378819LLU) { NG(); } else { ; } } void f150(void) { uint32_t x773 = 1362392752U; static int32_t x774 = INT32_MAX; static int16_t x776 = -1; volatile uint64_t t150 = 297384LLU; t150 = ((x773!=x774)-(x775*x776)); if (t150 != 68549211119029024LLU) { NG(); } else { ; } } void f151(void) { static int16_t x781 = INT16_MIN; static int8_t x782 = 45; static uint16_t x784 = 319U; int32_t t151 = -63; t151 = ((x781!=x782)-(x783*x784)); if (t151 != 320) { NG(); } else { ; } } void f152(void) { int16_t x785 = INT16_MIN; static volatile int8_t x786 = INT8_MIN; uint16_t x788 = UINT16_MAX; uint32_t t152 = 31U; t152 = ((x785!=x786)-(x787*x788)); if (t152 != 65536U) { NG(); } else { ; } } void f153(void) { static int64_t x790 = 66043010375044268LL; t153 = ((x789!=x790)-(x791*x792)); if (t153 != -3374) { NG(); } else { ; } } void f154(void) { volatile int64_t x794 = INT64_MIN; uint64_t x795 = 16798619799712LLU; int32_t x796 = -860946; t154 = ((x793!=x794)-(x795*x796)); if (t154 != 14462704522082847553LLU) { NG(); } else { ; } } void f155(void) { uint16_t x797 = UINT16_MAX; static volatile int32_t x798 = 65186; int8_t x799 = 0; int32_t x800 = 8170; volatile int32_t t155 = 224; t155 = ((x797!=x798)-(x799*x800)); if (t155 != 1) { NG(); } else { ; } } void f156(void) { int64_t x802 = -1LL; static int16_t x803 = -1; int32_t x804 = 875121; int32_t t156 = 51425538; t156 = ((x801!=x802)-(x803*x804)); if (t156 != 875122) { NG(); } else { ; } } void f157(void) { int64_t x805 = INT64_MAX; volatile uint32_t x806 = 28U; static uint16_t x807 = 2U; volatile uint64_t t157 = UINT64_MAX; t157 = ((x805!=x806)-(x807*x808)); if (t157 != UINT64_MAX) { NG(); } else { ; } } void f158(void) { volatile int32_t x809 = INT32_MIN; int16_t x811 = 17; volatile int32_t t158 = -3270170; t158 = ((x809!=x810)-(x811*x812)); if (t158 != 1) { NG(); } else { ; } } void f159(void) { static int32_t x813 = 1; volatile int16_t x814 = 12; int8_t x815 = INT8_MIN; static int8_t x816 = 1; static int32_t t159 = -2669; t159 = ((x813!=x814)-(x815*x816)); if (t159 != 129) { NG(); } else { ; } } void f160(void) { uint64_t t160 = 1555552366LLU; t160 = ((x817!=x818)-(x819*x820)); if (t160 != 18446744073709518849LLU) { NG(); } else { ; } } void f161(void) { int32_t x825 = -1; volatile int32_t x826 = -534; uint8_t x827 = UINT8_MAX; int8_t x828 = INT8_MIN; int32_t t161 = 0; t161 = ((x825!=x826)-(x827*x828)); if (t161 != 32641) { NG(); } else { ; } } void f162(void) { uint16_t x829 = 1434U; uint64_t x831 = 3277743703686820LLU; int8_t x832 = 0; volatile uint64_t t162 = 265197039141722145LLU; t162 = ((x829!=x830)-(x831*x832)); if (t162 != 1LLU) { NG(); } else { ; } } void f163(void) { int64_t x837 = INT64_MIN; int64_t x838 = -85LL; static int32_t x839 = -5653; static uint8_t x840 = 120U; static volatile int32_t t163 = -420; t163 = ((x837!=x838)-(x839*x840)); if (t163 != 678361) { NG(); } else { ; } } void f164(void) { int32_t x845 = INT32_MIN; int16_t x846 = -943; int8_t x848 = -1; int32_t t164 = 26166902; t164 = ((x845!=x846)-(x847*x848)); if (t164 != 203091) { NG(); } else { ; } } void f165(void) { volatile int32_t x853 = INT32_MIN; int8_t x854 = -7; static uint16_t x855 = UINT16_MAX; volatile uint64_t x856 = 17168282842768385LLU; t165 = ((x853!=x854)-(x855*x856)); if (t165 != 127972395456537602LLU) { NG(); } else { ; } } void f166(void) { volatile uint32_t x861 = UINT32_MAX; int64_t x862 = INT64_MIN; static uint8_t x863 = 122U; static volatile uint32_t t166 = 22698827U; t166 = ((x861!=x862)-(x863*x864)); if (t166 != 4225073619U) { NG(); } else { ; } } void f167(void) { static volatile int16_t x866 = INT16_MIN; static uint32_t x867 = 316331U; int32_t x868 = INT32_MIN; static uint32_t t167 = 1110506U; t167 = ((x865!=x866)-(x867*x868)); if (t167 != 2147483649U) { NG(); } else { ; } } void f168(void) { int8_t x869 = INT8_MIN; int8_t x870 = INT8_MIN; static int16_t x871 = INT16_MIN; int16_t x872 = -325; static int32_t t168 = -1036330356; t168 = ((x869!=x870)-(x871*x872)); if (t168 != -10649600) { NG(); } else { ; } } void f169(void) { int8_t x873 = -1; volatile int64_t x874 = INT64_MIN; int8_t x876 = INT8_MAX; volatile int64_t t169 = 363929348LL; t169 = ((x873!=x874)-(x875*x876)); if (t169 != 2288889259663022204LL) { NG(); } else { ; } } void f170(void) { uint32_t x881 = 168U; static volatile uint8_t x882 = 20U; t170 = ((x881!=x882)-(x883*x884)); if (t170 != 1U) { NG(); } else { ; } } void f171(void) { int16_t x885 = INT16_MIN; int16_t x886 = INT16_MIN; volatile int32_t x887 = 10; int16_t x888 = INT16_MIN; volatile int32_t t171 = -65494242; t171 = ((x885!=x886)-(x887*x888)); if (t171 != 327680) { NG(); } else { ; } } void f172(void) { int32_t x897 = INT32_MIN; static int8_t x898 = 2; uint32_t x899 = 19481975U; uint64_t x900 = 944603890031159751LLU; uint64_t t172 = 47435LLU; t172 = ((x897!=x898)-(x899*x900)); if (t172 != 17665348024554959232LLU) { NG(); } else { ; } } void f173(void) { uint32_t x901 = 2014121U; int32_t x903 = 51725; int8_t x904 = INT8_MIN; int32_t t173 = 109; t173 = ((x901!=x902)-(x903*x904)); if (t173 != 6620801) { NG(); } else { ; } } void f174(void) { volatile int64_t x905 = INT64_MAX; static volatile uint8_t x906 = 99U; int8_t x907 = INT8_MIN; int16_t x908 = 9795; t174 = ((x905!=x906)-(x907*x908)); if (t174 != 1253761) { NG(); } else { ; } } void f175(void) { static int8_t x909 = INT8_MAX; static volatile int32_t x910 = -118805168; int16_t x911 = -1; static volatile uint8_t x912 = 3U; volatile int32_t t175 = 5481; t175 = ((x909!=x910)-(x911*x912)); if (t175 != 4) { NG(); } else { ; } } void f176(void) { volatile int8_t x914 = 0; uint16_t x915 = 14U; static volatile uint32_t x916 = 11442765U; volatile uint32_t t176 = 1107U; t176 = ((x913!=x914)-(x915*x916)); if (t176 != 4134768587U) { NG(); } else { ; } } void f177(void) { int64_t x917 = INT64_MAX; static int64_t x918 = 110216259LL; static int32_t x919 = -2103449; int32_t t177 = -1; t177 = ((x917!=x918)-(x919*x920)); if (t177 != -269241471) { NG(); } else { ; } } void f178(void) { static int32_t x921 = -9439; uint32_t x922 = 23165U; uint64_t x923 = 1353LLU; static int64_t x924 = INT64_MAX; t178 = ((x921!=x922)-(x923*x924)); if (t178 != 9223372036854777162LLU) { NG(); } else { ; } } void f179(void) { static int64_t x930 = INT64_MIN; int16_t x932 = 0; volatile int32_t t179 = 538655359; t179 = ((x929!=x930)-(x931*x932)); if (t179 != 1) { NG(); } else { ; } } void f180(void) { volatile int64_t x933 = -1LL; volatile int8_t x934 = INT8_MAX; int16_t x935 = -1; int16_t x936 = INT16_MAX; volatile int32_t t180 = 16616; t180 = ((x933!=x934)-(x935*x936)); if (t180 != 32768) { NG(); } else { ; } } void f181(void) { int8_t x953 = -1; int64_t x955 = -1LL; int32_t x956 = -1; t181 = ((x953!=x954)-(x955*x956)); if (t181 != 0LL) { NG(); } else { ; } } void f182(void) { uint8_t x957 = 1U; int64_t x959 = -276002914LL; int16_t x960 = -1; volatile int64_t t182 = 24861097LL; t182 = ((x957!=x958)-(x959*x960)); if (t182 != -276002913LL) { NG(); } else { ; } } void f183(void) { static int16_t x962 = -1; uint64_t x963 = UINT64_MAX; t183 = ((x961!=x962)-(x963*x964)); if (t183 != 0LLU) { NG(); } else { ; } } void f184(void) { static int16_t x969 = 70; volatile int32_t x971 = INT32_MIN; uint32_t x972 = 1529158U; uint32_t t184 = 0U; t184 = ((x969!=x970)-(x971*x972)); if (t184 != 1U) { NG(); } else { ; } } void f185(void) { int16_t x973 = -1; volatile uint32_t x974 = UINT32_MAX; volatile uint8_t x975 = 32U; int16_t x976 = INT16_MIN; static int32_t t185 = 622; t185 = ((x973!=x974)-(x975*x976)); if (t185 != 1048576) { NG(); } else { ; } } void f186(void) { volatile int32_t x977 = -1; uint8_t x978 = 1U; uint8_t x979 = UINT8_MAX; volatile int32_t t186 = 154; t186 = ((x977!=x978)-(x979*x980)); if (t186 != 256) { NG(); } else { ; } } void f187(void) { volatile int8_t x981 = INT8_MAX; static volatile int32_t x982 = INT32_MAX; volatile uint64_t x983 = UINT64_MAX; uint8_t x984 = 1U; static volatile uint64_t t187 = 0LLU; t187 = ((x981!=x982)-(x983*x984)); if (t187 != 2LLU) { NG(); } else { ; } } void f188(void) { uint8_t x993 = 23U; int32_t x994 = INT32_MAX; volatile int32_t x995 = INT32_MAX; volatile uint16_t x996 = 1U; int32_t t188 = 16; t188 = ((x993!=x994)-(x995*x996)); if (t188 != -2147483646) { NG(); } else { ; } } void f189(void) { static volatile uint64_t x997 = UINT64_MAX; uint8_t x998 = 13U; uint16_t x999 = 475U; int16_t x1000 = -16; int32_t t189 = 64353; t189 = ((x997!=x998)-(x999*x1000)); if (t189 != 7601) { NG(); } else { ; } } void f190(void) { static volatile int32_t x1001 = -1; int64_t x1002 = INT64_MIN; volatile uint32_t t190 = 52289U; t190 = ((x1001!=x1002)-(x1003*x1004)); if (t190 != 0U) { NG(); } else { ; } } void f191(void) { uint16_t x1005 = UINT16_MAX; static int32_t x1006 = INT32_MIN; volatile int64_t x1007 = INT64_MIN; uint64_t x1008 = 89574LLU; t191 = ((x1005!=x1006)-(x1007*x1008)); if (t191 != 1LLU) { NG(); } else { ; } } void f192(void) { int16_t x1013 = INT16_MIN; volatile uint8_t x1014 = UINT8_MAX; static volatile int16_t x1015 = INT16_MIN; volatile int8_t x1016 = INT8_MIN; static volatile int32_t t192 = -66314; t192 = ((x1013!=x1014)-(x1015*x1016)); if (t192 != -4194303) { NG(); } else { ; } } void f193(void) { static int8_t x1022 = -1; int32_t x1023 = -1; int8_t x1024 = -4; int32_t t193 = 10370313; t193 = ((x1021!=x1022)-(x1023*x1024)); if (t193 != -3) { NG(); } else { ; } } void f194(void) { int64_t x1025 = -1LL; volatile uint8_t x1026 = 66U; uint16_t x1028 = 14U; int32_t t194 = -11; t194 = ((x1025!=x1026)-(x1027*x1028)); if (t194 != 15) { NG(); } else { ; } } void f195(void) { volatile uint64_t x1045 = UINT64_MAX; volatile int32_t x1047 = INT32_MIN; int32_t t195 = -1; t195 = ((x1045!=x1046)-(x1047*x1048)); if (t195 != 1) { NG(); } else { ; } } void f196(void) { volatile uint64_t x1055 = 2465641753981502148LLU; int16_t x1056 = 5307; uint64_t t196 = 92306139062LLU; t196 = ((x1053!=x1054)-(x1055*x1056)); if (t196 != 12027503953949747925LLU) { NG(); } else { ; } } void f197(void) { int16_t x1057 = INT16_MAX; int16_t x1058 = -3; volatile int64_t t197 = 12747344184LL; t197 = ((x1057!=x1058)-(x1059*x1060)); if (t197 != -127LL) { NG(); } else { ; } } void f198(void) { int16_t x1061 = -14427; volatile uint32_t x1062 = 840268U; uint8_t x1063 = 1U; volatile uint64_t t198 = 245788LLU; t198 = ((x1061!=x1062)-(x1063*x1064)); if (t198 != 18446621483997197311LLU) { NG(); } else { ; } } void f199(void) { volatile int16_t x1065 = INT16_MIN; static volatile int16_t x1066 = INT16_MIN; static int32_t x1067 = INT32_MAX; static uint32_t x1068 = 23235U; static volatile uint32_t t199 = 0U; t199 = ((x1065!=x1066)-(x1067*x1068)); if (t199 != 2147506883U) { NG(); } else { ; } } int main(void) { f0(); f1(); f2(); f3(); f4(); f5(); f6(); f7(); f8(); f9(); f10(); f11(); f12(); f13(); f14(); f15(); f16(); f17(); f18(); f19(); f20(); f21(); f22(); f23(); f24(); f25(); f26(); f27(); f28(); f29(); f30(); f31(); f32(); f33(); f34(); f35(); f36(); f37(); f38(); f39(); f40(); f41(); f42(); f43(); f44(); f45(); f46(); f47(); f48(); f49(); f50(); f51(); f52(); f53(); f54(); f55(); f56(); f57(); f58(); f59(); f60(); f61(); f62(); f63(); f64(); f65(); f66(); f67(); f68(); f69(); f70(); f71(); f72(); f73(); f74(); f75(); f76(); f77(); f78(); f79(); f80(); f81(); f82(); f83(); f84(); f85(); f86(); f87(); f88(); f89(); f90(); f91(); f92(); f93(); f94(); f95(); f96(); f97(); f98(); f99(); f100(); f101(); f102(); f103(); f104(); f105(); f106(); f107(); f108(); f109(); f110(); f111(); f112(); f113(); f114(); f115(); f116(); f117(); f118(); f119(); f120(); f121(); f122(); f123(); f124(); f125(); f126(); f127(); f128(); f129(); f130(); f131(); f132(); f133(); f134(); f135(); f136(); f137(); f138(); f139(); f140(); f141(); f142(); f143(); f144(); f145(); f146(); f147(); f148(); f149(); f150(); f151(); f152(); f153(); f154(); f155(); f156(); f157(); f158(); f159(); f160(); f161(); f162(); f163(); f164(); f165(); f166(); f167(); f168(); f169(); f170(); f171(); f172(); f173(); f174(); f175(); f176(); f177(); f178(); f179(); f180(); f181(); f182(); f183(); f184(); f185(); f186(); f187(); f188(); f189(); f190(); f191(); f192(); f193(); f194(); f195(); f196(); f197(); f198(); f199(); return 0; }
19.267705
61
0.598783
6b09758a364ff7d24589ed17a168113899ec2b55
2,423
c
C
d/tharis/newtharis/cavern.c
Dbevan/SunderingShadows
6c15ec56cef43c36361899bae6dc08d0ee907304
[ "MIT" ]
13
2019-07-19T05:24:44.000Z
2021-11-18T04:08:19.000Z
d/tharis/newtharis/cavern.c
Dbevan/SunderingShadows
6c15ec56cef43c36361899bae6dc08d0ee907304
[ "MIT" ]
4
2021-03-15T18:56:39.000Z
2021-08-17T17:08:22.000Z
d/tharis/newtharis/cavern.c
Dbevan/SunderingShadows
6c15ec56cef43c36361899bae6dc08d0ee907304
[ "MIT" ]
13
2019-09-12T06:22:38.000Z
2022-01-31T01:15:12.000Z
//cavern.c #include <std.h> inherit ROOM; int flag; object room; void create(){ ::create(); set_terrain(BUILT_TUNNEL); set_travel(SLICK_FLOOR); set_property("no sticks", 1); set_property("light",1); set_property("indoors",1); set_property("no teleport",1); set("short","The large cavern far below Tharis"); set("long", @OLI %^BOLD%^%^YELLOW%^A huge cavern far below Tharis%^RESET%^ This cavern is huge. In this dim light you can barely see the ends. A very wet environment, this cave has maybe 2 feet of mud covering the floor. You can see items protruding from the mud. You realize that this room has collected the goods tossed away by the people of Tharis for the ages that the city has stood here. The high roof has what looks like a trapped door in it. Possibly where things would get dumped from sewers above. OLI ); set_exits(([ "tunnel":"/d/tharis/Tharis/sewer28" ])); set_invis_exits(({"tunnel"})); set_pre_exit_functions(({"tunnel"}),({"no_tunnel"})); flag = 0; set_items(([ "mud":"This mud is about 2 feet deep. You wonder what the years"+ " have hidden in the mud.", "trap door":"Simply a trapped door from which drops things from above down." ])); set_smell("default","The odors of decomposition gag you."); set_listen("default","You hear the squoosh squoosh around you."); set_search("default",(:TO,"exits":)); set_search("mud",(:TO,"muds":)); } int no_tunnel(){ if(!flag) write("You cannot go that way."); return flag; } void exits(){ if(flag) return; write("%^BOLD%^You manage to find a tunnel leading upward!"); tell_room(TO,"%^BOLD%^"+TPQCN+" finds a tunnel leading upwards!",TP); remove_invis_exit("tunnel"); flag = 1; return; } void reset(){ ::reset(); if(!present("behir")) new("/d/tharis/monsters/behir")->move(TO); flag = 0; set_invis_exits(({"tunnel"})); } void muds(){ object *inven; int i; if(!room) room = new("/d/tharis/Tharis/mud"); tell_room(TO,"%^BOLD%^"+TPQCN+" starts slogging through the mud looking for things!",TP); write("%^BOLD%^You start slogging through the mud searching for things!"); inven = all_inventory(room); i = sizeof(inven); if(i){ i = random(i); write("%^BOLD%^You manage to find a "+inven[i]->query_name()+"!"); tell_room(TO,"%^BOLD%^"+TPQCN+" manages to find something!",TP); inven[i]->move(TO); return; } write("You find nothing odd"); return; }
26.626374
91
0.667767
6b157e966448e50c2bd5c737b0f8159c28919660
1,239
h
C
plugins/robots/generators/generatorBase/include/generatorBase/simpleGenerators/randomIdGenerator.h
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
1
2017-04-17T03:11:55.000Z
2017-04-17T03:11:55.000Z
plugins/robots/generators/generatorBase/include/generatorBase/simpleGenerators/randomIdGenerator.h
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
null
null
null
plugins/robots/generators/generatorBase/include/generatorBase/simpleGenerators/randomIdGenerator.h
anastasia143/qreal
9bd224b41e569c9c50ab88848a5746a010c65ad7
[ "Apache-2.0" ]
null
null
null
/* Copyright 2015 CyberTech Labs Ltd. * * 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 "generatorBase/simpleGenerators/abstractSimpleGenerator.h" #include "generatorBase/robotsGeneratorDeclSpec.h" namespace generatorBase { namespace simple { /// Replaces all @@RANDOM_ID@@ occurences to random c++ identifier string. /// Chains some other simple generator processing its output and proxying it. /// Gives ownership on itself to the given generator class ROBOTS_GENERATOR_EXPORT RandomIdGenerator : public AbstractSimpleGenerator { public: explicit RandomIdGenerator(AbstractSimpleGenerator *otherGenerator); QString generate() override; private: AbstractSimpleGenerator &mOtherGenerator; }; } }
31.769231
80
0.778047
e5b1e11a014e5f352b59a27a247ae18965701959
732
h
C
NumGrind/SymbolicGraph/SymbolicTensorNode.h
Daiver/NumGrind
b5875034ec0debba7594191d6e818676543e5cf6
[ "MIT" ]
3
2016-09-28T19:34:33.000Z
2019-10-23T03:02:11.000Z
NumGrind/SymbolicGraph/SymbolicTensorNode.h
Daiver/NumGrind
b5875034ec0debba7594191d6e818676543e5cf6
[ "MIT" ]
null
null
null
NumGrind/SymbolicGraph/SymbolicTensorNode.h
Daiver/NumGrind
b5875034ec0debba7594191d6e818676543e5cf6
[ "MIT" ]
null
null
null
#ifndef NUMGRIND_SYMBOLICTENSORNODE_H #define NUMGRIND_SYMBOLICTENSORNODE_H #include "SymbolicGraphNode.h" #include "CompGraph/CGTensorOutput.h" namespace NumGrind { namespace SymbolicGraph { class SymbolicTensorNode : public SymbolicGraphNode { public: SymbolicTensorNode(SymbolicGraphManagerAbstract *manager, CompGraph::CGTensorOutput *graphNode); virtual ~SymbolicTensorNode() override; const Eigen::MatrixXf &value() const { return this->mGraphNode->value(); } CompGraph::CGTensorOutput *node() { return this->mGraphNode; } protected: CompGraph::CGTensorOutput *mGraphNode; }; } } #endif //NUMGRIND_SYMBOLICTENSORNODE_H
28.153846
108
0.698087
4c13d4a771774b3b17bc1f3b8247ba7a5e8ed9ed
8,646
c
C
kernel/src/mig/migcom.c
Prajna/mach
9c2e1a8d77f84256568f604f74311f23ccce2d9e
[ "BSD-4-Clause", "BSD-3-Clause" ]
27
2015-03-06T06:47:58.000Z
2021-11-06T02:01:26.000Z
kernel/src/mig/migcom.c
Prajna/mach
9c2e1a8d77f84256568f604f74311f23ccce2d9e
[ "BSD-4-Clause", "BSD-3-Clause" ]
null
null
null
kernel/src/mig/migcom.c
Prajna/mach
9c2e1a8d77f84256568f604f74311f23ccce2d9e
[ "BSD-4-Clause", "BSD-3-Clause" ]
11
2015-08-16T02:07:39.000Z
2020-06-02T17:42:14.000Z
/* * Mach Operating System * Copyright (c) 1993,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ /* * HISTORY * $Log: migcom.c,v $ * Revision 2.3 93/05/10 17:49:23 rvb * Fix include to use < vs " for new ode shadowing * [93/05/10 10:28:09 rvb] * * Revision 2.2 93/02/04 13:26:42 mrt * renamed from mig.c * * * Revision 2.7 93/01/14 17:58:20 danner * Converted file to ANSI C. * [92/12/08 pds] * * Revision 2.6 91/08/28 11:17:04 jsb * Removed TrapRoutine support. * [91/08/12 rpd] * * Revision 2.5 91/06/25 10:31:32 rpd * Added ServerHeaderFileName and -sheader. * [91/05/22 rpd] * * Revision 2.4 91/02/05 17:55:02 mrt * Changed to new Mach copyright * [91/02/01 17:54:42 mrt] * * Revision 2.3 90/06/19 23:01:01 rpd * Added prefix argument to -i option. * Replaced GenIndividualUser with UserFilePrefix. * [90/06/03 rpd] * * Revision 2.2 90/06/02 15:04:59 rpd * Created for new IPC. * [90/03/26 21:11:47 rpd] * * 07-Apr-89 Richard Draves (rpd) at Carnegie-Mellon University * Extensive revamping. Added polymorphic arguments. * Allow multiple variable-sized inline arguments in messages. * * 8-Feb-89 David Golub (dbg) at Carnegie-Mellon University * Added -user, -server, and -header switches to name output files. * Added -i switch to write individual files for user routines. * * 17-Aug-87 Bennet Yee (bsy) at Carnegie-Mellon University * Added -s,-S switches for generating a SymTab * * 3-Aug-87 Mary Thompson (mrt) at Carnegie-Mellon University * Removed -t,-T switch as code is now the same for * multi and single threaded use. * * 28-May-87 Richard Draves (rpd) at Carnegie-Mellon University * Created. */ /* * Switches are; * -[v,Q] verbose or not quiet: prints out type * and routine information as mig runs. * -[V,q] not verbose or quiet : don't print * information during compilation * (this is the default) * -[r,R] do or don't use rpc calls instead of * send/receive pairs. Default is -r. * -[s,S] generate symbol table or not: generate a * table of rpc-name, number, routine triplets * as an external data structure -- main use is * for protection system's specification of rights * and for protection dispatch code. Default is -s. * -i <prefix> * Put each user routine in its own file. The * file is named <prefix><routine-name>.c. * -user <name> * Name the user-side file <name> * -server <name> * Name the server-side file <name> * -header <name> * Name the user-side header file <name> * -iheader <name> * Name the user-side internal header file <name> * -sheader <name> * NAme the server-side header file <name> * * DESIGN: * Mig uses a lexxer module created by lex from lexxer.l and * a parser module created by yacc from parser.y to parse an * interface definitions module for a mach server. * The parser module calls routines in statement.c * and routines.c to build a list of statement structures. * The most interesting statements are the routine definitions * which contain information about the name, type, characteristics * of the routine, an argument list containing information for * each argument type, and a list of special arguments. The * argument type structures are build by routines in type.c * Once parsing is completed, the three code generation modules: * header.c user.c and server.c are called sequentially. These * do some code generation directly and also call the routines * in utils.c for common (parameterized) code generation. * */ #include <stdio.h> #include <error.h> #include <lexxer.h> #include <global.h> #include <write.h> extern int yyparse(); static FILE *myfopen(const char *name, const char *mode); static void parseArgs(int argc, char **argv) { while (--argc > 0) if ((++argv)[0][0] == '-') { switch (argv[0][1]) { case 'q': BeQuiet = TRUE; break; case 'Q': BeQuiet = FALSE; break; case 'v': BeVerbose = TRUE; break; case 'V': BeVerbose = FALSE; break; case 'r': UseMsgRPC = TRUE; break; case 'R': UseMsgRPC = FALSE; break; case 's': if (streql(argv[0], "-server")) { --argc; ++argv; if (argc == 0) fatal("missing name for -server option"); ServerFileName = strmake(argv[0]); } else if (streql(argv[0], "-sheader")) { --argc; ++argv; if (argc == 0) fatal ("missing name for -sheader option"); ServerHeaderFileName = strmake(argv[0]); } else GenSymTab = TRUE; break; case 'S': GenSymTab = FALSE; break; case 'i': if (streql(argv[0], "-iheader")) { --argc; ++argv; if (argc == 0) fatal("missing name for -iheader option"); InternalHeaderFileName = strmake(argv[0]); } else { --argc; ++argv; if (argc == 0) fatal("missing prefix for -i option"); UserFilePrefix = strmake(argv[0]); } break; case 'u': if (streql(argv[0], "-user")) { --argc; ++argv; if (argc == 0) fatal("missing name for -user option"); UserFileName = strmake(argv[0]); } else fatal("unknown flag: '%s'", argv[0]); break; case 'h': if (streql(argv[0], "-header")) { --argc; ++argv; if (argc == 0) fatal("missing name for -header option"); UserHeaderFileName = strmake(argv[0]); } else fatal("unknown flag: '%s'", argv[0]); break; default: fatal("unknown flag: '%s'", argv[0]); /*NOTREACHED*/ } } else fatal("bad argument: '%s'", *argv); } void main(int argc, char **argv) { FILE *uheader, *server, *user; FILE *iheader, *sheader; set_program_name("mig"); parseArgs(argc, argv); init_global(); init_type(); LookNormal(); (void) yyparse(); if (errors > 0) exit(1); more_global(); uheader = myfopen(UserHeaderFileName, "w"); if (!UserFilePrefix) user = myfopen(UserFileName, "w"); server = myfopen(ServerFileName, "w"); if (ServerHeaderFileName) sheader = myfopen(ServerHeaderFileName, "w"); if (IsKernelServer) { iheader = myfopen(InternalHeaderFileName, "w"); } if (BeVerbose) { printf("Writing %s ... ", UserHeaderFileName); fflush(stdout); } WriteUserHeader(uheader, StatementList); fclose(uheader); if (ServerHeaderFileName) { if (BeVerbose) { printf ("done.\nWriting %s ...", ServerHeaderFileName); fflush (stdout); } WriteServerHeader(sheader, StatementList); fclose(sheader); } if (IsKernelServer) { if (BeVerbose) { printf("done.\nWriting %s ... ", InternalHeaderFileName); fflush(stdout); } WriteInternalHeader(iheader, StatementList); fclose(iheader); } if (UserFilePrefix) { if (BeVerbose) { printf("done.\nWriting individual user files ... "); fflush(stdout); } WriteUserIndividual(StatementList); } else { if (BeVerbose) { printf("done.\nWriting %s ... ", UserFileName); fflush(stdout); } WriteUser(user, StatementList); fclose(user); } if (BeVerbose) { printf("done.\nWriting %s ... ", ServerFileName); fflush(stdout); } WriteServer(server, StatementList); fclose(server); if (BeVerbose) printf("done.\n"); exit(0); } static FILE * myfopen(const char *name, const char *mode) { const char *realname; FILE *file; if (name == strNULL) realname = "/dev/null"; else realname = name; file = fopen(realname, mode); if (file == NULL) fatal("fopen(%s): %s", realname, unix_error_string(errno)); return file; }
25.732143
75
0.636711
4938b216d801819cbf5bf7487a9d9b7b87850774
19,846
c
C
Outputs/tim.c
gaschmidt1/MiscLibrary
1d08305580e1388f997c9fb7be36843c21fc8057
[ "MIT" ]
1
2021-02-28T16:10:32.000Z
2021-02-28T16:10:32.000Z
Projetos/M16F/6572-Firmware-P1261-Modulo_16F_para_plataforma/Core/Src/tim.c
gaschmidt1/MiscLibrary
1d08305580e1388f997c9fb7be36843c21fc8057
[ "MIT" ]
null
null
null
Projetos/M16F/6572-Firmware-P1261-Modulo_16F_para_plataforma/Core/Src/tim.c
gaschmidt1/MiscLibrary
1d08305580e1388f997c9fb7be36843c21fc8057
[ "MIT" ]
1
2021-02-28T16:10:32.000Z
2021-02-28T16:10:32.000Z
/** ****************************************************************************** * File Name : TIM.c * Description : This file provides code for the configuration * of the TIM instances. ****************************************************************************** ** This notice applies to any and all portions of this file * that are not between comment pairs USER CODE BEGIN and * USER CODE END. Other portions of this file, whether * inserted by the user or by software development tools * are owned by their respective copyright owners. * * COPYRIGHT(c) 2019 STMicroelectronics * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. Neither the name of STMicroelectronics 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. * ****************************************************************************** */ /* Includes ------------------------------------------------------------------*/ #include "tim.h" /* USER CODE BEGIN 0 */ #include "VN5025.h" void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) { if(htim == &htim6) { osSignalSet (vn5025TaskId, 0x01); } } uint16_t CalculatePulse(uint8_t duty_cycle); #define PWM_PERIOD 1000 /* USER CODE END 0 */ TIM_HandleTypeDef htim1; TIM_HandleTypeDef htim2; TIM_HandleTypeDef htim3; TIM_HandleTypeDef htim15; TIM_HandleTypeDef htim16; TIM_HandleTypeDef htim17; TIM_HandleTypeDef htim6; /* TIM1 init function */ void MX_TIM1_Init(void) { TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim1.Instance = TIM1; htim1.Init.Prescaler = 48-1; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim1.Init.Period = PWM_PERIOD-1; htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim1.Init.RepetitionCounter = 0; htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_PWM_Init(&htim1) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK) { Error_Handler(); } sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; sBreakDeadTimeConfig.DeadTime = 0; sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; if (HAL_TIMEx_ConfigBreakDeadTime(&htim1, &sBreakDeadTimeConfig) != HAL_OK) { Error_Handler(); } } ///* TIM2 init function */ void MX_TIM2_Init(void) { TIM_MasterConfigTypeDef sMasterConfig = {0}; // TIM_OC_InitTypeDef sConfigOC = {0}; htim2.Instance = TIM2; htim2.Init.Prescaler = 48-1; htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = PWM_PERIOD-1; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_PWM_Init(&htim2) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig) != HAL_OK) { Error_Handler(); } } ///* TIM3 init function */ void MX_TIM3_Init(void) { TIM_MasterConfigTypeDef sMasterConfig = {0}; // TIM_OC_InitTypeDef sConfigOC = {0}; htim3.Instance = TIM3; htim3.Init.Prescaler = 48-1; htim3.Init.CounterMode = TIM_COUNTERMODE_UP; htim3.Init.Period = PWM_PERIOD-1; htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_PWM_Init(&htim3) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK) { Error_Handler(); } } ///* TIM15 init function */ void MX_TIM15_Init(void) { TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim15.Instance = TIM15; htim15.Init.Prescaler = 48-1; htim15.Init.CounterMode = TIM_COUNTERMODE_UP; htim15.Init.Period = PWM_PERIOD-1; htim15.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim15.Init.RepetitionCounter = 0; htim15.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_PWM_Init(&htim15) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim15, &sMasterConfig) != HAL_OK) { Error_Handler(); } sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; sBreakDeadTimeConfig.DeadTime = 0; sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; if (HAL_TIMEx_ConfigBreakDeadTime(&htim15, &sBreakDeadTimeConfig) != HAL_OK) { Error_Handler(); } } /* TIM6 init function */ void MX_TIM6_Init(void) { TIM_MasterConfigTypeDef sMasterConfig = {0}; htim6.Instance = TIM6; htim6.Init.Prescaler = 96; htim6.Init.CounterMode = TIM_COUNTERMODE_UP; htim6.Init.Period = 50000; htim6.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim6) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim6, &sMasterConfig) != HAL_OK) { Error_Handler(); } } ///* TIM16 init function */ void MX_TIM16_Init(void) { // TIM_OC_InitTypeDef sConfigOC = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim16.Instance = TIM16; htim16.Init.Prescaler = 48-1; htim16.Init.CounterMode = TIM_COUNTERMODE_UP; htim16.Init.Period = PWM_PERIOD-1; htim16.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim16.Init.RepetitionCounter = 0; htim16.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim16) != HAL_OK) { Error_Handler(); } if (HAL_TIM_PWM_Init(&htim16) != HAL_OK) { Error_Handler(); } sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; sBreakDeadTimeConfig.DeadTime = 0; sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; if (HAL_TIMEx_ConfigBreakDeadTime(&htim16, &sBreakDeadTimeConfig) != HAL_OK) { Error_Handler(); } } /* TIM17 init function */ void MX_TIM17_Init(void) { TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim17.Instance = TIM17; htim17.Init.Prescaler = 48-1; htim17.Init.CounterMode = TIM_COUNTERMODE_UP; htim17.Init.Period = PWM_PERIOD-1; htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim17.Init.RepetitionCounter = 0; htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim17) != HAL_OK) { Error_Handler(); } if (HAL_TIM_PWM_Init(&htim17) != HAL_OK) { Error_Handler(); } sBreakDeadTimeConfig.OffStateRunMode = TIM_OSSR_DISABLE; sBreakDeadTimeConfig.OffStateIDLEMode = TIM_OSSI_DISABLE; sBreakDeadTimeConfig.LockLevel = TIM_LOCKLEVEL_OFF; sBreakDeadTimeConfig.DeadTime = 0; sBreakDeadTimeConfig.BreakState = TIM_BREAK_DISABLE; sBreakDeadTimeConfig.BreakPolarity = TIM_BREAKPOLARITY_HIGH; sBreakDeadTimeConfig.AutomaticOutput = TIM_AUTOMATICOUTPUT_DISABLE; if (HAL_TIMEx_ConfigBreakDeadTime(&htim17, &sBreakDeadTimeConfig) != HAL_OK) { Error_Handler(); } } void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* tim_pwmHandle) { if(tim_pwmHandle->Instance==TIM1) { /* USER CODE BEGIN TIM1_MspInit 0 */ /* USER CODE END TIM1_MspInit 0 */ /* TIM1 clock enable */ __HAL_RCC_TIM1_CLK_ENABLE(); /* USER CODE BEGIN TIM1_MspInit 1 */ /* USER CODE END TIM1_MspInit 1 */ } else if(tim_pwmHandle->Instance==TIM2) { /* USER CODE BEGIN TIM2_MspInit 0 */ /* USER CODE END TIM2_MspInit 0 */ /* TIM2 clock enable */ __HAL_RCC_TIM2_CLK_ENABLE(); /* USER CODE BEGIN TIM2_MspInit 1 */ /* USER CODE END TIM2_MspInit 1 */ } else if(tim_pwmHandle->Instance==TIM3) { /* USER CODE BEGIN TIM3_MspInit 0 */ /* USER CODE END TIM3_MspInit 0 */ /* TIM3 clock enable */ __HAL_RCC_TIM3_CLK_ENABLE(); /* USER CODE BEGIN TIM3_MspInit 1 */ /* USER CODE END TIM3_MspInit 1 */ } // if(tim_baseHandle->Instance==TIM6) // { // /* USER CODE BEGIN TIM6_MspInit 0 */ // // /* USER CODE END TIM6_MspInit 0 */ // /* TIM6 clock enable */ // __HAL_RCC_TIM6_CLK_ENABLE(); // /* USER CODE BEGIN TIM6_MspInit 1 */ // // /* USER CODE END TIM6_MspInit 1 */ // } else if(tim_pwmHandle->Instance==TIM15) { /* USER CODE BEGIN TIM15_MspInit 0 */ /* USER CODE END TIM15_MspInit 0 */ /* TIM15 clock enable */ __HAL_RCC_TIM15_CLK_ENABLE(); /* USER CODE BEGIN TIM15_MspInit 1 */ /* USER CODE END TIM15_MspInit 1 */ } } void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle) { if(tim_baseHandle->Instance==TIM16) { /* USER CODE BEGIN TIM16_MspInit 0 */ /* USER CODE END TIM16_MspInit 0 */ /* TIM16 clock enable */ __HAL_RCC_TIM16_CLK_ENABLE(); /* USER CODE BEGIN TIM16_MspInit 1 */ /* USER CODE END TIM16_MspInit 1 */ } else if(tim_baseHandle->Instance==TIM17) { /* USER CODE BEGIN TIM17_MspInit 0 */ /* USER CODE END TIM17_MspInit 0 */ /* TIM17 clock enable */ __HAL_RCC_TIM17_CLK_ENABLE(); /* USER CODE BEGIN TIM17_MspInit 1 */ /* USER CODE END TIM17_MspInit 1 */ } else if(tim_baseHandle->Instance==TIM6) { /* USER CODE BEGIN TIM6_MspInit 0 */ /* USER CODE END TIM6_MspInit 0 */ /* TIM6 clock enable */ __HAL_RCC_TIM6_CLK_ENABLE(); /* USER CODE BEGIN TIM6_MspInit 1 */ HAL_NVIC_SetPriority(TIM6_DAC_IRQn, 0, 0); HAL_NVIC_EnableIRQ(TIM6_DAC_IRQn); /* USER CODE END TIM6_MspInit 1 */ } } void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* tim_pwmHandle) { if(tim_pwmHandle->Instance==TIM1) { /* USER CODE BEGIN TIM1_MspDeInit 0 */ /* USER CODE END TIM1_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM1_CLK_DISABLE(); /* USER CODE BEGIN TIM1_MspDeInit 1 */ /* USER CODE END TIM1_MspDeInit 1 */ } if(tim_pwmHandle->Instance==TIM2) { /* USER CODE BEGIN TIM1_MspDeInit 0 */ /* USER CODE END TIM1_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM2_CLK_DISABLE(); /* USER CODE BEGIN TIM1_MspDeInit 1 */ /* USER CODE END TIM1_MspDeInit 1 */ } else if(tim_pwmHandle->Instance==TIM2) { /* USER CODE BEGIN TIM2_MspDeInit 0 */ /* USER CODE END TIM2_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM2_CLK_DISABLE(); /* USER CODE BEGIN TIM2_MspDeInit 1 */ /* USER CODE END TIM2_MspDeInit 1 */ } else if(tim_pwmHandle->Instance==TIM3) { /* USER CODE BEGIN TIM3_MspDeInit 0 */ /* USER CODE END TIM3_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM3_CLK_DISABLE(); /* USER CODE BEGIN TIM3_MspDeInit 1 */ /* USER CODE END TIM3_MspDeInit 1 */ } else if(tim_pwmHandle->Instance==TIM15) { /* USER CODE BEGIN TIM15_MspDeInit 0 */ /* USER CODE END TIM15_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM15_CLK_DISABLE(); /* USER CODE BEGIN TIM15_MspDeInit 1 */ /* USER CODE END TIM15_MspDeInit 1 */ } } void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle) { if(tim_baseHandle->Instance==TIM16) { /* USER CODE BEGIN TIM16_MspDeInit 0 */ /* USER CODE END TIM16_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM16_CLK_DISABLE(); /* USER CODE BEGIN TIM16_MspDeInit 1 */ /* USER CODE END TIM16_MspDeInit 1 */ } else if(tim_baseHandle->Instance==TIM17) { /* USER CODE BEGIN TIM17_MspDeInit 0 */ /* USER CODE END TIM17_MspDeInit 0 */ /* Peripheral clock disable */ __HAL_RCC_TIM17_CLK_DISABLE(); /* USER CODE BEGIN TIM17_MspDeInit 1 */ /* USER CODE END TIM17_MspDeInit 1 */ } } /* USER CODE BEGIN 1 */ void TIM_Init_Output_PWM(GPIO_TypeDef *GPIOx,uint32_t pin) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(GPIOx == GPIOC &&(pin == GPIO_PIN_7 || pin == GPIO_PIN_8 || pin ==GPIO_PIN_9 )) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF0_TIM3; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOA &&(pin == GPIO_PIN_8 || pin == GPIO_PIN_9 || pin ==GPIO_PIN_10 ||pin == GPIO_PIN_11 ) ) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF2_TIM1; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOA &&(pin == GPIO_PIN_15 ) ) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF2_TIM2; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_4)) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF1_TIM3; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_3 ||pin == GPIO_PIN_10 ||pin == GPIO_PIN_11 )) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF2_TIM2; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_14 || pin == GPIO_PIN_15)) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF1_TIM15; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOE &&(pin == GPIO_PIN_0)) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF0_TIM16; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } else if(GPIOx ==GPIOE &&(pin == GPIO_PIN_1)) { GPIO_InitStruct.Pin = pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; GPIO_InitStruct.Alternate = GPIO_AF0_TIM17; HAL_GPIO_Init(GPIOx, &GPIO_InitStruct); } } TIM_HandleTypeDef * TIM_Get_Handler(GPIO_TypeDef *GPIOx,uint32_t pin) { if(GPIOx == GPIOC &&(pin == GPIO_PIN_7 || pin == GPIO_PIN_8 || pin ==GPIO_PIN_9 )) { return &htim3; } else if(GPIOx ==GPIOA &&(pin == GPIO_PIN_8 || pin == GPIO_PIN_9 || pin ==GPIO_PIN_10 ||pin == GPIO_PIN_11 ) ) { return &htim1; } else if(GPIOx ==GPIOA &&(pin == GPIO_PIN_15 ) ) { return &htim2; } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_3 ||pin == GPIO_PIN_10 ||pin == GPIO_PIN_11 )) { return &htim2; } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_4)) { return &htim3; } else if(GPIOx ==GPIOB &&(pin == GPIO_PIN_14 || pin == GPIO_PIN_15)) { return &htim15; } else if(GPIOx ==GPIOE &&(pin == GPIO_PIN_0)) { return &htim16; } else if(GPIOx ==GPIOE &&(pin == GPIO_PIN_1)) { return &htim17; } return 0; } uint32_t TIM_Get_Channel(GPIO_TypeDef *GPIOx,uint32_t pin) { if(GPIOx == GPIOC ) { if(pin == GPIO_PIN_7) { return TIM_CHANNEL_2; } else if(pin == GPIO_PIN_8) { return TIM_CHANNEL_3; } else if(pin == GPIO_PIN_9) { return TIM_CHANNEL_4; } } else if(GPIOx ==GPIOA ) { if(pin == GPIO_PIN_8) { return TIM_CHANNEL_1; } else if(pin == GPIO_PIN_9) { return TIM_CHANNEL_2; } else if(pin == GPIO_PIN_10) { return TIM_CHANNEL_3; } else if(pin == GPIO_PIN_11) { return TIM_CHANNEL_4; } else if(pin == GPIO_PIN_15) { return TIM_CHANNEL_1; } } else if(GPIOx ==GPIOB ) { if(pin == GPIO_PIN_4 || pin == GPIO_PIN_14) { return TIM_CHANNEL_1; } else if(pin == GPIO_PIN_3|| pin == GPIO_PIN_15) { return TIM_CHANNEL_2; } else if(pin == GPIO_PIN_10) { return TIM_CHANNEL_3; } else if(pin == GPIO_PIN_11) { return TIM_CHANNEL_4; } } else if(GPIOx ==GPIOE) { return TIM_CHANNEL_1; } return 0; } void TIM_Config_Channel(TIM_HandleTypeDef *htim, uint32_t channel) { TIM_OC_InitTypeDef sConfigOC = {0}; sConfigOC.OCMode = TIM_OCMODE_PWM1; sConfigOC.Pulse = 0; sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH; sConfigOC.OCNPolarity = TIM_OCNPOLARITY_HIGH; sConfigOC.OCFastMode = TIM_OCFAST_DISABLE; sConfigOC.OCIdleState = TIM_OCIDLESTATE_RESET; sConfigOC.OCNIdleState = TIM_OCNIDLESTATE_RESET; if (HAL_TIM_PWM_ConfigChannel(htim, &sConfigOC, channel) != HAL_OK) { Error_Handler(); } } void TIM_Start_Base(TIM_HandleTypeDef *htim) { HAL_TIM_Base_Start_IT(htim); } void TIM_Start_PWM(TIM_HandleTypeDef *htim, uint32_t channel) { HAL_TIM_PWM_Start(htim,channel); } void TIM_Change_Duty_Cycle(TIM_HandleTypeDef *htim, uint32_t channel, uint8_t duty_cycle) { uint16_t calculated_pulse = 0; calculated_pulse = CalculatePulse(duty_cycle); if(calculated_pulse < 1) { calculated_pulse = 0; } __HAL_TIM_SET_COMPARE(htim,channel,calculated_pulse); } uint16_t CalculatePulse(uint8_t duty_cycle) { if(duty_cycle > 0 && duty_cycle <= 100) { return(((PWM_PERIOD + 1)*duty_cycle)/100); } else { return (0); } } /* USER CODE END 1 */ /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
28.391989
110
0.707599
f49fbd090a4d61a7287fb7fba1a8fce2271c9d0c
169
h
C
c2go/include/pthread_arch.h
goplus/libc
98134563aa95a5f511080119fa473c543b74fce5
[ "Apache-2.0", "MIT" ]
2
2022-03-31T05:46:57.000Z
2022-03-31T07:13:13.000Z
c2go/include/pthread_arch.h
goplus/libc
98134563aa95a5f511080119fa473c543b74fce5
[ "Apache-2.0", "MIT" ]
null
null
null
c2go/include/pthread_arch.h
goplus/libc
98134563aa95a5f511080119fa473c543b74fce5
[ "Apache-2.0", "MIT" ]
null
null
null
#ifndef _C2GO_PTHREAD_ARCH_H #define _C2GO_PTHREAD_ARCH_H // uintptr_t __get_tp(); // // #define TLS_ABOVE_TP // #define GAP_ABOVE_TP 8 // #define MC_PC arm_pc #endif
15.363636
28
0.757396
716cfd228db01ebe7c33f525e41ad7b5782f81db
1,560
h
C
NAS2D/Resource/AnimationSet.h
lairworks/nas2d-core
c70b00acb5fcc88f91fe89e34bac049002cb86e0
[ "Zlib" ]
13
2017-03-23T06:11:30.000Z
2021-09-15T16:22:56.000Z
NAS2D/Resource/AnimationSet.h
lairworks/nas2d-core
c70b00acb5fcc88f91fe89e34bac049002cb86e0
[ "Zlib" ]
467
2016-06-28T22:47:06.000Z
2022-02-08T18:08:12.000Z
NAS2D/Resource/AnimationSet.h
lairworks/nas2d-core
c70b00acb5fcc88f91fe89e34bac049002cb86e0
[ "Zlib" ]
8
2015-10-12T21:36:10.000Z
2021-06-24T07:46:31.000Z
// ================================================================================== // = NAS2D // = Copyright © 2008 - 2020 New Age Software // ================================================================================== // = NAS2D is distributed under the terms of the zlib license. You are free to copy, // = modify and distribute the software under the terms of the zlib license. // = // = Acknowledgment of your use of NAS2D is appreciated but is not required. // ================================================================================== #pragma once #include "Image.h" #include "../Math/Vector.h" #include "../Math/Rectangle.h" #include <map> #include <vector> #include <string> namespace NAS2D { template <typename Resource, typename ... Params> class ResourceCache; class AnimationSet { public: struct Frame { const Image& image; Rectangle<int> bounds; Vector<int> anchorOffset; unsigned int frameDelay; bool isStopFrame() const; }; using ImageSheetMap = std::map<std::string, std::string>; using ActionsMap = std::map<std::string, std::vector<Frame>>; AnimationSet(std::string fileName); AnimationSet(std::string fileName, ResourceCache<Image, std::string>& imageCache); AnimationSet(std::string fileName, ImageSheetMap imageSheetMap, ActionsMap actions); std::vector<std::string> actionNames() const; const std::vector<Frame>& frames(const std::string& actionName) const; private: std::string mFileName; ImageSheetMap mImageSheetMap; ActionsMap mActions; }; } // namespace
26.896552
86
0.598718
14edec998c38c70b67e7fcdf62c8e70779786679
2,381
h
C
src/qt/qtwebkit/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h
viewdy/phantomjs
eddb0db1d253fd0c546060a4555554c8ee08c13c
[ "BSD-3-Clause" ]
1
2015-05-27T13:52:20.000Z
2015-05-27T13:52:20.000Z
src/qt/qtwebkit/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtwebkit/Source/WebKit2/WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
1
2022-02-18T10:41:38.000Z
2022-02-18T10:41:38.000Z
/* * Copyright (C) 2012 Igalia S.L. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2,1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #ifndef WebKitSoupCookieJarSqlite_h #define WebKitSoupCookieJarSqlite_h #include <libsoup/soup.h> #include <wtf/text/WTFString.h> G_BEGIN_DECLS #define WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE (webkit_soup_cookie_jar_sqlite_get_type()) #define WEBKIT_SOUP_COOKIE_JAR_SQLITE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE, WebKitSoupCookieJarSqlite)) #define WEBKIT_IS_SOUP_COOKIE_JAR_SQLITE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE)) #define WEBKIT_SOUP_COOKIE_JAR_SQLITE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE, WebKitSoupCookieJarSqliteClass)) #define WEBKIT_IS_SOUP_COOKIE_JAR_SQLITE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE)) #define WEBKIT_SOUP_COOKIE_JAR_SQLITE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WEBKIT_TYPE_SOUP_COOKIE_JAR_SQLITE, WebKitSoupCookieJarSqliteClass)) typedef struct _WebKitSoupCookieJarSqlite WebKitSoupCookieJarSqlite; typedef struct _WebKitSoupCookieJarSqliteClass WebKitSoupCookieJarSqliteClass; typedef struct _WebKitSoupCookieJarSqlitePrivate WebKitSoupCookieJarSqlitePrivate; struct _WebKitSoupCookieJarSqlite { SoupCookieJar parent; WebKitSoupCookieJarSqlitePrivate* priv; }; struct _WebKitSoupCookieJarSqliteClass { SoupCookieJarClass parentClass; }; GType webkit_soup_cookie_jar_sqlite_get_type(); SoupCookieJar* webkitSoupCookieJarSqliteNew(const String& databasePath); G_END_DECLS #endif // WebKitSoupCookieJarSqlite.h
43.290909
157
0.815204
f6607a386d581958c91bc0279bbcec71c6c21a96
18,124
c
C
Protocol/Commands.c
AAS-WT/Pulse_Generation
01df72fe9e91de4b1721cc8072b74a179bbd9733
[ "MIT" ]
null
null
null
Protocol/Commands.c
AAS-WT/Pulse_Generation
01df72fe9e91de4b1721cc8072b74a179bbd9733
[ "MIT" ]
null
null
null
Protocol/Commands.c
AAS-WT/Pulse_Generation
01df72fe9e91de4b1721cc8072b74a179bbd9733
[ "MIT" ]
null
null
null
/*! * \file Commands.c * * \brief Application functions for working with the device * * \author Anosov Anton */ #include "Commands.h" extern Fifo_t UartTx; volatile bool IsDiscretInit, IsStateQuantity, IsStartMeasurement; extern volatile FlashMapData_t GlobalStorage; extern volatile uint32_t CounterSemaphore[]; extern volatile uint32_t CounterStateSemaphore[]; //extern volatile uint64_t UserQuantityStateLine[]; /*! * \brief Application function command "Help" */ void CommandHelp(void) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"reset - command reset board\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"en_channel - command enable discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"dis_channel - command disable discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"set_pulse - command set pulse (0 to 100 %%) discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"set_period - command set period (in ms) discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"start - command start testing discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"stop - command stop testing discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"check_impulse - command check quantity impulse discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"reset_impulse - command reset quantity impulse discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"set_impulse - command set quantity impulse discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"check_param - command check param's discret channel's\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Reset board" */ void CommandResetBoard(void) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Board was reset!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); FlashWriteStorage(); UartSend(); HAL_Delay(1000); NVIC_SystemReset(); } /*! * \brief Application function command "Enable channel" */ void CommandEnableChannel(uint8_t channel) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { GlobalStorage.DiscretLine[channel].IsDiscretLineEnable = 1; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d enable!\n", channel); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) GlobalStorage.DiscretLine[NumberLine].IsDiscretLineEnable = 1; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel's enable!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } FlashWriteStorage(); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Disable channel" */ void CommandDisableChannel(uint8_t channel) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { GlobalStorage.DiscretLine[channel].IsDiscretLineEnable = 0; DiscretsWriteLines(channel, GPIO_PIN_SET); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d disable!\n", channel); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { GlobalStorage.DiscretLine[NumberLine].IsDiscretLineEnable = 0; DiscretsWriteLines(NumberLine, GPIO_PIN_SET); } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel's disable!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } FlashWriteStorage(); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Start measurement" */ void CommandStartMeasurement(void) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { CounterSemaphore[NumberLine] = 0; CounterStateSemaphore[NumberLine] = 0; } HAL_TIM_Base_Start_IT(&htim2); HAL_TIM_Base_Start_IT(&htim4); IsStartMeasurement = true; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Start measurement!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Stop measurement" */ void CommandStopMeasurement(void) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; HAL_TIM_Base_Stop_IT(&htim2); HAL_TIM_Base_Stop_IT(&htim4); for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { DiscretsWriteLines(NumberLine, GPIO_PIN_SET); CounterSemaphore[NumberLine] = 0; CounterStateSemaphore[NumberLine] = 0; } IsStartMeasurement = false; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Measurement stop!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Set pulse channel" */ void CommandSetPulseChannel(uint8_t channel, uint8_t pulse) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(pulse > 100) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error set pulse! Range 0 to 100 %%\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { CounterSemaphore[channel] = 0; CounterStateSemaphore[channel] = 0; GlobalStorage.DiscretLine[channel].OutPulseDiscret = pulse; GlobalStorage.DiscretLine[channel].DelayStep1 = GlobalStorage.DiscretLine[channel].OutPeriodDiscret* GlobalStorage.DiscretLine[channel].OutPulseDiscret/100; GlobalStorage.DiscretLine[channel].DelayStep0 = GlobalStorage.DiscretLine[channel].OutPeriodDiscret - GlobalStorage.DiscretLine[channel].DelayStep1; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d set pulse %d%%\n", channel, pulse); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { CounterSemaphore[NumberLine] = 0; CounterStateSemaphore[NumberLine] = 0; GlobalStorage.DiscretLine[NumberLine].OutPulseDiscret = pulse; GlobalStorage.DiscretLine[NumberLine].DelayStep1 = GlobalStorage.DiscretLine[NumberLine].OutPeriodDiscret* GlobalStorage.DiscretLine[NumberLine].OutPulseDiscret/100; GlobalStorage.DiscretLine[NumberLine].DelayStep0 = GlobalStorage.DiscretLine[NumberLine].OutPeriodDiscret - GlobalStorage.DiscretLine[NumberLine].DelayStep1; } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel's set pulse %d%%\n", pulse); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } FlashWriteStorage(); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Set period channel" */ void CommandSetPeriodChannel(uint8_t channel, uint32_t period) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { CounterSemaphore[channel] = 0; CounterStateSemaphore[channel] = 0; GlobalStorage.DiscretLine[channel].OutPeriodDiscret = period; GlobalStorage.DiscretLine[channel].DelayStep1 = period*GlobalStorage.DiscretLine[channel].OutPulseDiscret/100; GlobalStorage.DiscretLine[channel].DelayStep0 = period - GlobalStorage.DiscretLine[channel].DelayStep1; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d set period %d ms\n", channel, period); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { CounterSemaphore[NumberLine] = 0; CounterStateSemaphore[NumberLine] = 0; GlobalStorage.DiscretLine[NumberLine].OutPeriodDiscret = period; GlobalStorage.DiscretLine[NumberLine].DelayStep1 = period*GlobalStorage.DiscretLine[NumberLine].OutPulseDiscret/100; GlobalStorage.DiscretLine[NumberLine].DelayStep0 = period - GlobalStorage.DiscretLine[NumberLine].DelayStep1; } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel's set period %d ms\n", period); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } FlashWriteStorage(); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Check impulse channel" */ void CommandCheckImpulseChannel(uint8_t channel) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d impulse %d\n", channel, CounterStateSemaphore[channel]); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { sprintf(TransmitBuffer,"Channel %d impulse %d\n", NumberLine, CounterStateSemaphore[NumberLine]); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Reset impulse channel" */ void CommandResetImpulseChannel(uint8_t channel) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { CounterStateSemaphore[channel] = 0; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d reset impulse!\n", channel); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) CounterStateSemaphore[NumberLine] = 0; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel's reset impulse!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Reset impulse channel" */ void CommandSetImpulseChannel(uint8_t channel, uint64_t quantity) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { CounterStateSemaphore[channel] = 0; GlobalStorage.DiscretLine[channel].QuantityStateLine = quantity; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d set quantity impulse %d\n", channel, quantity); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { CounterStateSemaphore[NumberLine] = 0; GlobalStorage.DiscretLine[NumberLine].QuantityStateLine = quantity; } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"All channel set quantity impulse %d\n", quantity); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } FlashWriteStorage(); IsStateQuantity = true; sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * Application function Check params */ void CommandCheckParams(uint8_t channel) { uint8_t TransmitBuffer[MAX_LENGHT_COMMAND]; if(channel > DISCRETS_OUTPUTS_PINS + 1) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Error channel! Range 0 to 16. All channel - 16!\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); return; } if(channel != NUMBER_DISCRETS_LINE_ALL) { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); sprintf(TransmitBuffer,"Channel %d enable(1)/disable(0) %d period %d pulse %d%% impulse %d\n", channel, GlobalStorage.DiscretLine[channel].IsDiscretLineEnable, GlobalStorage.DiscretLine[channel].OutPeriodDiscret, GlobalStorage.DiscretLine[channel].OutPulseDiscret, GlobalStorage.DiscretLine[channel].QuantityStateLine); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } else { sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); for(uint8_t NumberLine = 0; NumberLine < DISCRETS_OUTPUTS_PINS; NumberLine++) { sprintf(TransmitBuffer,"Channel %d enable(1)/disable(0) %d period %d pulse %d%% impulse %d\n", NumberLine, GlobalStorage.DiscretLine[NumberLine].IsDiscretLineEnable, GlobalStorage.DiscretLine[NumberLine].OutPeriodDiscret, GlobalStorage.DiscretLine[NumberLine].OutPulseDiscret, GlobalStorage.DiscretLine[NumberLine].QuantityStateLine); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); } } sprintf(TransmitBuffer,"\n"); FifoPutBuf(&UartTx, TransmitBuffer, strlen(TransmitBuffer)); UartSend(); } /*! * \brief Application function command "Start bounce" */ void CommandStartBounce(uint8_t channel) { }
34.26087
337
0.760152
517b3f00c22525bc20854444441822d0256a6c12
2,146
h
C
FPNetworking/Classes/FPAPIBaseManager.h
Xlff/FPNetworking
3bfe73ebad707b90e6aeef3d238a431ad806c1a9
[ "MIT" ]
null
null
null
FPNetworking/Classes/FPAPIBaseManager.h
Xlff/FPNetworking
3bfe73ebad707b90e6aeef3d238a431ad806c1a9
[ "MIT" ]
null
null
null
FPNetworking/Classes/FPAPIBaseManager.h
Xlff/FPNetworking
3bfe73ebad707b90e6aeef3d238a431ad806c1a9
[ "MIT" ]
null
null
null
// // FPAPIBaseManager.h // FPNetworking // // Created by Max xie on 2018/12/13. // Copyright © 2018 w!zzard. All rights reserved. // #import <Foundation/Foundation.h> #import "FPURLResponse.h" #import "FPNetworkingDefines.h" NS_ASSUME_NONNULL_BEGIN @interface FPAPIBaseManager : NSObject <NSCopying> // 输出 @property(nonatomic, weak) id<FPAPIManagerCallBackDelegate> _Nullable delegate; @property(nonatomic, weak) id<FPAPIManagerParamSource> _Nullable paramSource; @property(nonatomic, weak) id<FPAPIManagerValidator> _Nullable validator; @property(nonatomic, weak) NSObject<FPAPIManager> *_Nullable child; // 需要用到NSObject中的方法 /// 拦截器 @property(nonatomic, weak) id<FPAPIManagerInterceptor> _Nullable interceptor; // 缓存 @property(nonatomic, assign) FPAPIManagerCachePolicy cachePolicy; @property(nonatomic, assign) NSTimeInterval memoryCacheSecond; //默认 3 * 60 @property(nonatomic, assign) NSTimeInterval diskCacheSecond; // 3 * 60 @property(nonatomic, assign) BOOL shouldIgnoreCache; // 默认NO // response @property(nonatomic, strong) FPURLResponse *_Nullable response; @property(nonatomic, readonly) FPAPIManagerErrorType errorType; @property(nonatomic, copy,readonly) NSString *_Nullable errorMessage; - (NSInteger)loadData; + (NSInteger)loadDataWithParams:(NSDictionary *_Nullable)params success:(void(^_Nullable)(FPAPIBaseManager *_Nonnull apiManager))success fail:(void(^_Nullable)(FPAPIBaseManager *_Nonnull apiManager))fail; - (void)cancelAllRequests; - (void)cancelRequest:(NSInteger)requestId; - (id _Nullable)fetachDataWithReformer:(id <FPAPIManagerDataReformer> _Nullable)reformer; - (void)cleanData; @end // 拦截 @interface FPAPIBaseManager (InnerInterceptor) - (BOOL)beforePerformSuccessWithResponse:(FPURLResponse *_Nullable)response; - (void)afterPerformSuccessWithResponse:(FPURLResponse *_Nullable)response; - (BOOL)beforePerformFailWithResponse:(FPURLResponse *_Nullable)response; - (void)afterPerformFailWithResponse:(FPURLResponse *_Nullable)response; - (BOOL)shouldCallApiWithParams:(NSDictionary *_Nullable)params; - (void)afterCallingApiWithParams:(NSDictionary *_Nullable)params; @end NS_ASSUME_NONNULL_END
35.180328
204
0.805685
99d9c58af639100e0787cf13e5663ef03ffd108f
1,084
c
C
source/linked_list/push_new_node.c
CharlieBoyer/LibC
9dc02870e0492c6e52520761fc8662b46334cc77
[ "Unlicense" ]
null
null
null
source/linked_list/push_new_node.c
CharlieBoyer/LibC
9dc02870e0492c6e52520761fc8662b46334cc77
[ "Unlicense" ]
null
null
null
source/linked_list/push_new_node.c
CharlieBoyer/LibC
9dc02870e0492c6e52520761fc8662b46334cc77
[ "Unlicense" ]
null
null
null
/* ** EPITECH PROJECT, 2019 ** Personal Lib ** File description: ** Functions for adding new elements in a list */ #include <stdlib.h> #include "struct.h" int push_to_tail(linked_node_t *head, int new_node_value) { linked_node_t *current = head; /* Find the tail of the list*/ while (current->next != NULL) { current = current->next; } /* Add new node */ current->next = malloc(sizeof(linked_node_t)); if (current->next == NULL) { return (-1); } current->next->value = new_node_value; current->next->next = NULL; return (0); } int push_to_head(linked_node_t **head, int new_node_value) { /* Create new node */ linked_node_t * new_node; new_node = malloc(sizeof(linked_node_t)); if (new_node == NULL) { return (-1); } new_node->value = new_node_value; // Assign new node value new_node->next = *head; // head become *next of new_node, it is the second node *head = new_node; // Remove current head and replace it by our new node return (0); // Succesfull Push }
23.06383
62
0.625461
19fa45eacf8ea0dced1e0f9e3863e2c042511911
1,223
h
C
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVWindow.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
1
2019-02-15T02:16:35.000Z
2019-02-15T02:16:35.000Z
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVWindow.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
YLCleaner/Xcode-RuntimeHeaders/DocSetViewing/DVWindow.h
liyong03/YLCleaner
7453187a884c8e783bda1af82cbbb51655ec41c6
[ "MIT" ]
null
null
null
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import "NSWindow.h" @class WVPageFindWebView; @interface DVWindow : NSWindow { id _mainController; WVPageFindWebView *webView; BOOL _proxyWaitingForDragEvent; BOOL _proxyButtonWasDisabled; BOOL _firstResponderIsLocked; } @property(retain, nonatomic) WVPageFindWebView *webView; // @synthesize webView; @property(retain, nonatomic) id mainController; // @synthesize mainController=_mainController; - (void)PBX_nestRight:(id)arg1; - (void)PBX_nestLeft:(id)arg1; - (void)enterSelection:(id)arg1; - (void)findSelectionInFile:(id)arg1; - (void)findPrevious:(id)arg1; - (void)findNext:(id)arg1; - (void)showIncrementalFindBar:(id)arg1; - (void)magnifyWithEvent:(id)arg1; - (void)swipeWithEvent:(id)arg1; - (void)selectKeyViewFollowingView:(id)arg1; - (void)selectKeyViewPrecedingView:(id)arg1; - (void)activateFromWindowMenu:(id)arg1; - (void)activateFromDockMenu:(id)arg1; - (void)setFirstResponderIsLocked:(BOOL)arg1; - (BOOL)firstResponderIsLocked; - (void)sendEvent:(id)arg1; - (BOOL)makeFirstResponder:(id)arg1; - (BOOL)performKeyEquivalent:(id)arg1; @end
28.44186
94
0.74489
bfa2be30917c4b47b4c7cc982a5ce4dbbee0a60d
9,876
c
C
fortune/f-client.c
kgiusti/proton-tools
8897dabe7571dcf7244e7c233046041a815846d7
[ "Apache-2.0" ]
2
2016-01-29T15:55:42.000Z
2016-09-22T15:58:37.000Z
fortune/f-client.c
kgiusti/proton-tools
8897dabe7571dcf7244e7c233046041a815846d7
[ "Apache-2.0" ]
null
null
null
fortune/f-client.c
kgiusti/proton-tools
8897dabe7571dcf7244e7c233046041a815846d7
[ "Apache-2.0" ]
null
null
null
/* * 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 * * 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 "common.h" #include "proton/message.h" #include "proton/messenger.h" #include "proton/error.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <getopt.h> #include <uuid/uuid.h> typedef struct { const char *address; const char *gateway_addr; const char *new_fortune; int timeout; // milliseconds const char *reply_to; int send_bad_msg; unsigned int ttl; unsigned int retry; } Options_t; static void usage(int rc) { printf("Usage: f-client [OPTIONS] <f-server>\n" "Get the current fortune message from <f-server>\n" " -a <f-server> \tThe address of the fortune server [amqp://0.0.0.0]\n" " -s <message> \tSet the server's fortune message to \"<message>\"\n" " -g <gateway> \tGateway to use to reach <f-server>\n" " -r <address> \tUse <address> for reply-to\n" " -t # \tTimeout in seconds [5]\n" " -l <secs> \tTTL to set in message, 0 = no TTL [0]\n" " -R # \tMessage send retry limit [3]\n" " -V \tEnable debug logging\n" " -X \tSend a bad message (forces a failure response from f-server\n" ); exit(rc); } static void parse_options( int argc, char **argv, Options_t *opts ) { int c; opterr = 0; memset( opts, 0, sizeof(*opts) ); opts->timeout = 5; opts->retry = 3; while ((c = getopt(argc, argv, "a:s:g:t:r:l:R:VX")) != -1) { switch (c) { case 'a': opts->address = optarg; break; case 's': opts->new_fortune = optarg; break; case 'g': opts->gateway_addr = optarg; break; case 't': if (sscanf( optarg, "%d", &opts->timeout ) != 1) { fprintf(stderr, "Option -%c requires an integer argument.\n", optopt); usage(1); } break; case 'r': opts->reply_to = optarg; break; case 'l': if (sscanf( optarg, "%u", &opts->ttl ) != 1) { fprintf(stderr, "Option -%c requires an integer argument.\n", optopt); usage(1); } break; case 'R': if (sscanf( optarg, "%u", &opts->retry ) != 1) { fprintf(stderr, "Option -%c requires an integer argument.\n", optopt); usage(1); } break; case 'V': enable_logging(); break; case 'X': opts->send_bad_msg = 1; break; default: usage(1); } } if (!opts->address) opts->address = "amqp://0.0.0.0"; if (opts->timeout > 0) opts->timeout *= 1000; } static void process_reply( pn_messenger_t *messenger, pn_message_t *message) { int rc; pn_data_t *body = pn_message_body(message); pn_bytes_t m_type; pn_bytes_t m_command; pn_bytes_t m_value; pn_bytes_t m_status; bool duplicate = false; rc = pn_data_scan( body, "{.S.S.S.S}", &m_type, &m_command, &m_value, &m_status ); check( rc == 0, "Failed to decode response message" ); check(strncmp("response", m_type.start, m_type.size) == 0, "Unknown message type received"); if (strncmp("DUPLICATE", m_status.start, m_status.size) == 0) { LOG( "Server detected duplicate request!\n" ); duplicate = true; } else if (strncmp("OK", m_status.start, m_status.size)) { fprintf( stderr, "Request failed - error: %.*s\n", (int)m_status.size, m_status.start ); return; } fprintf( stdout, "Fortune%s: \"%.*s\"%s\n", strncmp("set", m_command.start, m_command.size) == 0 ? " set to" : "", (int)m_value.size, m_value.start, duplicate ? " (duplicate detected by server)" : "" ); } static pn_message_t *build_request_message(pn_message_t *message, const char *command, const char *to, const char *reply_to, const char *new_fortune, unsigned int ttl) { int rc; pn_message_set_address( message, to ); if (reply_to) { LOG("setting reply-to %s\n", reply_to); rc = pn_message_set_reply_to( message, reply_to ); check(rc == 0, "pn_message_set_reply_to() failed"); } pn_message_set_delivery_count( message, 0 ); if (ttl) pn_message_set_ttl( message, ttl * 1000 ); pn_data_t *body = pn_message_body(message); pn_data_clear( body ); rc = pn_data_fill( body, "{SSSSSS}", "type", "request", "command", command, "value", (new_fortune) ? new_fortune : "" ); check( rc == 0, "Failure to create request message" ); return message; } int main(int argc, char** argv) { Options_t opts; int rc; pn_message_t *response_msg = pn_message(); check( response_msg, "Failed to allocate a Message"); pn_message_t *request_msg = pn_message(); check( request_msg, "Failed to allocate a Message"); pn_messenger_t *messenger = pn_messenger( 0 ); check( messenger, "Failed to allocate a Messenger"); parse_options( argc, argv, &opts ); // no need to track outstanding messages pn_messenger_set_outgoing_window( messenger, 0 ); pn_messenger_set_incoming_window( messenger, 0 ); pn_messenger_set_timeout( messenger, opts.timeout ); if (opts.gateway_addr) { LOG( "routing all messages via %s\n", opts.gateway_addr ); rc = pn_messenger_route( messenger, "*", opts.gateway_addr ); check( rc == 0, "pn_messenger_route() failed" ); } pn_messenger_start(messenger); char *reply_to = NULL; if (opts.reply_to) { LOG("subscribing to %s for replies\n", opts.reply_to); pn_messenger_subscribe(messenger, opts.reply_to); reply_to = _strdup(opts.reply_to); check( reply_to, "Out of memory" ); #if 1 // need to 'fix' the reply-to for use in the message itself: // no '~' is allowed in that case char *tilde = strstr( reply_to, "://~" ); if (tilde) { tilde += 3; // overwrite '~' memmove( tilde, tilde + 1, strlen( tilde + 1 ) + 1 ); } #endif } // Create a request message // const char *command = opts.new_fortune ? "set" : "get"; build_request_message( request_msg, opts.send_bad_msg ? "bad-command" : command, opts.address, reply_to, opts.new_fortune, opts.ttl ); // set a unique identifier for this message, so remote can // de-duplicate when we re-transmit uuid_t uuid; uuid_generate(uuid); char uuid_str[37]; uuid_unparse_upper(uuid, uuid_str); pn_data_put_string( pn_message_id( request_msg ), pn_bytes( sizeof(uuid_str), uuid_str )); // set the correlation id so we can ensure the response matches // our request. (re-use uuid just 'cause it's easy!) pn_data_put_string( pn_message_correlation_id( request_msg ), pn_bytes( sizeof(uuid_str), uuid_str )); int send_count = 0; bool done = false; // keep re-transmitting until something arrives do { LOG("sending request message...\n"); rc = pn_messenger_put( messenger, request_msg ); check(rc == 0, "pn_messenger_put() failed"); send_count++; if (opts.retry) opts.retry--; LOG("waiting for response...\n"); rc = pn_messenger_recv( messenger, -1 ); if (rc == PN_TIMEOUT) { LOG( "Timed-out waiting for a response, retransmitting...\n" ); pn_message_set_delivery_count( request_msg, send_count ); } else { check(rc == 0, "pn_messenger_recv() failed\n"); while (pn_messenger_incoming( messenger ) > 0) { rc = pn_messenger_get( messenger, response_msg ); check(rc == 0, "pn_messenger_get() failed"); LOG("response received!\n"); // validate the correlation id pn_bytes_t cid = pn_data_get_string( pn_message_correlation_id( response_msg ) ); if (cid.size == 0 || strncmp( uuid_str, cid.start, cid.size )) { LOG( "Correlation Id mismatch! Ignoring this response!\n" ); } else { process_reply( messenger, response_msg ); done = true; } } } } while (!done && opts.retry); if (!done) { fprintf( stderr, "Retries exhausted, no response received from server!\n" ); } rc = pn_messenger_stop(messenger); check(rc == 0, "pn_messenger_stop() failed"); pn_messenger_free(messenger); pn_message_free( response_msg ); pn_message_free( request_msg ); if (reply_to) free(reply_to); return 0; }
34.055172
97
0.574018
6881299df3f230b72dec67adf46aba26d0cb1f5e
6,216
h
C
Saturn/src/Saturn/Vulkan/VulkanDebug.h
BEASTSM96/Sparky-Engine
234afce5572a1b0240cb8b59d0b25a9259c5572a
[ "MIT" ]
null
null
null
Saturn/src/Saturn/Vulkan/VulkanDebug.h
BEASTSM96/Sparky-Engine
234afce5572a1b0240cb8b59d0b25a9259c5572a
[ "MIT" ]
3
2020-08-14T17:09:06.000Z
2020-08-14T17:10:10.000Z
Saturn/src/Saturn/Vulkan/VulkanDebug.h
BEASTSM96/Sparky-Engine
234afce5572a1b0240cb8b59d0b25a9259c5572a
[ "MIT" ]
null
null
null
/******************************************************************************************** * * * * * * * MIT License * * * * Copyright (c) 2020 - 2022 BEAST * * * * 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. * ********************************************************************************************* */ #pragma once #include "VulkanContext.h" namespace Saturn { inline void SetDebugUtilsObjectName( VkDebugUtilsObjectNameInfoEXT* pInfo ) { PFN_vkSetDebugUtilsObjectNameEXT Function = ( PFN_vkSetDebugUtilsObjectNameEXT )vkGetInstanceProcAddr( VulkanContext::Get().GetInstance(), "vkSetDebugUtilsObjectNameEXT" ); if ( Function ) { Function( VulkanContext::Get().GetDevice(), pInfo ); } } inline void SetDebugUtilsObjectName( std::string Name, uint64_t Handle, VkObjectType ObjectType ) { PFN_vkSetDebugUtilsObjectNameEXT Function = ( PFN_vkSetDebugUtilsObjectNameEXT )vkGetInstanceProcAddr( VulkanContext::Get().GetInstance(), "vkSetDebugUtilsObjectNameEXT" ); VkDebugUtilsObjectNameInfoEXT Info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT }; Info.objectHandle = ( uint64_t )Handle; Info.objectType = ObjectType; Info.pObjectName = Name.c_str(); if( Function ) { Function( VulkanContext::Get().GetDevice(), &Info ); } } inline void SetDebugUtilsObjectName( const char* pName, uint64_t Handle, VkObjectType ObjectType ) { PFN_vkSetDebugUtilsObjectNameEXT Function = ( PFN_vkSetDebugUtilsObjectNameEXT )vkGetInstanceProcAddr( VulkanContext::Get().GetInstance(), "vkSetDebugUtilsObjectNameEXT" ); VkDebugUtilsObjectNameInfoEXT Info ={ VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT }; Info.objectHandle = ( uint64_t )Handle; Info.objectType = ObjectType; Info.pObjectName = pName; if( Function ) { Function( VulkanContext::Get().GetDevice(), &Info ); } } inline void SetDebugUtilsObjectTag( VkDebugUtilsObjectTagInfoEXT* pInfo ) { PFN_vkSetDebugUtilsObjectTagEXT Function = ( PFN_vkSetDebugUtilsObjectTagEXT )vkGetInstanceProcAddr( VulkanContext::Get().GetInstance(), "vkSetDebugUtilsObjectTagEXT" ); if( Function ) { Function( VulkanContext::Get().GetDevice(), pInfo ); } } inline void SetDebugUtilsObjectTag( uint64_t Tag, uint64_t Handle, VkObjectType ObjectType ) { PFN_vkSetDebugUtilsObjectTagEXT Function = ( PFN_vkSetDebugUtilsObjectTagEXT )vkGetInstanceProcAddr( VulkanContext::Get().GetInstance(), "vkSetDebugUtilsObjectTagEXT" ); VkDebugUtilsObjectTagInfoEXT Info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT }; Info.objectHandle = ( uint64_t )Handle; Info.objectType = ObjectType; Info.tagName = Tag; if( Function ) { Function( VulkanContext::Get().GetDevice(), &Info ); } } inline void CmdBeginDebugLabel( VkCommandBuffer ComamndBuffer, std::string Name ) { PFN_vkCmdBeginDebugUtilsLabelEXT Function = ( PFN_vkCmdBeginDebugUtilsLabelEXT ) vkGetDeviceProcAddr( VulkanContext::Get().GetDevice(), "vkCmdBeginDebugUtilsLabelEXT" ); VkDebugUtilsLabelEXT Info = { VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT }; Info.pLabelName = Name.c_str(); if ( Function ) { Function( ComamndBuffer, &Info ); } } inline void CmdEndDebugLabel( VkCommandBuffer ComamndBuffer ) { PFN_vkCmdEndDebugUtilsLabelEXT Function = ( PFN_vkCmdEndDebugUtilsLabelEXT ) vkGetDeviceProcAddr( VulkanContext::Get().GetDevice(), "vkCmdEndDebugUtilsLabelEXT" ); if( Function ) { Function( ComamndBuffer ); } } inline void CmdDebugMarkerBegin( VkCommandBuffer CommandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo ) { PFN_vkCmdDebugMarkerBeginEXT Function = ( PFN_vkCmdDebugMarkerBeginEXT )vkGetDeviceProcAddr( VulkanContext::Get().GetDevice(), "vkCmdDebugMarkerBeginEXT" ); if( Function ) { Function( CommandBuffer, pMarkerInfo ); } } inline void CmdDebugMarkerEnd( VkCommandBuffer CommandBuffer ) { PFN_vkCmdDebugMarkerEndEXT Function = ( PFN_vkCmdDebugMarkerEndEXT )vkGetDeviceProcAddr( VulkanContext::Get().GetDevice(), "vkCmdDebugMarkerEndEXT" ); if( Function ) { Function( CommandBuffer ); } } }
43.774648
174
0.604247
bea69a8562d60ed5926885a7b2e77d9da01dac64
334
h
C
programowanie-obiektowe/lab-9/Cell.h
kpagacz/software-engineering
6ac3965848919d7fe7350842ae9d59d65d213ef6
[ "MIT" ]
1
2022-01-17T07:50:54.000Z
2022-01-17T07:50:54.000Z
programowanie-obiektowe/lab-9/Cell.h
kpagacz/software-engineering
6ac3965848919d7fe7350842ae9d59d65d213ef6
[ "MIT" ]
null
null
null
programowanie-obiektowe/lab-9/Cell.h
kpagacz/software-engineering
6ac3965848919d7fe7350842ae9d59d65d213ef6
[ "MIT" ]
2
2021-02-02T18:13:35.000Z
2021-05-10T13:31:40.000Z
#ifndef CELL #define CELL #include <iostream> class Cell { private: bool alive; public: Cell(bool _alive) : alive(_alive) {} virtual ~Cell() = default; bool& getAlive() { return alive; } friend std::ostream& operator<<(std::ostream& out, const Cell& c) { out << ((c.alive) ? 'o' : '.'); return out; } }; #endif // CELL
15.904762
68
0.61976
d52e39aaad87442777f6811ff474db7b7cfecda1
946
c
C
src/ex8.c
brunogmauricio/lista1
2eb1a31f8ed3c3b87ef163dc9f3eca1c5a9e34e3
[ "Unlicense" ]
null
null
null
src/ex8.c
brunogmauricio/lista1
2eb1a31f8ed3c3b87ef163dc9f3eca1c5a9e34e3
[ "Unlicense" ]
null
null
null
src/ex8.c
brunogmauricio/lista1
2eb1a31f8ed3c3b87ef163dc9f3eca1c5a9e34e3
[ "Unlicense" ]
null
null
null
#include <stdio.h> /* Enunciado: * * Elabore um programa que receba um valor inteiro de 6 digitos do usuario * e, em seguida, exiba uma versao binaria falsa desse numero. Para calcular * a versao binaria falsa, verifique cada um dos digitos do numero e, se o * digito for maior ou igual a 5, transforme-o em 1, se for menor, transforme-o * em 0. * * * Ex: * Digite um numero: 123456 * 000011 * * Digite um numero: 583910 * 110100 * * Digite um numero: 830209 * 100001 * * DICA: Lembre-se das ferramentas de quebra de fluxo que tinhamos em Python. * Como usa-las em C? Pesquise! * */ int main (int argc, char *argv[]) { int n; printf("Digite um numero: "); scanf("%i", &n); char numero[6]; sprintf(numero, "%i", n); size_t i = 0; for (; i < 6 ; i++) { int z = (int)(numero[i] - '0'); if(z<5){ printf("0"); } else{ printf("1"); } } return 0; }
19.306122
79
0.586681
d560d0966927df86b595a9df1efae39af32cf34b
2,828
c
C
src/bin/util/readstat_dta_days.c
mikmart/ReadStat
aa4df75123eca120161adf897fbfe56617ff47b1
[ "MIT" ]
207
2015-01-02T21:59:06.000Z
2022-03-22T14:19:28.000Z
src/bin/util/readstat_dta_days.c
mikmart/ReadStat
aa4df75123eca120161adf897fbfe56617ff47b1
[ "MIT" ]
256
2015-02-04T14:14:44.000Z
2022-03-22T12:32:27.000Z
src/bin/util/readstat_dta_days.c
ngr-t/smuggler
b49a4b77c453f5c42272d70b4201036f628cd79d
[ "MIT" ]
66
2015-01-11T16:51:16.000Z
2022-03-20T22:32:31.000Z
#include <stdio.h> #include <stdlib.h> #include <string.h> static inline int is_leap(int year) { return ((year % 4 == 0 && year % 100 != 0) || year % 400 ==0); } int readstat_dta_num_days(const char *s, char **dest) { int daysPerMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; int daysPerMonthLeap[] = {31,29,31,30,31,30,31,31,30,31,30,31}; int year, month, day; if (strlen(s) == 0) { *dest = (char*) s; return 0; } int ret = sscanf(s, "%d-%d-%d", &year, &month, &day); month--; if (month < 0 || month > 11 || ret!=3) { *dest = (char*)s; return 0; } int maxdays = (is_leap(year) ? daysPerMonthLeap : daysPerMonth)[month]; if (day < 1 || day > maxdays) { *dest = (char*)s; return 0; } else { int days = 0; for (int i=year; i<1960; i++) { days -= is_leap(i) ? 366 : 365; } for (int i=1960; i<year; i++) { days += is_leap(i) ? 366 : 365; } for (int m=0; m<month; m++) { days += is_leap(year) ? daysPerMonthLeap[m] : daysPerMonth[m]; } days += day-1; char buf[1024]; *dest = (char*)s + snprintf(buf, sizeof(buf), "%d-%d-%d", year, month+1, day); return days; } } char* readstat_dta_days_string(int days, char* dest, int size) { // TODO: Candidate for clean up int yr = 1960; int month = 0; int day = 1; int daysPerMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31}; int daysPerMonthLeap[] = {31,29,31,30,31,30,31,31,30,31,30,31}; if (days < 0) { yr = 1959; month = 11; days = - days; while (days > 0) { int days_in_year = is_leap(yr) ? 366 : 365; if (days > days_in_year) { yr-=1; days-=days_in_year; continue; } int days_in_month = is_leap(yr) ? daysPerMonthLeap[month] : daysPerMonth[month]; if (days > days_in_month) { month-=1; days-=days_in_month; continue; } day = days_in_month-days + 1; days = 0; } } else { while (days > 0) { int days_in_year = is_leap(yr) ? 366 : 365; if (days >= days_in_year) { yr+=1; days-=days_in_year; continue; } int days_in_month = is_leap(yr) ? daysPerMonthLeap[month] : daysPerMonth[month]; if (days >= days_in_month) { month+=1; days-=days_in_month; continue; } day+= days; days = 0; } } snprintf(dest, size, "%04d-%02d-%02d", yr, month+1, day); return dest; }
29.154639
92
0.468529
b9baf62986be61f878e2ae661262f9bcf2f866f4
104
c
C
examples/tof-viewer/external/newton_host_driver/src/host_api/jtag_mbox/read_state_TEST.c
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
5
2021-09-22T10:04:47.000Z
2022-02-08T17:55:09.000Z
examples/tof-viewer/external/newton_host_driver/src/host_api/jtag_mbox/read_state_TEST.c
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
99
2021-02-01T12:45:09.000Z
2022-03-08T09:54:13.000Z
examples/tof-viewer/external/newton_host_driver/src/host_api/jtag_mbox/read_state_TEST.c
rick-yhchen1013/aditof-sdk-rework
911465dd1e05dd0b1c5107197b3b4dc3a10f77f9
[ "MIT" ]
4
2021-08-09T12:32:55.000Z
2021-12-13T05:38:55.000Z
#include "jtagmailbox_hostside.h" int main() { JtagSetup(true); //For TEST state DoReadSSFlow(); }
13
35
0.692308
7b0b08c19507494c25b395a49762ba58ff2f3eb5
1,234
h
C
System/Library/PrivateFrameworks/EmailDaemon.framework/_EDThreadPersistence_StatementCache.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
2
2021-11-02T09:23:27.000Z
2022-03-28T08:21:57.000Z
System/Library/PrivateFrameworks/EmailDaemon.framework/_EDThreadPersistence_StatementCache.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/EmailDaemon.framework/_EDThreadPersistence_StatementCache.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
1
2022-03-28T08:21:59.000Z
2022-03-28T08:21:59.000Z
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, October 27, 2021 at 3:17:12 PM Mountain Standard Time * Operating System: Version 13.5.1 (Build 17F80) * Image Source: /System/Library/PrivateFrameworks/EmailDaemon.framework/EmailDaemon * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley. */ @class EDPersistenceDatabaseConnection, NSMutableDictionary; @interface _EDThreadPersistence_StatementCache : NSObject { EDPersistenceDatabaseConnection* _connection; NSMutableDictionary* _preparedStatements; } @property (nonatomic,readonly) NSMutableDictionary * preparedStatements; //@synthesize preparedStatements=_preparedStatements - In the implementation block @property (nonatomic,readonly) EDPersistenceDatabaseConnection * connection; //@synthesize connection=_connection - In the implementation block -(EDPersistenceDatabaseConnection *)connection; -(id)initWithConnection:(id)arg1 ; -(id)preparedStatementForQueryString:(id)arg1 ; -(NSMutableDictionary *)preparedStatements; @end
45.703704
172
0.705835
479fa08cbf367ba02ddef0c7f0966ae7cc2ff99d
44,171
h
C
src/stanExports_stan_bcalc.h
nschiett/fishgrowbot
bf80cbd8d3bea8199d62143daba0882184c1f425
[ "MIT" ]
3
2021-04-21T13:40:21.000Z
2021-09-13T08:28:55.000Z
src/stanExports_stan_bcalc.h
nschiett/fishgrowbot
bf80cbd8d3bea8199d62143daba0882184c1f425
[ "MIT" ]
null
null
null
src/stanExports_stan_bcalc.h
nschiett/fishgrowbot
bf80cbd8d3bea8199d62143daba0882184c1f425
[ "MIT" ]
null
null
null
// Generated by rstantools. Do not edit by hand. /* fishgrowbot 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. fishgrowbot 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 fishgrowbot. If not, see <http://www.gnu.org/licenses/>. */ #ifndef MODELS_HPP #define MODELS_HPP #define STAN__SERVICES__COMMAND_HPP #include <rstan/rstaninc.hpp> // Code generated by Stan version 2.21.0 #include <stan/model/model_header.hpp> namespace model_stan_bcalc_namespace { using std::istream; using std::string; using std::stringstream; using std::vector; using stan::io::dump; using stan::math::lgamma; using stan::model::prob_grad; using namespace stan::math; static int current_statement_begin__; stan::io::program_reader prog_reader__() { stan::io::program_reader reader; reader.add_event(0, 0, "start", "model_stan_bcalc"); reader.add_event(86, 84, "end", "model_stan_bcalc"); return reader; } #include <stan_meta_header.hpp> class model_stan_bcalc : public stan::model::model_base_crtp<model_stan_bcalc> { private: int N; int Ni; int N_mis; vector_d rcap; vector_d lcap; double l0p; std::vector<int> id; std::vector<int> known; std::vector<int> missing; std::vector<int> known2; std::vector<int> missing2; vector_d r; vector_d r0p; public: model_stan_bcalc(stan::io::var_context& context__, std::ostream* pstream__ = 0) : model_base_crtp(0) { ctor_body(context__, 0, pstream__); } model_stan_bcalc(stan::io::var_context& context__, unsigned int random_seed__, std::ostream* pstream__ = 0) : model_base_crtp(0) { ctor_body(context__, random_seed__, pstream__); } void ctor_body(stan::io::var_context& context__, unsigned int random_seed__, std::ostream* pstream__) { typedef double local_scalar_t__; boost::ecuyer1988 base_rng__ = stan::services::util::create_rng(random_seed__, 0); (void) base_rng__; // suppress unused var warning current_statement_begin__ = -1; static const char* function__ = "model_stan_bcalc_namespace::model_stan_bcalc"; (void) function__; // dummy to suppress unused var warning size_t pos__; (void) pos__; // dummy to suppress unused var warning std::vector<int> vals_i__; std::vector<double> vals_r__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning try { // initialize data block variables from context__ current_statement_begin__ = 2; context__.validate_dims("data initialization", "N", "int", context__.to_vec()); N = int(0); vals_i__ = context__.vals_i("N"); pos__ = 0; N = vals_i__[pos__++]; current_statement_begin__ = 3; context__.validate_dims("data initialization", "Ni", "int", context__.to_vec()); Ni = int(0); vals_i__ = context__.vals_i("Ni"); pos__ = 0; Ni = vals_i__[pos__++]; current_statement_begin__ = 4; context__.validate_dims("data initialization", "N_mis", "int", context__.to_vec()); N_mis = int(0); vals_i__ = context__.vals_i("N_mis"); pos__ = 0; N_mis = vals_i__[pos__++]; current_statement_begin__ = 5; validate_non_negative_index("rcap", "Ni", Ni); context__.validate_dims("data initialization", "rcap", "vector_d", context__.to_vec(Ni)); rcap = Eigen::Matrix<double, Eigen::Dynamic, 1>(Ni); vals_r__ = context__.vals_r("rcap"); pos__ = 0; size_t rcap_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < rcap_j_1_max__; ++j_1__) { rcap(j_1__) = vals_r__[pos__++]; } current_statement_begin__ = 6; validate_non_negative_index("lcap", "Ni", Ni); context__.validate_dims("data initialization", "lcap", "vector_d", context__.to_vec(Ni)); lcap = Eigen::Matrix<double, Eigen::Dynamic, 1>(Ni); vals_r__ = context__.vals_r("lcap"); pos__ = 0; size_t lcap_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_j_1_max__; ++j_1__) { lcap(j_1__) = vals_r__[pos__++]; } current_statement_begin__ = 7; context__.validate_dims("data initialization", "l0p", "double", context__.to_vec()); l0p = double(0); vals_r__ = context__.vals_r("l0p"); pos__ = 0; l0p = vals_r__[pos__++]; current_statement_begin__ = 8; validate_non_negative_index("id", "N", N); context__.validate_dims("data initialization", "id", "int", context__.to_vec(N)); id = std::vector<int>(N, int(0)); vals_i__ = context__.vals_i("id"); pos__ = 0; size_t id_k_0_max__ = N; for (size_t k_0__ = 0; k_0__ < id_k_0_max__; ++k_0__) { id[k_0__] = vals_i__[pos__++]; } current_statement_begin__ = 10; validate_non_negative_index("known", "(Ni - N_mis)", (Ni - N_mis)); context__.validate_dims("data initialization", "known", "int", context__.to_vec((Ni - N_mis))); known = std::vector<int>((Ni - N_mis), int(0)); vals_i__ = context__.vals_i("known"); pos__ = 0; size_t known_k_0_max__ = (Ni - N_mis); for (size_t k_0__ = 0; k_0__ < known_k_0_max__; ++k_0__) { known[k_0__] = vals_i__[pos__++]; } current_statement_begin__ = 11; validate_non_negative_index("missing", "N_mis", N_mis); context__.validate_dims("data initialization", "missing", "int", context__.to_vec(N_mis)); missing = std::vector<int>(N_mis, int(0)); vals_i__ = context__.vals_i("missing"); pos__ = 0; size_t missing_k_0_max__ = N_mis; for (size_t k_0__ = 0; k_0__ < missing_k_0_max__; ++k_0__) { missing[k_0__] = vals_i__[pos__++]; } current_statement_begin__ = 12; validate_non_negative_index("known2", "(N - N_mis)", (N - N_mis)); context__.validate_dims("data initialization", "known2", "int", context__.to_vec((N - N_mis))); known2 = std::vector<int>((N - N_mis), int(0)); vals_i__ = context__.vals_i("known2"); pos__ = 0; size_t known2_k_0_max__ = (N - N_mis); for (size_t k_0__ = 0; k_0__ < known2_k_0_max__; ++k_0__) { known2[k_0__] = vals_i__[pos__++]; } current_statement_begin__ = 13; validate_non_negative_index("missing2", "N_mis", N_mis); context__.validate_dims("data initialization", "missing2", "int", context__.to_vec(N_mis)); missing2 = std::vector<int>(N_mis, int(0)); vals_i__ = context__.vals_i("missing2"); pos__ = 0; size_t missing2_k_0_max__ = N_mis; for (size_t k_0__ = 0; k_0__ < missing2_k_0_max__; ++k_0__) { missing2[k_0__] = vals_i__[pos__++]; } current_statement_begin__ = 15; validate_non_negative_index("r", "(N - N_mis)", (N - N_mis)); context__.validate_dims("data initialization", "r", "vector_d", context__.to_vec((N - N_mis))); r = Eigen::Matrix<double, Eigen::Dynamic, 1>((N - N_mis)); vals_r__ = context__.vals_r("r"); pos__ = 0; size_t r_j_1_max__ = (N - N_mis); for (size_t j_1__ = 0; j_1__ < r_j_1_max__; ++j_1__) { r(j_1__) = vals_r__[pos__++]; } current_statement_begin__ = 17; validate_non_negative_index("r0p", "(Ni - N_mis)", (Ni - N_mis)); context__.validate_dims("data initialization", "r0p", "vector_d", context__.to_vec((Ni - N_mis))); r0p = Eigen::Matrix<double, Eigen::Dynamic, 1>((Ni - N_mis)); vals_r__ = context__.vals_r("r0p"); pos__ = 0; size_t r0p_j_1_max__ = (Ni - N_mis); for (size_t j_1__ = 0; j_1__ < r0p_j_1_max__; ++j_1__) { r0p(j_1__) = vals_r__[pos__++]; } // initialize transformed data variables // execute transformed data statements // validate transformed data // validate, set parameter ranges num_params_r__ = 0U; param_ranges_i__.clear(); current_statement_begin__ = 21; num_params_r__ += 1; current_statement_begin__ = 22; num_params_r__ += 1; current_statement_begin__ = 23; num_params_r__ += 1; current_statement_begin__ = 24; num_params_r__ += 1; current_statement_begin__ = 25; validate_non_negative_index("r0p_mis", "N_mis", N_mis); num_params_r__ += N_mis; current_statement_begin__ = 26; num_params_r__ += 1; current_statement_begin__ = 27; num_params_r__ += 1; } catch (const std::exception& e) { stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); // Next line prevents compiler griping about no return throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); } } ~model_stan_bcalc() { } void transform_inits(const stan::io::var_context& context__, std::vector<int>& params_i__, std::vector<double>& params_r__, std::ostream* pstream__) const { typedef double local_scalar_t__; stan::io::writer<double> writer__(params_r__, params_i__); size_t pos__; (void) pos__; // dummy call to supress warning std::vector<double> vals_r__; std::vector<int> vals_i__; current_statement_begin__ = 21; if (!(context__.contains_r("b"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable b missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("b"); pos__ = 0U; context__.validate_dims("parameter initialization", "b", "double", context__.to_vec()); double b(0); b = vals_r__[pos__++]; try { writer__.scalar_lb_unconstrain(0, b); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable b: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 22; if (!(context__.contains_r("c"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable c missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("c"); pos__ = 0U; context__.validate_dims("parameter initialization", "c", "double", context__.to_vec()); double c(0); c = vals_r__[pos__++]; try { writer__.scalar_lb_unconstrain(0, c); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable c: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 23; if (!(context__.contains_r("sigma"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable sigma missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("sigma"); pos__ = 0U; context__.validate_dims("parameter initialization", "sigma", "double", context__.to_vec()); double sigma(0); sigma = vals_r__[pos__++]; try { writer__.scalar_lb_unconstrain(0, sigma); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable sigma: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 24; if (!(context__.contains_r("nu"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable nu missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("nu"); pos__ = 0U; context__.validate_dims("parameter initialization", "nu", "double", context__.to_vec()); double nu(0); nu = vals_r__[pos__++]; try { writer__.scalar_lb_unconstrain(0, nu); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable nu: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 25; if (!(context__.contains_r("r0p_mis"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable r0p_mis missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("r0p_mis"); pos__ = 0U; validate_non_negative_index("r0p_mis", "N_mis", N_mis); context__.validate_dims("parameter initialization", "r0p_mis", "vector_d", context__.to_vec(N_mis)); Eigen::Matrix<double, Eigen::Dynamic, 1> r0p_mis(N_mis); size_t r0p_mis_j_1_max__ = N_mis; for (size_t j_1__ = 0; j_1__ < r0p_mis_j_1_max__; ++j_1__) { r0p_mis(j_1__) = vals_r__[pos__++]; } try { writer__.vector_lub_unconstrain(0, 0.02, r0p_mis); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable r0p_mis: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 26; if (!(context__.contains_r("r0p_mu"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable r0p_mu missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("r0p_mu"); pos__ = 0U; context__.validate_dims("parameter initialization", "r0p_mu", "double", context__.to_vec()); double r0p_mu(0); r0p_mu = vals_r__[pos__++]; try { writer__.scalar_lub_unconstrain(0, 0.02, r0p_mu); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable r0p_mu: ") + e.what()), current_statement_begin__, prog_reader__()); } current_statement_begin__ = 27; if (!(context__.contains_r("r0p_sd"))) stan::lang::rethrow_located(std::runtime_error(std::string("Variable r0p_sd missing")), current_statement_begin__, prog_reader__()); vals_r__ = context__.vals_r("r0p_sd"); pos__ = 0U; context__.validate_dims("parameter initialization", "r0p_sd", "double", context__.to_vec()); double r0p_sd(0); r0p_sd = vals_r__[pos__++]; try { writer__.scalar_lb_unconstrain(0, r0p_sd); } catch (const std::exception& e) { stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable r0p_sd: ") + e.what()), current_statement_begin__, prog_reader__()); } params_r__ = writer__.data_r(); params_i__ = writer__.data_i(); } void transform_inits(const stan::io::var_context& context, Eigen::Matrix<double, Eigen::Dynamic, 1>& params_r, std::ostream* pstream__) const { std::vector<double> params_r_vec; std::vector<int> params_i_vec; transform_inits(context, params_i_vec, params_r_vec, pstream__); params_r.resize(params_r_vec.size()); for (int i = 0; i < params_r.size(); ++i) params_r(i) = params_r_vec[i]; } template <bool propto__, bool jacobian__, typename T__> T__ log_prob(std::vector<T__>& params_r__, std::vector<int>& params_i__, std::ostream* pstream__ = 0) const { typedef T__ local_scalar_t__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); (void) DUMMY_VAR__; // dummy to suppress unused var warning T__ lp__(0.0); stan::math::accumulator<T__> lp_accum__; try { stan::io::reader<local_scalar_t__> in__(params_r__, params_i__); // model parameters current_statement_begin__ = 21; local_scalar_t__ b; (void) b; // dummy to suppress unused var warning if (jacobian__) b = in__.scalar_lb_constrain(0, lp__); else b = in__.scalar_lb_constrain(0); current_statement_begin__ = 22; local_scalar_t__ c; (void) c; // dummy to suppress unused var warning if (jacobian__) c = in__.scalar_lb_constrain(0, lp__); else c = in__.scalar_lb_constrain(0); current_statement_begin__ = 23; local_scalar_t__ sigma; (void) sigma; // dummy to suppress unused var warning if (jacobian__) sigma = in__.scalar_lb_constrain(0, lp__); else sigma = in__.scalar_lb_constrain(0); current_statement_begin__ = 24; local_scalar_t__ nu; (void) nu; // dummy to suppress unused var warning if (jacobian__) nu = in__.scalar_lb_constrain(0, lp__); else nu = in__.scalar_lb_constrain(0); current_statement_begin__ = 25; Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> r0p_mis; (void) r0p_mis; // dummy to suppress unused var warning if (jacobian__) r0p_mis = in__.vector_lub_constrain(0, 0.02, N_mis, lp__); else r0p_mis = in__.vector_lub_constrain(0, 0.02, N_mis); current_statement_begin__ = 26; local_scalar_t__ r0p_mu; (void) r0p_mu; // dummy to suppress unused var warning if (jacobian__) r0p_mu = in__.scalar_lub_constrain(0, 0.02, lp__); else r0p_mu = in__.scalar_lub_constrain(0, 0.02); current_statement_begin__ = 27; local_scalar_t__ r0p_sd; (void) r0p_sd; // dummy to suppress unused var warning if (jacobian__) r0p_sd = in__.scalar_lb_constrain(0, lp__); else r0p_sd = in__.scalar_lb_constrain(0); // transformed parameters current_statement_begin__ = 31; validate_non_negative_index("r0p_imp", "Ni", Ni); Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> r0p_imp(Ni); stan::math::initialize(r0p_imp, DUMMY_VAR__); stan::math::fill(r0p_imp, DUMMY_VAR__); current_statement_begin__ = 32; validate_non_negative_index("r_imp", "N", N); Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> r_imp(N); stan::math::initialize(r_imp, DUMMY_VAR__); stan::math::fill(r_imp, DUMMY_VAR__); // transformed parameters block statements current_statement_begin__ = 33; stan::model::assign(r0p_imp, stan::model::cons_list(stan::model::index_multi(known), stan::model::nil_index_list()), r0p, "assigning variable r0p_imp"); current_statement_begin__ = 34; stan::model::assign(r0p_imp, stan::model::cons_list(stan::model::index_multi(missing), stan::model::nil_index_list()), r0p_mis, "assigning variable r0p_imp"); current_statement_begin__ = 35; stan::model::assign(r_imp, stan::model::cons_list(stan::model::index_multi(known2), stan::model::nil_index_list()), r, "assigning variable r_imp"); current_statement_begin__ = 36; stan::model::assign(r_imp, stan::model::cons_list(stan::model::index_multi(missing2), stan::model::nil_index_list()), r0p_mis, "assigning variable r_imp"); // validate transformed parameters const char* function__ = "validate transformed params"; (void) function__; // dummy to suppress unused var warning current_statement_begin__ = 31; size_t r0p_imp_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < r0p_imp_j_1_max__; ++j_1__) { if (stan::math::is_uninitialized(r0p_imp(j_1__))) { std::stringstream msg__; msg__ << "Undefined transformed parameter: r0p_imp" << "(" << j_1__ << ")"; stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable r0p_imp: ") + msg__.str()), current_statement_begin__, prog_reader__()); } } current_statement_begin__ = 32; size_t r_imp_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < r_imp_j_1_max__; ++j_1__) { if (stan::math::is_uninitialized(r_imp(j_1__))) { std::stringstream msg__; msg__ << "Undefined transformed parameter: r_imp" << "(" << j_1__ << ")"; stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable r_imp: ") + msg__.str()), current_statement_begin__, prog_reader__()); } } // model body { current_statement_begin__ = 40; validate_non_negative_index("mu", "Ni", Ni); Eigen::Matrix<local_scalar_t__, Eigen::Dynamic, 1> mu(Ni); stan::math::initialize(mu, DUMMY_VAR__); stan::math::fill(mu, DUMMY_VAR__); current_statement_begin__ = 42; lp_accum__.add(normal_log<propto__>(r0p, r0p_mu, r0p_sd)); current_statement_begin__ = 43; lp_accum__.add(normal_log<propto__>(r0p_mis, r0p_mu, r0p_sd)); current_statement_begin__ = 45; lp_accum__.add(normal_log<propto__>(r0p_mu, 0.005, 0.00025)); current_statement_begin__ = 48; lp_accum__.add((student_t_log(sigma, 3, 0, 49) - (1 * student_t_ccdf_log(0, 3, 0, 49)))); current_statement_begin__ = 51; lp_accum__.add(cauchy_log(r0p_sd, 0, 5)); current_statement_begin__ = 53; lp_accum__.add(normal_log<propto__>(b, 200, 200)); current_statement_begin__ = 54; lp_accum__.add(normal_log<propto__>(c, 1, 1)); current_statement_begin__ = 56; lp_accum__.add(gamma_log<propto__>(nu, 2, 0.1)); current_statement_begin__ = 58; for (int n = 1; n <= Ni; ++n) { current_statement_begin__ = 59; stan::model::assign(mu, stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), ((l0p - (b * pow(get_base1(r0p_imp, n, "r0p_imp", 1), c))) + (b * pow(get_base1(rcap, n, "rcap", 1), c))), "assigning variable mu"); current_statement_begin__ = 60; lp_accum__.add(student_t_log<propto__>(get_base1(lcap, n, "lcap", 1), nu, get_base1(mu, n, "mu", 1), sigma)); } } } catch (const std::exception& e) { stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); // Next line prevents compiler griping about no return throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); } lp_accum__.add(lp__); return lp_accum__.sum(); } // log_prob() template <bool propto, bool jacobian, typename T_> T_ log_prob(Eigen::Matrix<T_,Eigen::Dynamic,1>& params_r, std::ostream* pstream = 0) const { std::vector<T_> vec_params_r; vec_params_r.reserve(params_r.size()); for (int i = 0; i < params_r.size(); ++i) vec_params_r.push_back(params_r(i)); std::vector<int> vec_params_i; return log_prob<propto,jacobian,T_>(vec_params_r, vec_params_i, pstream); } void get_param_names(std::vector<std::string>& names__) const { names__.resize(0); names__.push_back("b"); names__.push_back("c"); names__.push_back("sigma"); names__.push_back("nu"); names__.push_back("r0p_mis"); names__.push_back("r0p_mu"); names__.push_back("r0p_sd"); names__.push_back("r0p_imp"); names__.push_back("r_imp"); names__.push_back("lcap_mu"); names__.push_back("lcap_rep"); names__.push_back("a"); names__.push_back("l"); } void get_dims(std::vector<std::vector<size_t> >& dimss__) const { dimss__.resize(0); std::vector<size_t> dims__; dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(N_mis); dimss__.push_back(dims__); dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(Ni); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(N); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(Ni); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(Ni); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(Ni); dimss__.push_back(dims__); dims__.resize(0); dims__.push_back(N); dimss__.push_back(dims__); } template <typename RNG> void write_array(RNG& base_rng__, std::vector<double>& params_r__, std::vector<int>& params_i__, std::vector<double>& vars__, bool include_tparams__ = true, bool include_gqs__ = true, std::ostream* pstream__ = 0) const { typedef double local_scalar_t__; vars__.resize(0); stan::io::reader<local_scalar_t__> in__(params_r__, params_i__); static const char* function__ = "model_stan_bcalc_namespace::write_array"; (void) function__; // dummy to suppress unused var warning // read-transform, write parameters double b = in__.scalar_lb_constrain(0); vars__.push_back(b); double c = in__.scalar_lb_constrain(0); vars__.push_back(c); double sigma = in__.scalar_lb_constrain(0); vars__.push_back(sigma); double nu = in__.scalar_lb_constrain(0); vars__.push_back(nu); Eigen::Matrix<double, Eigen::Dynamic, 1> r0p_mis = in__.vector_lub_constrain(0, 0.02, N_mis); size_t r0p_mis_j_1_max__ = N_mis; for (size_t j_1__ = 0; j_1__ < r0p_mis_j_1_max__; ++j_1__) { vars__.push_back(r0p_mis(j_1__)); } double r0p_mu = in__.scalar_lub_constrain(0, 0.02); vars__.push_back(r0p_mu); double r0p_sd = in__.scalar_lb_constrain(0); vars__.push_back(r0p_sd); double lp__ = 0.0; (void) lp__; // dummy to suppress unused var warning stan::math::accumulator<double> lp_accum__; local_scalar_t__ DUMMY_VAR__(std::numeric_limits<double>::quiet_NaN()); (void) DUMMY_VAR__; // suppress unused var warning if (!include_tparams__ && !include_gqs__) return; try { // declare and define transformed parameters current_statement_begin__ = 31; validate_non_negative_index("r0p_imp", "Ni", Ni); Eigen::Matrix<double, Eigen::Dynamic, 1> r0p_imp(Ni); stan::math::initialize(r0p_imp, DUMMY_VAR__); stan::math::fill(r0p_imp, DUMMY_VAR__); current_statement_begin__ = 32; validate_non_negative_index("r_imp", "N", N); Eigen::Matrix<double, Eigen::Dynamic, 1> r_imp(N); stan::math::initialize(r_imp, DUMMY_VAR__); stan::math::fill(r_imp, DUMMY_VAR__); // do transformed parameters statements current_statement_begin__ = 33; stan::model::assign(r0p_imp, stan::model::cons_list(stan::model::index_multi(known), stan::model::nil_index_list()), r0p, "assigning variable r0p_imp"); current_statement_begin__ = 34; stan::model::assign(r0p_imp, stan::model::cons_list(stan::model::index_multi(missing), stan::model::nil_index_list()), r0p_mis, "assigning variable r0p_imp"); current_statement_begin__ = 35; stan::model::assign(r_imp, stan::model::cons_list(stan::model::index_multi(known2), stan::model::nil_index_list()), r, "assigning variable r_imp"); current_statement_begin__ = 36; stan::model::assign(r_imp, stan::model::cons_list(stan::model::index_multi(missing2), stan::model::nil_index_list()), r0p_mis, "assigning variable r_imp"); if (!include_gqs__ && !include_tparams__) return; // validate transformed parameters const char* function__ = "validate transformed params"; (void) function__; // dummy to suppress unused var warning // write transformed parameters if (include_tparams__) { size_t r0p_imp_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < r0p_imp_j_1_max__; ++j_1__) { vars__.push_back(r0p_imp(j_1__)); } size_t r_imp_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < r_imp_j_1_max__; ++j_1__) { vars__.push_back(r_imp(j_1__)); } } if (!include_gqs__) return; // declare and define generated quantities current_statement_begin__ = 65; validate_non_negative_index("lcap_mu", "Ni", Ni); Eigen::Matrix<double, Eigen::Dynamic, 1> lcap_mu(Ni); stan::math::initialize(lcap_mu, DUMMY_VAR__); stan::math::fill(lcap_mu, DUMMY_VAR__); current_statement_begin__ = 66; validate_non_negative_index("lcap_rep", "Ni", Ni); Eigen::Matrix<double, Eigen::Dynamic, 1> lcap_rep(Ni); stan::math::initialize(lcap_rep, DUMMY_VAR__); stan::math::fill(lcap_rep, DUMMY_VAR__); current_statement_begin__ = 67; validate_non_negative_index("a", "Ni", Ni); Eigen::Matrix<double, Eigen::Dynamic, 1> a(Ni); stan::math::initialize(a, DUMMY_VAR__); stan::math::fill(a, DUMMY_VAR__); current_statement_begin__ = 68; validate_non_negative_index("l", "N", N); Eigen::Matrix<double, Eigen::Dynamic, 1> l(N); stan::math::initialize(l, DUMMY_VAR__); stan::math::fill(l, DUMMY_VAR__); // generated quantities statements current_statement_begin__ = 70; for (int n = 1; n <= Ni; ++n) { current_statement_begin__ = 71; stan::model::assign(lcap_mu, stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), ((l0p - (b * pow(get_base1(r0p_imp, n, "r0p_imp", 1), c))) + (b * pow(get_base1(rcap, n, "rcap", 1), c))), "assigning variable lcap_mu"); current_statement_begin__ = 72; stan::model::assign(lcap_rep, stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), student_t_rng(nu, get_base1(lcap_mu, n, "lcap_mu", 1), sigma, base_rng__), "assigning variable lcap_rep"); } current_statement_begin__ = 76; for (int i = 1; i <= Ni; ++i) { current_statement_begin__ = 77; stan::model::assign(a, stan::model::cons_list(stan::model::index_uni(i), stan::model::nil_index_list()), (l0p - (b * pow(get_base1(r0p_imp, i, "r0p_imp", 1), c))), "assigning variable a"); } current_statement_begin__ = 80; for (int n = 1; n <= N; ++n) { current_statement_begin__ = 81; stan::model::assign(l, stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), (get_base1(a, get_base1(id, n, "id", 1), "a", 1) + stan::math::exp((stan::math::log((l0p - get_base1(a, get_base1(id, n, "id", 1), "a", 1))) + (((stan::math::log((get_base1(lcap, get_base1(id, n, "id", 1), "lcap", 1) - get_base1(a, get_base1(id, n, "id", 1), "a", 1))) - stan::math::log((l0p - get_base1(a, get_base1(id, n, "id", 1), "a", 1)))) * (stan::math::log(get_base1(r_imp, n, "r_imp", 1)) - stan::math::log(get_base1(r0p_imp, get_base1(id, n, "id", 1), "r0p_imp", 1)))) / (stan::math::log(get_base1(rcap, get_base1(id, n, "id", 1), "rcap", 1)) - stan::math::log(get_base1(r0p_imp, get_base1(id, n, "id", 1), "r0p_imp", 1))))))), "assigning variable l"); } // validate, write generated quantities current_statement_begin__ = 65; size_t lcap_mu_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_mu_j_1_max__; ++j_1__) { vars__.push_back(lcap_mu(j_1__)); } current_statement_begin__ = 66; size_t lcap_rep_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_rep_j_1_max__; ++j_1__) { vars__.push_back(lcap_rep(j_1__)); } current_statement_begin__ = 67; size_t a_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < a_j_1_max__; ++j_1__) { vars__.push_back(a(j_1__)); } current_statement_begin__ = 68; size_t l_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < l_j_1_max__; ++j_1__) { vars__.push_back(l(j_1__)); } } catch (const std::exception& e) { stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); // Next line prevents compiler griping about no return throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); } } template <typename RNG> void write_array(RNG& base_rng, Eigen::Matrix<double,Eigen::Dynamic,1>& params_r, Eigen::Matrix<double,Eigen::Dynamic,1>& vars, bool include_tparams = true, bool include_gqs = true, std::ostream* pstream = 0) const { std::vector<double> params_r_vec(params_r.size()); for (int i = 0; i < params_r.size(); ++i) params_r_vec[i] = params_r(i); std::vector<double> vars_vec; std::vector<int> params_i_vec; write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream); vars.resize(vars_vec.size()); for (int i = 0; i < vars.size(); ++i) vars(i) = vars_vec[i]; } std::string model_name() const { return "model_stan_bcalc"; } void constrained_param_names(std::vector<std::string>& param_names__, bool include_tparams__ = true, bool include_gqs__ = true) const { std::stringstream param_name_stream__; param_name_stream__.str(std::string()); param_name_stream__ << "b"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "c"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "sigma"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "nu"; param_names__.push_back(param_name_stream__.str()); size_t r0p_mis_j_1_max__ = N_mis; for (size_t j_1__ = 0; j_1__ < r0p_mis_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r0p_mis" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } param_name_stream__.str(std::string()); param_name_stream__ << "r0p_mu"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "r0p_sd"; param_names__.push_back(param_name_stream__.str()); if (!include_gqs__ && !include_tparams__) return; if (include_tparams__) { size_t r0p_imp_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < r0p_imp_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r0p_imp" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t r_imp_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < r_imp_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r_imp" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } } if (!include_gqs__) return; size_t lcap_mu_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_mu_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "lcap_mu" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t lcap_rep_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_rep_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "lcap_rep" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t a_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < a_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "a" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t l_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < l_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "l" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } } void unconstrained_param_names(std::vector<std::string>& param_names__, bool include_tparams__ = true, bool include_gqs__ = true) const { std::stringstream param_name_stream__; param_name_stream__.str(std::string()); param_name_stream__ << "b"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "c"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "sigma"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "nu"; param_names__.push_back(param_name_stream__.str()); size_t r0p_mis_j_1_max__ = N_mis; for (size_t j_1__ = 0; j_1__ < r0p_mis_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r0p_mis" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } param_name_stream__.str(std::string()); param_name_stream__ << "r0p_mu"; param_names__.push_back(param_name_stream__.str()); param_name_stream__.str(std::string()); param_name_stream__ << "r0p_sd"; param_names__.push_back(param_name_stream__.str()); if (!include_gqs__ && !include_tparams__) return; if (include_tparams__) { size_t r0p_imp_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < r0p_imp_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r0p_imp" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t r_imp_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < r_imp_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "r_imp" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } } if (!include_gqs__) return; size_t lcap_mu_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_mu_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "lcap_mu" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t lcap_rep_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < lcap_rep_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "lcap_rep" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t a_j_1_max__ = Ni; for (size_t j_1__ = 0; j_1__ < a_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "a" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } size_t l_j_1_max__ = N; for (size_t j_1__ = 0; j_1__ < l_j_1_max__; ++j_1__) { param_name_stream__.str(std::string()); param_name_stream__ << "l" << '.' << j_1__ + 1; param_names__.push_back(param_name_stream__.str()); } } }; // model } // namespace typedef model_stan_bcalc_namespace::model_stan_bcalc stan_model; #ifndef USING_R stan::model::model_base& new_model( stan::io::var_context& data_context, unsigned int seed, std::ostream* msg_stream) { stan_model* m = new stan_model(data_context, seed, msg_stream); return *m; } #endif #endif
49.078889
665
0.579317
046f0ab2937ca35dc618c45ea98fa289a552ba3c
4,243
h
C
phe/seal/SEAL/memorypoolhandle.h
BNext-IQT/GEMstone
3fba78440bf1cbedc21dd7d96566696227f0b6a2
[ "Apache-2.0" ]
6
2017-08-24T17:49:18.000Z
2021-10-16T06:17:46.000Z
phe/seal/SEAL/memorypoolhandle.h
BNext-IQT/GEMstone
3fba78440bf1cbedc21dd7d96566696227f0b6a2
[ "Apache-2.0" ]
6
2017-10-31T11:28:18.000Z
2017-10-31T11:28:43.000Z
phe/seal/SEAL/memorypoolhandle.h
BNext-IQT/GEMstone
3fba78440bf1cbedc21dd7d96566696227f0b6a2
[ "Apache-2.0" ]
3
2017-12-20T20:00:35.000Z
2019-06-14T10:36:37.000Z
#pragma once #include <memory> #include <utility> #include "util/mempool.h" namespace seal { /** SEAL uses memory pools for improved performance due to the large number of memory allocations needed by the homomorphic encryption operations, and the underlying polynomial arithmetic. The library automatically creates a shared global memory pool, that is by default used by all instances of the computation-heavy classes such as Encryptor, Evaluator, and PolyCRTBuilder. However, sometimes the user might want to use local memory pools with some of these classes. For example, in heavily multi-threaded applications the global memory pool might become clogged due to concurrent allocations. Instead, the user might want to create a separate---say Evaluator---object for each thread, and have it use a thread-local memory pool. The MemoryPoolHandle class provides the functionality for doing this. For example, the user can create a MemoryPoolHandle that points to a new local memory pool by calling the static function acquire_new(). The MemoryPoolHandle it returns (or copies of it) can now be passed on as an argument to the constructors of one or more classes (such as Encryptor, Evaluator, and PolyCRTBuilder). Internally, a MemoryPoolHandle simply wraps a shared pointer to a util::MemoryPool object. This way the local memory pool will be automatically destroyed, and the memory released, as soon as no existing handles point to it. Since the global memory pool is a static object, it will always have a positive reference count, and thus will not be destroyed until the program terminates. */ class MemoryPoolHandle { public: /** Creates a new MemoryPoolHandle pointing to the global memory pool. */ MemoryPoolHandle() : pool_(util::MemoryPool::default_pool()) { } /** Overwrites the MemoryPoolHandle instance with the specified instance, so that the current instance will point to the same underlying memory pool as the assigned instance. @param[in] assign The MemoryPoolHandle instance that should be assigned to the current instance */ inline MemoryPoolHandle &operator =(const MemoryPoolHandle &assign) { pool_ = assign.pool_; return *this; } /** Overwrites the MemoryPoolHandle instance with the specified instance, so that the current instance will point to the same underlying memory pool as the assigned instance. @param[in] assign The MemoryPoolHandle instance that should be assigned to the current instance */ inline MemoryPoolHandle &operator =(MemoryPoolHandle &&assign) noexcept { pool_ = std::move(assign.pool_); return *this; } /** Creates a copy of a MemoryPoolHandle. @param[in] copy The MemoryPoolHandle to copy from */ MemoryPoolHandle(const MemoryPoolHandle &copy) { operator =(copy); } /** Creates a new MemoryPoolHandle by moving an old one. @param[in] source The MemoryPoolHandle to move from */ MemoryPoolHandle(MemoryPoolHandle &&source) noexcept { operator =(std::move(source)); } /** Returns a MemoryPoolHandle pointing to the global memory pool. */ inline static MemoryPoolHandle acquire_global() { return MemoryPoolHandle(); } /** Returns a MemoryPoolHandle pointing to a new memory pool. */ inline static MemoryPoolHandle acquire_new() { return MemoryPoolHandle(std::make_shared<util::MemoryPool>()); } /** Returns a reference to the internal util::MemoryPool that the MemoryPoolHandle points to. */ inline operator util::MemoryPool &() const { return *pool_.get(); } private: MemoryPoolHandle(std::shared_ptr<util::MemoryPool> &&pool) noexcept : pool_(std::move(pool)) { } std::shared_ptr<util::MemoryPool> pool_; }; }
37.548673
117
0.662032
a472ac48985aa02820e4d99263b6edc4f46db46c
13,296
h
C
platform/mt6592/hardware/mtkcam/hal/adapter/Scenario/Shot/HDRShot/MyHdr.h
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
1
2022-01-07T01:53:19.000Z
2022-01-07T01:53:19.000Z
platform/mt6592/hardware/mtkcam/hal/adapter/Scenario/Shot/HDRShot/MyHdr.h
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
null
null
null
platform/mt6592/hardware/mtkcam/hal/adapter/Scenario/Shot/HDRShot/MyHdr.h
touxiong88/92_mediatek
5e96a7bb778fd9d9b335825584664e0c8b5ff2c7
[ "Apache-2.0" ]
1
2020-02-28T02:48:42.000Z
2020-02-28T02:48:42.000Z
/* Copyright Statement: * * This software/firmware and related documentation ("MediaTek Software") are * protected under relevant copyright laws. The information contained herein * is confidential and proprietary to MediaTek Inc. and/or its licensors. * Without the prior written permission of MediaTek inc. and/or its licensors, * any reproduction, modification, use or disclosure of MediaTek Software, * and information contained herein, in whole or in part, shall be strictly prohibited. */ /* MediaTek Inc. (C) 2010. All rights reserved. * * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * The following software/firmware and/or related documentation ("MediaTek Software") * have been modified by MediaTek Inc. All revisions are subject to any receiver's * applicable license agreements with MediaTek Inc. */ /******************************************************************************************** * LEGAL DISCLAIMER * * (Header of MediaTek Software/Firmware Release or Documentation) * * BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED * FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS * ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR * A PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY * WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK * ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION * OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. * * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE LIABILITY WITH * RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE * FEES OR SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. * * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS * OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. ************************************************************************************************/ #ifndef _MY_HDR_H_ #define _MY_HDR_H_ /******************************************************************************* * *******************************************************************************/ // //#define HDR_DEBUG_OUTPUT_FOLDER "sdcard/Photo/" // For ALPS.GB2. //#define HDR_DEBUG_OUTPUT_FOLDER "/sdcard/" // For ALPS.JB. //#define HDR_DEBUG_OUTPUT_FOLDER "sdcard/DCIM/Camera/" // For ALPS.ICS. #define HDR_DEBUG_SAVE_SOURCE_IMAGE (0) #define HDR_DEBUG_SAVE_SMALL_IMAGE (0) #define HDR_DEBUG_SAVE_NORMALIZED_SMALL_IMAGE (0) #define HDR_DEBUG_SAVE_SE_IMAGE (0) #define HDR_DEBUG_SAVE_WEIGHTING_MAP (0) #define HDR_DEBUG_SAVE_DOWNSCALED_WEIGHTING_MAP (0) #define HDR_DEBUG_SAVE_BLURRED_WEIGHTING_MAP (0) #define HDR_DEBUG_SAVE_HDR_RESULT (0) #define HDR_DEBUG_SAVE_POSTVIEW (0) #define HDR_DEBUG_SAVE_RESIZE_HDR_RESULT (0) #define HDR_DEBUG_SAVE_HDR_JPEG (0) #define HDR_DEBUG_FORCE_SINGLE_RUN (0) #define HDR_DEBUG_FORCE_ROTATE (0) #define HDR_DEBUG_OFFLINE_SOURCE_IMAGE (1) #define HDR_DEBUG_SKIP_HANDLER (0) #define HDR_DEBUG_SKIP_3A (0) #define HDR_DEBUG_SKIP_MODIFY_POLICY (0) #define HDR_SPEEDUP_JPEG (1) #define HDR_SPEEDUP_MALLOC (1) #define HDR_SPEEDUP_BURSTSHOT (1) #define HDR_PROFILE_CAPTURE (0) // General. #define HDR_PROFILE_CAPTURE2 (1) // In capture(). #define HDR_PROFILE_CAPTURE3 (0) // In createFullFrame(). /******************************************************************************* * *******************************************************************************/ #define LOG_TAG "HdrScenario" //#include <utils/threads.h> #include <utils/Errors.h> #include <cutils/xlog.h> // //#include <MediaHal.h> //#include <scenario_types.h> //#include <cam_types.h> //#include <cam_port.h> //using namespace NSCamera; // //#include <mhal/inc/camera.h> // For struct needed by IShot.h //#include <shot/IShot.h> #include <IShot.h> //#include <shot/Shotbase.h> //#include <Shotbase.h> //#include <mdp_hal.h> //#include "IHdr.h" //kidd:? #include "Hdr.h" //#include <isp_hal.h> //#include <mtkcam/hal/aaa_hal_base.h> //kidd:? //#include <mhal_interface.h> // For Mdp_BitbltSlice() (for HDR Rotate). #include <camshot/_callbacks.h> //workaround for ISImager.h #include <ImageUtils.h> #include "ISImager.h" #include <fcntl.h> #include "CameraProfile.h" // For CPTLog*()/AutoCPTLog class. #include "camera_custom_hdr.h" // For HDR Customer Parameters in Customer Folder. /******************************************************************************* * *******************************************************************************/ //#define MY_DBG(fmt, arg...) LOGD("{HdrShot}"fmt, ##arg) //#define MY_INFO(fmt, arg...) LOGI("{HdrShot}"fmt, ##arg) //#define MY_WARN(fmt, arg...) LOGW("{HdrShot}"fmt, ##arg) //#define MY_ERR(fmt, arg...) LOGE("{HdrShot}<%s:#%d>"fmt, __FILE__, __LINE__, ##arg) #define HDR_HAL_TAG "{HdrShot} " #define LOG_LEVEL_SILENT 8 #define LOG_LEVEL_ASSERT 7 #define LOG_LEVEL_ERROR 6 #define LOG_LEVEL_WARN 5 #define LOG_LEVEL_INFO 4 #define LOG_LEVEL_DEBUG 3 #define LOG_LEVEL_VERBOSE 2 #define HDR_SHOT_LOG_LEVEL LOG_LEVEL_VERBOSE #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_SILENT) // 8 #define MY_ASSERT(cond, fmt, arg...) #define MY_ERR(fmt, arg...) #define MY_WARN(fmt, arg...) #define MY_INFO(fmt, arg...) #define MY_DBG(fmt, arg...) #define MY_VERB(fmt, arg...) #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_SILENT) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_ASSERT) // 7 #undef MY_ASSERT #define MY_ASSERT(expr, fmt, arg...) \ do { \ if (!(expr)) \ XLOGE("%s, Line%s: ASSERTION FAILED!: " fmt, __FUNCTION__, __LINE__, ##arg); \ } while (0) #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_ASSERT) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_ERROR) // 6 #undef MY_ERR //#define MY_ERR(fmt, arg...) XLOGE(HDR_HAL_TAG "[%s, line%04d] " fmt, __FILE__, __LINE__, ##arg) // When MP, will only show log of this level. // <Fatal>: Serious error that cause program can not execute. <Error>: Some error that causes some part of the functionality can not operate normally. #define MY_ERR(fmt, arg...) {XLOGE(HDR_HAL_TAG "[%s, line%04d] " fmt, __FILE__, __LINE__, ##arg);printf("HDR_HAL_TAG [%s, line%04d] " fmt "\n", __FILE__, __LINE__, ##arg);} // When MP, will only show log of this level. // <Fatal>: Serious error that cause program can not execute. <Error>: Some error that causes some part of the functionality can not operate normally. #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_ERROR) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_WARN) // 5 #undef MY_WARN //#dfine MY_WARN(fmt, arg...) XLOGW(HDR_HAL_TAG fmt, ##arg) // <Warning>: Some errors are encountered, but after exception handling, user won't notice there were errors happened. #define MY_WARN(fmt, arg...) {XLOGW(HDR_HAL_TAG fmt, ##arg);printf(HDR_HAL_TAG fmt "\n", ##arg);} // <Warning>: Some errors are encountered, but after exception handling, user won't notice there were errors happened. #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_WARN) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_INFO) // 4 #undef MY_INFO //#define MY_INFO(fmt, arg...) XLOGI(HDR_HAL_TAG fmt, ##arg) // <Info>: Show general system information. Like OS version, start/end of Service... #define MY_INFO(fmt, arg...) {XLOGI(HDR_HAL_TAG fmt, ##arg);printf(HDR_HAL_TAG fmt "\n", ##arg);} // <Info>: Show general system information. Like OS version, start/end of Service... #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_INFO) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_DEBUG) // 3 #undef MY_DBG //#define MY_DBG(fmt, arg...) XLOGD(HDR_HAL_TAG fmt, ##arg) // <Debug>: Show general debug information. E.g. Change of state machine; entry point or parameters of Public function or OS callback; Start/end of process thread... #define MY_DBG(fmt, arg...) {XLOGD(HDR_HAL_TAG fmt, ##arg);printf(HDR_HAL_TAG fmt "\n", ##arg);} // <Debug>: Show general debug information. E.g. Change of state machine; entry point or parameters of Public function or OS callback; Start/end of process thread... #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_DEBUG) #if (HDR_SHOT_LOG_LEVEL <= LOG_LEVEL_VERBOSE) // 2 #undef MY_VERB //#define MY_VERB(fmt, arg...) XLOGV(HDR_HAL_TAG fmt, ##arg) // <Verbose>: Show more detail debug information. E.g. Entry/exit of private function; contain of local variable in function or code block; return value of system function/API... #define MY_VERB(fmt, arg...) {XLOGV(HDR_HAL_TAG fmt, ##arg);printf(HDR_HAL_TAG fmt "\n", ##arg);} // <Verbose>: Show more detail debug information. E.g. Entry/exit of private function; contain of local variable in function or code block; return value of system function/API... #endif // (HDR_LOG_LEVEL <= LOG_LEVEL_VERBOSE) #define FUNCTION_LOG_START MY_DBG("[%s] - E.", __FUNCTION__) #define FUNCTION_LOG_END MY_DBG("[%s] - X. ret: %d.", __FUNCTION__, ret) #define CHECK_OBJECT(x) { if (x == NULL) { MY_ERR("Null %s Object", #x); return MFALSE;}} /******************************************************************************* * *******************************************************************************/ #if (HDR_PROFILE_CAPTURE || HDR_PROFILE_CAPTURE2 || HDR_PROFILE_CAPTURE3) class MyDbgTimer { protected: char const*const mpszName; mutable MINT32 mIdx; MINT32 const mi4StartUs; mutable MINT32 mi4LastUs; public: MyDbgTimer(char const*const pszTitle) : mpszName(pszTitle) , mIdx(0) , mi4StartUs(getUs()) , mi4LastUs(getUs()) { } inline MINT32 getUs() const { struct timeval tv; ::gettimeofday(&tv, NULL); return tv.tv_sec * 1000000 + tv.tv_usec; } inline MBOOL print(char const*const pszInfo = "") const { MINT32 const i4EndUs = getUs(); if (0==mIdx) { MY_INFO("[%s] %s:(%d-th) ===> [start-->now: %d ms]", mpszName, pszInfo, mIdx++, (i4EndUs-mi4StartUs)/1000); printf("[%s] %s:(%d-th) ===> [start-->now: %d ms]\n", mpszName, pszInfo, mIdx++, (i4EndUs-mi4StartUs)/1000); } else { MY_INFO("[%s] %s:(%d-th) ===> [start-->now: %d ms] [last-->now: %d ms]", mpszName, pszInfo, mIdx++, (i4EndUs-mi4StartUs)/1000, (i4EndUs-mi4LastUs)/1000); printf("[%s] %s:(%d-th) ===> [start-->now: %d ms] [last-->now: %d ms]\n", mpszName, pszInfo, mIdx++, (i4EndUs-mi4StartUs)/1000, (i4EndUs-mi4LastUs)/1000); } mi4LastUs = i4EndUs; //sleep(4); //wait 1 sec for AE stable return MTRUE; } }; #endif // (HDR_PROFILE_CAPTURE || HDR_PROFILE_CAPTURE2) /******************************************************************************* * *******************************************************************************/ #endif // _MY_HDR_H_
50.173585
371
0.633048
a4b8f054fd9d871e065634430018ac7ba019c6eb
1,760
c
C
example/windows/userspace/test/src/test.c
goodwater/jjwu_debug
ce3ca2ba777940cb98e97ceaf212e3f99053042a
[ "MIT" ]
2
2016-06-29T15:32:27.000Z
2016-06-29T15:32:28.000Z
example/windows/userspace/test/src/test.c
goodwater/jjwu_debug
ce3ca2ba777940cb98e97ceaf212e3f99053042a
[ "MIT" ]
null
null
null
example/windows/userspace/test/src/test.c
goodwater/jjwu_debug
ce3ca2ba777940cb98e97ceaf212e3f99053042a
[ "MIT" ]
null
null
null
/* * Copyright (c) 2016 WU, JHENG-JHONG <goodwater.wu@gmail.com> * * 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. */ #include <stdio.h> #include <windows.h> #include "jjwu_debug.h" #define FMT "%s: %d\n" int main(int argc, const char *argv[]) { char *str = "Level"; int debug_level = 0; JJWU_MSG(0, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(1, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(2, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(3, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(4, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(5, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(6, FMT, str, debug_level++); Sleep(1000); JJWU_MSG(7, FMT, str, debug_level); system("pause"); return 0; }
35.918367
117
0.722727
2b9c8b5d98f0df19131641435ed5a2a0dc632407
2,097
h
C
barzer_el_trie_ruleidx.h
barzerman/barzer
3211507d5ed0294ee77986f58d781a2fa4142e0d
[ "MIT" ]
1
2018-10-22T12:53:13.000Z
2018-10-22T12:53:13.000Z
barzer_el_trie_ruleidx.h
barzerman/barzer
3211507d5ed0294ee77986f58d781a2fa4142e0d
[ "MIT" ]
null
null
null
barzer_el_trie_ruleidx.h
barzerman/barzer
3211507d5ed0294ee77986f58d781a2fa4142e0d
[ "MIT" ]
null
null
null
/// Copyright Barzer LLC 2012 /// Code is property Barzer for authorized use only /// #pragma once #include <barzer_elementary_types.h> #include <vector> #include <map> namespace barzer { class BarzelTrieNode; class StoredUniverse; struct RulePath { UniqueTrieId m_trieId; uint32_t m_source; uint32_t m_stId; uint32_t source() const { return m_source; } uint32_t statementId() const { return m_stId; } void setTrieId( uint32_t cid, uint32_t tid ) { m_trieId = { cid, tid }; } RulePath( ) : m_trieId( { 0xffffffff, 0xffffffff } ), m_source(0xffffffff),m_stId(0xffffffff) {} RulePath( uint32_t srcid, uint32_t stid, uint32_t trieClassId, uint32_t trieId ) : m_trieId( { trieClassId, trieId } ), m_source(srcid),m_stId(stid) {} RulePath( uint32_t srcid, uint32_t stid, const UniqueTrieId& tid ) : m_trieId(tid), m_source(srcid), m_stId(stid) {} }; inline bool operator<(const RulePath& l, const RulePath& r) { return( l.m_stId < r.m_stId ? true : ( r.m_stId < l.m_stId ? false : ( l.m_source < r.m_source ? true : ( r.m_source < l.m_source ? true : ( l.m_trieId < r.m_trieId ) ) ) ) ); } inline bool operator==(const RulePath& r1, const RulePath& r2) { return ( r1.m_source == r2.m_source && r1.m_stId == r2.m_stId ); } enum class NodeType : uint8_t { EList, Subtree }; class TrieRuleIdx { public: typedef std::vector<BarzelTrieNode*> TrieNodeInfo; private: std::map<RulePath, TrieNodeInfo> m_path2nodes; StoredUniverse& d_universe; public: void addNode(const RulePath& path, BarzelTrieNode *node ); bool removeNode(const RulePath& path); bool removeNode( const char* trieClass, const char* trieId , const char* source, uint32_t statementId ); /// trieclass|trieid|source|statement id bool removeNode( const char* str ); void clear(); TrieRuleIdx( StoredUniverse& u) : d_universe(u) {} }; }
22.308511
88
0.624702
28b1b0d1c7140ee369a87f00be5b6fff029933f9
288
c
C
ports/ftp/bbftp-server/dragonfly/patch-bbftpd__signals.c
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
31
2015-02-06T17:06:37.000Z
2022-03-08T19:53:28.000Z
ports/ftp/bbftp-server/dragonfly/patch-bbftpd__signals.c
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
236
2015-06-29T19:51:17.000Z
2021-12-16T22:46:38.000Z
ports/ftp/bbftp-server/dragonfly/patch-bbftpd__signals.c
liweitianux/DeltaPorts
b907de0ceb9c0e46ae8961896e97b361aa7c62c0
[ "BSD-2-Clause-FreeBSD" ]
52
2015-02-06T17:05:36.000Z
2021-10-21T12:13:06.000Z
--- bbftpd_signals.c.intermediate 2021-03-10 08:13:02.000000000 +0000 +++ bbftpd_signals.c @@ -43,6 +43,7 @@ #include <syslog.h> #include <netinet/in.h> #include <sys/socket.h> +#include <unistd.h> /* for getpid() */ #if TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h>
26.181818
69
0.670139
ff4fb59a5eb1ca4294f86928f73ede838675bff7
1,508
h
C
System/Library/PrivateFrameworks/NewsUI2.framework/TSImageHeadlineView.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
2
2021-11-02T09:23:27.000Z
2022-03-28T08:21:57.000Z
System/Library/PrivateFrameworks/NewsUI2.framework/TSImageHeadlineView.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
null
null
null
System/Library/PrivateFrameworks/NewsUI2.framework/TSImageHeadlineView.h
lechium/iOS1351Headers
6bed3dada5ffc20366b27f7f2300a24a48a6284e
[ "MIT" ]
1
2022-03-28T08:21:59.000Z
2022-03-28T08:21:59.000Z
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, October 27, 2021 at 3:18:04 PM Mountain Standard Time * Operating System: Version 13.5.1 (Build 17F80) * Image Source: /System/Library/PrivateFrameworks/NewsUI2.framework/NewsUI2 * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley. */ #import <NewsUI2/NewsUI2-Structs.h> #import <UIKitCore/UIView.h> #import <libobjc.A.dylib/TSAnimatedViewPropertiesProviderType.h> @class NSString; @interface TSImageHeadlineView : UIView <TSAnimatedViewPropertiesProviderType> { insetView; offensiveView; thumbnailImageView; textView; footerView; axElement; } @property (copy,nonatomic) NSString * accessibilityLabel; @property (copy,nonatomic) NSString * accessibilityValue; @property (copy,nonatomic) NSString * accessibilityHint; @property (assign,nonatomic) unsigned long long accessibilityTraits; -(id)animatedViewProperties; -(NSString *)accessibilityLabel; -(NSString *)accessibilityValue; -(NSString *)accessibilityHint; -(unsigned long long)accessibilityTraits; -(void)setAccessibilityLabel:(NSString *)arg1 ; -(void)setAccessibilityValue:(NSString *)arg1 ; -(void)setAccessibilityHint:(NSString *)arg1 ; -(void)setAccessibilityTraits:(unsigned long long)arg1 ; -(id)initWithCoder:(id)arg1 ; -(id)initWithFrame:(CGRect)arg1 ; @end
35.069767
130
0.710212
a244bca3f7da03823095001f028fed37a8c76765
1,202
h
C
src/CmdLineOptParser.h
uavosky/uavosky-qgroundcontrol
9a49a206e4fe2d3291c212ae8dadd4d5aa0e3197
[ "Apache-2.0" ]
12
2020-04-19T17:36:34.000Z
2022-02-02T01:42:06.000Z
src/CmdLineOptParser.h
uavosky/uavosky-qgroundcontrol
9a49a206e4fe2d3291c212ae8dadd4d5aa0e3197
[ "Apache-2.0" ]
30
2019-07-10T02:21:58.000Z
2019-08-15T02:17:42.000Z
src/CmdLineOptParser.h
uavosky/uavosky-qgroundcontrol
9a49a206e4fe2d3291c212ae8dadd4d5aa0e3197
[ "Apache-2.0" ]
39
2020-04-18T00:45:45.000Z
2022-03-21T10:41:46.000Z
/**************************************************************************** * * (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * * QGroundControl is licensed according to the terms in the file * COPYING.md in the root of the source code directory. * ****************************************************************************/ /// @file /// @brief Command line option parser /// /// @author Don Gagne <don@thegagnes.com> #ifndef CMDLINEOPTPARSER_H #define CMDLINEOPTPARSER_H #include <QString> #include <cstring> /// @brief Structure used to pass command line options to the ParseCmdLineOptions function. typedef struct { const char* optionStr; ///< command line option, for example "--foo" bool* optionFound; ///< if option is found this variable will be set to true QString* optionArg; ///< Option has additional argument, form is option:arg } CmdLineOpt_t; void ParseCmdLineOptions(int& argc, char* argv[], CmdLineOpt_t* prgOpts, size_t cOpts, bool removeParsedOptions); #endif
33.388889
91
0.534942
9edd45005d55009b39290cf11d8cb3ff5f6c62ae
8,935
h
C
Source Files/Kinect-BodyBasics/include/lsl/resolver.h
TAMUCogLab/OpenSync
8a03a05c3b4adf0d77884ca176617275c99a10db
[ "MIT" ]
2
2022-02-11T22:12:37.000Z
2022-03-18T23:11:41.000Z
Source Files/Unicorn/inlude/lsl/resolver.h
TAMUCogLab/OpenSync
8a03a05c3b4adf0d77884ca176617275c99a10db
[ "MIT" ]
null
null
null
Source Files/Unicorn/inlude/lsl/resolver.h
TAMUCogLab/OpenSync
8a03a05c3b4adf0d77884ca176617275c99a10db
[ "MIT" ]
null
null
null
#pragma once #include "common.h" #include "types.h" /// @file resolver.h Stream resolution functions /** @defgroup continuous_resolver The lsl_continuous_resolver * @ingroup resolve * * Streams can be resolved at a single timepoint once (@ref resolve) or continuously in the * background. * @{ */ /** * Construct a new #lsl_continuous_resolver that resolves all streams on the network. * * This is analogous to the functionality offered by the free function lsl_resolve_streams(). * @param forget_after When a stream is no longer visible on the network (e.g. because it was shut * down), this is the time in seconds after which it is no longer reported by the resolver. * * The recommended default value is 5.0. */ extern LIBLSL_C_API lsl_continuous_resolver lsl_create_continuous_resolver(double forget_after); /** * Construct a new lsl_continuous_resolver that resolves all streams with a specific value for a given * property. * * This is analogous to the functionality provided by the free function lsl_resolve_byprop() * @param prop The #lsl_streaminfo property that should have a specific value (e.g., "name", "type", * "source_id", or "desc/manufaturer"). * @param value The string value that the property should have (e.g., "EEG" as the type property). * @param forget_after When a stream is no longer visible on the network (e.g., because it was shut * down), this is the time in seconds after which it is no longer reported by the resolver. * The recommended default value is 5.0. */ extern LIBLSL_C_API lsl_continuous_resolver lsl_create_continuous_resolver_byprop(const char *prop, const char *value, double forget_after); /** * Construct a new lsl_continuous_resolver that resolves all streams that match a given XPath 1.0 * predicate. * * This is analogous to the functionality provided by the free function lsl_resolve_bypred() * @param pred The predicate string, e.g. * `"name='BioSemi'" or "type='EEG' and starts-with(name,'BioSemi') and count(info/desc/channel)=32"` * @param forget_after When a stream is no longer visible on the network (e.g., because it was shut * down), this is the time in seconds after which it is no longer reported by the resolver. * The recommended default value is 5.0. */ extern LIBLSL_C_API lsl_continuous_resolver lsl_create_continuous_resolver_bypred(const char *pred, double forget_after); /** * Obtain the set of currently present streams on the network (i.e. resolve result). * * @param res A continuous resolver (previously created with one of the * lsl_create_continuous_resolver() functions). * @param buffer A user-allocated buffer to hold the current resolve results.<br> * @attention It is the user's responsibility to either destroy the resulting streaminfo objects or * to pass them back to the LSL during during creation of an inlet. * @attention The stream_infos returned by the resolver are only short versions that do not include * the lsl_get_desc() field (which can be arbitrarily big). * * To obtain the full stream information you need to call lsl_get_info() on the inlet after you have * created one. * @param buffer_elements The user-provided buffer length. * @return The number of results written into the buffer (never more than the provided # of slots) * or a negative number if an error has occurred (values corresponding to #lsl_error_code_t). */ extern LIBLSL_C_API int32_t lsl_resolver_results(lsl_continuous_resolver res, lsl_streaminfo *buffer, uint32_t buffer_elements); /// Destructor for the continuous resolver. extern LIBLSL_C_API void lsl_destroy_continuous_resolver(lsl_continuous_resolver res); /// @} /** @defgroup resolve Resolving streams on the network * @{*/ /** * Resolve all streams on the network. * * This function returns all currently available streams from any outlet on the network. * The network is usually the subnet specified at the local router, but may also include a multicast * group of machines (given that the network supports it), or a list of hostnames.<br> * These details may optionally be customized by the experimenter in a configuration file * (see page Network Connectivity in the LSL wiki). * This is the default mechanism used by the browsing programs and the recording program. * @param[out] buffer A user-allocated buffer to hold the resolve results. * @attention It is the user's responsibility to either destroy the resulting streaminfo objects or * to pass them back to the LSL during during creation of an inlet. * * @attention The stream_info's returned by the resolver are only short versions that do not include * the lsl_get_desc() field (which can be arbitrarily big). * To obtain the full stream information you need to call lsl_get_info() on the inlet after you have * created one. * @param buffer_elements The user-provided buffer length. * @param wait_time The waiting time for the operation, in seconds, to search for streams. * The recommended wait time is 1 second (or 2 for a busy and large recording operation). * @warning If this is too short (<0.5s) only a subset (or none) of the outlets that are present on * the network may be returned. * @return The number of results written into the buffer (never more than the provided # of slots) * or a negative number if an error has occurred (values corresponding to lsl_error_code_t). */ extern LIBLSL_C_API int32_t lsl_resolve_all(lsl_streaminfo *buffer, uint32_t buffer_elements, double wait_time); /** * Resolve all streams with a given value for a property. * * If the goal is to resolve a specific stream, this method is preferred over resolving all streams * and then selecting the desired one. * @param[out] buffer A user-allocated buffer to hold the resolve results. * @attention It is the user's responsibility to either destroy the resulting streaminfo objects or * to pass them back to the LSL during during creation of an inlet. * * @attention The stream_info's returned by the resolver are only short versions that do not include * the lsl_get_desc() field (which can be arbitrarily big). To obtain the full stream information * you need to call lsl_get_info() on the inlet after you have created one. * @param buffer_elements The user-provided buffer length. * @param prop The streaminfo property that should have a specific value (`"name"`, `"type"`, * `"source_id"`, or, e.g., `"desc/manufaturer"` if present). * @param value The string value that the property should have (e.g., "EEG" as the type). * @param minimum Return at least this number of streams. * @param timeout Optionally a timeout of the operation, in seconds (default: no timeout). * If the timeout expires, less than the desired number of streams (possibly none) will be returned. * @return The number of results written into the buffer (never more than the provided # of slots) * or a negative number if an error has occurred (values corresponding to #lsl_error_code_t). */ extern LIBLSL_C_API int32_t lsl_resolve_byprop(lsl_streaminfo *buffer, uint32_t buffer_elements, const char *prop, const char *value, int32_t minimum, double timeout); /** * Resolve all streams that match a given predicate. * * Advanced query that allows to impose more conditions on the retrieved streams; * the given string is an [XPath 1.0 predicate](http://en.wikipedia.org/w/index.php?title=XPath_1.0) * for the `<info>` node (omitting the surrounding []'s) * @param[out] buffer A user-allocated buffer to hold the resolve results. * @attention It is the user's responsibility to either destroy the resulting streaminfo objects or * to pass them back to the LSL during during creation of an inlet. * * @attention The stream_info's returned by the resolver are only short versions that do not include * the lsl_get_desc() field (which can be arbitrarily big). To obtain the full stream information * you need to call lsl_get_info() on the inlet after you have created one. * @param buffer_elements The user-provided buffer length. * @param pred The predicate string, e.g. * `name='BioSemi'` or `type='EEG' and starts-with(name,'BioSemi') and count(info/desc/channel)=32` * @param minimum Return at least this number of streams. * @param timeout Optionally a timeout of the operation, in seconds (default: no timeout). * If the timeout expires, less than the desired number of streams (possibly none) * will be returned. * @return The number of results written into the buffer (never more than the provided # of slots) * or a negative number if an error has occurred (values corresponding to lsl_error_code_t). */ extern LIBLSL_C_API int32_t lsl_resolve_bypred(lsl_streaminfo *buffer, uint32_t buffer_elements, const char *pred, int32_t minimum, double timeout); /// @}
56.910828
168
0.748181
7f855fe9f7a724210eb1accf904c60238f87f3fc
1,133
h
C
src/base/zone.h
emptyland/nyaa
e2092a086869342b14de51c2afc1246500dbf47d
[ "BSD-2-Clause" ]
null
null
null
src/base/zone.h
emptyland/nyaa
e2092a086869342b14de51c2afc1246500dbf47d
[ "BSD-2-Clause" ]
null
null
null
src/base/zone.h
emptyland/nyaa
e2092a086869342b14de51c2afc1246500dbf47d
[ "BSD-2-Clause" ]
null
null
null
#ifndef NYAA_BASE_ZONE_H_ #define NYAA_BASE_ZONE_H_ #include "base/base.h" #include "base/allocator.h" #include <memory> namespace nyaa { namespace base { class Arena; class Zone final : public Allocator { public: Zone(Allocator *ll_allocator, size_t max_cache_size); virtual ~Zone() override; DEF_VAL_GETTER(size_t, page_size); DEF_VAL_GETTER(size_t, max_cache_size); Arena *NewArena(size_t limit_size, Arena *old_arena = nullptr); Arena *default_arena() const; size_t GetCacheSize() const; size_t GetTotalMameoryUsage() const; virtual void * Allocate(size_t size, size_t alignment = sizeof(max_align_t)) override; virtual size_t granularity() override; DISALLOW_IMPLICIT_CONSTRUCTORS(Zone); private: struct Page; struct ShadowPage; class ArenaImpl; class Core; virtual void Free(const void *chunk, size_t size) override; Allocator *const ll_allocator_; size_t const page_size_; size_t const max_cache_size_; std::unique_ptr<Core> core_; }; // class Zone } // namespace base } // namespace nyaa #endif // NYAA_BASE_ZONE_H_
21.377358
90
0.716681
369985b8140457658e0772f071b28055487bb807
132
h
C
STM32F412G_Disco_CDC_RNDIS_lwIP/lwip-2.1.2/src/include/netif/etharp.h
R2fA9r/STM32
1da12e1dad5b903402889d2c289351b8609d44ae
[ "MIT" ]
null
null
null
STM32F412G_Disco_CDC_RNDIS_lwIP/lwip-2.1.2/src/include/netif/etharp.h
R2fA9r/STM32
1da12e1dad5b903402889d2c289351b8609d44ae
[ "MIT" ]
null
null
null
STM32F412G_Disco_CDC_RNDIS_lwIP/lwip-2.1.2/src/include/netif/etharp.h
R2fA9r/STM32
1da12e1dad5b903402889d2c289351b8609d44ae
[ "MIT" ]
null
null
null
/* ARP has been moved to core/ipv4, provide this #include for compatibility only */ #include <etharp.h> #include <netif/ethernet.h>
33
83
0.742424
cfe8a6ade2a7adb61953c382d8bc79df465c2235
6,298
h
C
src/tritonsort/core/StatWriter.h
anku94/themis_tritonsort
68fd3e2f1c0b2947e187151a2e9717f6b9b0ed0d
[ "BSD-3-Clause" ]
11
2015-12-14T05:35:17.000Z
2021-11-08T22:02:32.000Z
src/tritonsort/core/StatWriter.h
anku94/themis_tritonsort
68fd3e2f1c0b2947e187151a2e9717f6b9b0ed0d
[ "BSD-3-Clause" ]
null
null
null
src/tritonsort/core/StatWriter.h
anku94/themis_tritonsort
68fd3e2f1c0b2947e187151a2e9717f6b9b0ed0d
[ "BSD-3-Clause" ]
8
2015-12-22T19:31:16.000Z
2020-12-15T12:09:00.000Z
#ifndef TRITONSORT_STAT_WRITER_H #define TRITONSORT_STAT_WRITER_H #include <errno.h> #include <list> #include <map> #include <pthread.h> #include <set> #include <stdint.h> #include <string.h> #include <string> #include "core/LogDataContainer.h" #include "core/StatContainerInterface.h" #include "core/Thread.h" #include "core/ThreadSafeQueue.h" #include "third-party/jsoncpp.h" class File; class Params; /** The statistic writer is responsible for periodically gathering statistic data from StatLoggers and writing that statistic data to disk. It is also responsible for garbage-collecting StatLoggers' statistic containers when the StatLoggers destruct. */ class StatWriter : private themis::Thread { public: /// Initialize the singleton StatWriter /** \sa StatWriter::StatWriter */ static void init(Params& params); /// Stop the StatWriter thread static void teardown(); /// Set the phase name associated with logged data /** \sa StatWriter::setPhaseName */ static void setCurrentPhaseName(const std::string& phaseName); /// Set the epoch number associated with logged data /** \sa StatWriter::setEpoch */ static void setCurrentEpoch(uint64_t epoch); /// Register a StatLogger with the singleton StatWriter /** \return the unique ID of the registrant that it will use to identify its containers, or 0 if no singleton StatWriter has been instantiated \sa StatWriter::registerStatLogger */ static uint64_t registerLogger(); /// Spawn the stat writing thread using the singleton StatWriter static void spawn(); /// Add a stat container to the singleton StatWriter /** This method calls StatWriter::addStatContainerInternal on the singleton writer if it has been instantiated. If it has not been instantiated, the provided container is deleted. Thread-safe. \param statContainer the container to add */ static void addStatContainer(StatContainerInterface* statContainer); /// Add a log data container to the singleton StatWriter /** This method calls StatWriter::addLogDataContainerInternal on the singleton writer if it has been instantiated. If it has not been instantiated, the provided container is deleted. \param logDataContainer the log data container to add */ static void addLogDataContainer(LogDataContainer* logDataContainer); /// Add a log line descriptor to the singleton StatWriter /** This method calls StatWriter::addLogLineDescriptorInternal on the singleton writer if it has been instantiated. If it has not been instantiated, the provided container is deleted. \param loggerID the unique ID of the stat logger that is doing the logging \param statID the statistic ID of the statistic within the logger for which this log line descriptor applies \param logLineDescriptor the log line descriptor to add */ static void addLogLineDescriptor( uint64_t loggerID, uint64_t statID, LogLineDescriptor* logLineDescriptor); /// Destructor virtual ~StatWriter(); /// Register a StatLogger with this stat writer /** Called by StatLoggers at construction time. \return the unique ID of the registrant that it will use to identify its containers */ uint64_t registerStatLogger(); /// Set the phase name associated with logged data /** \param phaseName the phase name to associate with all statistics logged in the future */ void setPhaseName(const std::string& phaseName); /// Set the epoch number associated with logged data /** \param epoch the number to associate with all statistics logged in the future */ void setEpoch(uint64_t epoch); /// Stop the stat writing thread and join on the thread that was spawned by a /// previous call to StatWriter::spawnThread void teardownThread(); private: typedef std::list<LogDataContainer*> LogDataContainerList; typedef std::map< std::pair<uint64_t, uint64_t>, LogLineDescriptor* > LogLineDescriptorMap; /// Constructor /** \param params a Params object containing parameter information that StatWriter will use to initialize itself. */ StatWriter(Params& params); void* thread(void* args); void safeMutexInit(pthread_mutex_t& mutex); void safeMutexDestroy(pthread_mutex_t& mutex); void drainLogDataContainerQueue(); /// Add a stat container to this writer /** This writer is responsible for garbage-collecting the container. \param statContainer the container to add */ void addStatContainerInternal(StatContainerInterface* statContainer); /// Add a log data container to this writer /** This writer is responsible for garbage-collecting the container. \param logDataContainer the container to add */ void addLogDataContainerInternal(LogDataContainer* logDataContainer); /// Add a log line descriptor to this writer /** \param loggerID the unique ID of the stat logger that is doing the logging \param statID the statistic ID of the statistic within the logger for which this log line descriptor applies \param logLineDescriptor the log line descriptor to add */ void addLogLineDescriptorInternal( uint64_t loggerID, uint64_t statID, LogLineDescriptor* logLineDescriptor); static pthread_mutex_t singletonWriterLock; static StatWriter* singletonWriter; // StatLoggers are assigned unique IDs starting from 1. The ID 0 is assigned // to all loggers that attempt to register with a nonexistent singleton // StatWriter pthread_mutex_t nextStatLoggerIDLock; uint64_t nextStatLoggerID; ThreadSafeQueue<StatContainerInterface*> statContainerQueue; ThreadSafeQueue<LogDataContainer*> logDataContainerQueue; pthread_mutex_t logLineDescriptorMapLock; LogLineDescriptorMap logLineDescriptorMap; const Params& params; pthread_mutex_t phaseAndEpochLock; pthread_cond_t phaseAndEpochChanged; std::string currentPhaseName; std::string* nextPhaseName; uint64_t currentEpoch; uint64_t* nextEpoch; pthread_mutex_t runningWriterStateLock; bool stopWriter; bool writerRunning; File* logFile; File* descriptorsFile; std::set<Json::Value> logLineDescriptionSet; }; #endif // TRITONSORT_STAT_WRITER_H
29.023041
79
0.74611
36fa1e0c4c7cb1a017169ce208b9f04df71078dc
9,003
h
C
usr/libexec/profiled/MCInstaller.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
5
2021-04-29T04:31:43.000Z
2021-08-19T18:59:58.000Z
usr/libexec/profiled/MCInstaller.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
null
null
null
usr/libexec/profiled/MCInstaller.h
lechium/tvOS145Headers
9940da19adb0017f8037853e9cfccbe01b290dd5
[ "MIT" ]
1
2022-03-19T11:16:23.000Z
2022-03-19T11:16:23.000Z
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <ManagedConfiguration/MCInstallerReader.h> #import "MCInteractionClientDelegate-Protocol.h" @class NSDictionary, NSMutableArray, NSMutableDictionary, NSObject; @protocol OS_dispatch_queue; @interface MCInstaller : MCInstallerReader <MCInteractionClientDelegate> { NSMutableArray *_queuedProfiles; // 8 = 0x8 NSMutableArray *_queuedProvisioningProfiles; // 16 = 0x10 NSObject<OS_dispatch_queue> *_purgatoryWorkerQueue; // 24 = 0x18 NSDictionary *_currentlyInstallingRestrictions; // 32 = 0x20 NSMutableDictionary *_setAsideAccountIdentifiersByPayloadClass; // 40 = 0x28 NSMutableDictionary *_setAsideDictionariesByPayloadClass; // 48 = 0x30 } + (void)_enumerateProfilesWithCriteria:(CDUnknownBlockType)arg1 filterFlags:(int)arg2 block:(CDUnknownBlockType)arg3; // IMP=0x00000001000504d8 + (void)considerProfilesInstalledDuringBuddyForManagement; // IMP=0x000000010004ff38 + (id)_installationFailureErrorWithUnderlyingError:(id)arg1; // IMP=0x000000010004fc84 + (void)_setPathsSystemProfileStorageDirectory:(id)arg1 userProfileStorageDirectory:(id)arg2; // IMP=0x000000010004fc14 + (unsigned long long)targetDeviceTypeForCurrentDevice; // IMP=0x000000010004b638 + (id)notInstalledByMDMError; // IMP=0x000000010004628c + (id)deviceIsSupervisedError; // IMP=0x00000001000461dc + (id)deviceNotSupervisedError; // IMP=0x000000010004612c + (id)sharedInstaller; // IMP=0x0000000100042f58 - (void).cxx_destruct; // IMP=0x0000000100050e90 @property(retain, nonatomic) NSMutableDictionary *setAsideDictionariesByPayloadClass; // @synthesize setAsideDictionariesByPayloadClass=_setAsideDictionariesByPayloadClass; @property(retain, nonatomic) NSMutableDictionary *setAsideAccountIdentifiersByPayloadClass; // @synthesize setAsideAccountIdentifiersByPayloadClass=_setAsideAccountIdentifiersByPayloadClass; - (id)peekProfileDataFromPurgatoryForDeviceType:(unsigned long long)arg1; // IMP=0x0000000100050d74 - (void)_purgatoryWorkerQueue_resetProfilePurgatorySettingsAndPostProfileListChangedNotification:(_Bool)arg1; // IMP=0x0000000100050d68 - (void)purgeProfileWithIdentifier:(id)arg1 FromPurgatoryForTargetDeviceType:(unsigned long long)arg2; // IMP=0x0000000100050b70 - (void)purgeProfilesFromPurgatoryForTargetDeviceType:(unsigned long long)arg1; // IMP=0x0000000100050958 - (_Bool)sendProfileData:(id)arg1 withIdentifier:(id)arg2 toPurgatoryForTargetDeviceType:(unsigned long long)arg3 outError:(id *)arg4; // IMP=0x0000000100050704 - (id)_installedProfileWithIdentifier:(id)arg1 installationType:(long long)arg2; // IMP=0x000000010004fd2c - (void)recomputeProfileRestrictionsWithCompletionBlock:(CDUnknownBlockType)arg1; // IMP=0x000000010004f358 - (void)_addProfileEventForProfile:(id)arg1 operation:(id)arg2 source:(id)arg3; // IMP=0x000000010004f048 - (id)_profileEventsOnDisk; // IMP=0x000000010004ef80 - (id)_senderIDFromProfile:(id)arg1; // IMP=0x000000010004eec8 - (void)cleanUp; // IMP=0x000000010004ea58 - (void)removeManagedProfilesIfNecessary; // IMP=0x000000010004e950 - (void)removeUninstalledProfileWithIdentifier:(id)arg1 installationType:(long long)arg2 targetDeviceType:(unsigned long long)arg3; // IMP=0x000000010004e918 - (void)removeProfileWithIdentifier:(id)arg1 installationType:(long long)arg2 options:(id)arg3 source:(id)arg4; // IMP=0x000000010004e608 - (void)removeProfileWithIdentifier:(id)arg1 installationType:(long long)arg2 source:(id)arg3; // IMP=0x000000010004e5f4 - (void)_cleanUpAfterRemovingProfileWithIdentifier:(id)arg1 installedForUser:(_Bool)arg2 profileHandler:(id)arg3 oldRestrictions:(id)arg4; // IMP=0x000000010004e090 - (id)_reallyRemoveProfileWithIdentifier:(id)arg1 installationType:(long long)arg2 profileInstalled:(_Bool)arg3 targetDeviceType:(unsigned long long)arg4 options:(id)arg5 source:(id)arg6; // IMP=0x000000010004d8cc - (void)removeAllProfilesFromInstallationQueue; // IMP=0x000000010004d884 - (id)_managingProfileIdentifierForProfileIdentifier:(id)arg1; // IMP=0x000000010004d7b0 - (void)_removeOrphanedResourcesIncludingAccounts:(_Bool)arg1; // IMP=0x000000010004cb54 - (_Bool)interactionClient:(id)arg1 didRequestPreflightUserInputResponses:(id)arg2 forPayloadIndex:(unsigned long long)arg3 outError:(id *)arg4; // IMP=0x000000010004c95c - (id)updateProfileWithIdentifier:(id)arg1 interactionClient:(id)arg2 installForSystem:(_Bool)arg3 source:(id)arg4 outError:(id *)arg5; // IMP=0x000000010004c0ac - (id)updateProfileWithIdentifier:(id)arg1 interactionClient:(id)arg2 source:(id)arg3 outError:(id *)arg4; // IMP=0x000000010004c094 - (id)_profileNotEligibleErrorWithProfile:(id)arg1; // IMP=0x000000010004bfd8 - (id)_watchInformationOutIsCellularSupported:(_Bool *)arg1; // IMP=0x000000010004bfd0 - (id)_preflightProfileForInstallationOnWatch:(id)arg1; // IMP=0x000000010004ba4c - (id)_preflightProfileForInstallationOnHomePod:(id)arg1; // IMP=0x000000010004b778 - (id)_errorUnacceptablePayload:(id)arg1; // IMP=0x000000010004b6bc - (_Bool)_overrideProfileValidation; // IMP=0x000000010004b658 - (id)installProfileData:(id)arg1 options:(id)arg2 interactionClient:(id)arg3 source:(id)arg4 outError:(id *)arg5; // IMP=0x00000001000495a8 - (id)existingProfileContainingPayloadClass:(Class)arg1 inProfilesWithFilterFlags:(int)arg2 excludingProfileIdentifier:(id)arg3; // IMP=0x00000001000493bc - (id)existingProfileContainingPayloadClass:(Class)arg1 excludingProfileIdentifier:(id)arg2; // IMP=0x00000001000493a8 - (_Bool)_showWarnings:(id)arg1 interactionClient:(id)arg2 outError:(id *)arg3; // IMP=0x00000001000492d4 - (_Bool)_showWarningsForUpdatingProfile:(id)arg1 originalProfile:(id)arg2 interactionClient:(id)arg3 outError:(id *)arg4; // IMP=0x00000001000491d8 - (_Bool)_showWarningsForProfile:(id)arg1 interactionClient:(id)arg2 outError:(id *)arg3; // IMP=0x0000000100049144 - (id)setAsideDictionariesForPayloadHandlerClass:(Class)arg1; // IMP=0x00000001000490e0 - (void)addSetAsideDictionary:(id)arg1 forPayloadHandlerClass:(Class)arg2; // IMP=0x0000000100049004 - (id)setAsideAccountIdentifiersForPayloadClass:(Class)arg1; // IMP=0x0000000100048f60 - (void)addSetAsideAccountIdentifier:(id)arg1 forPayloadClass:(Class)arg2; // IMP=0x0000000100048e4c - (_Bool)deviceSupervisionRequiredForPayload:(id)arg1; // IMP=0x0000000100048c94 - (id)_installProfileHandler:(id)arg1 options:(id)arg2 interactionClient:(id)arg3 source:(id)arg4 outError:(id *)arg5; // IMP=0x0000000100046324 - (id)_deviceLockedError; // IMP=0x0000000100046094 - (id)_guardAgainstNoMDMPayloadWithNewProfile:(id)arg1 oldProfile:(id)arg2; // IMP=0x0000000100045f1c - (id)_validateMDMReplacementNewProfile:(id)arg1 oldProfile:(id)arg2 client:(id)arg3; // IMP=0x0000000100045ae4 - (_Bool)_promptUserForMAIDSignIn:(id)arg1 personaID:(id)arg2 handler:(id)arg3 interactionClient:(id)arg4 outError:(id *)arg5; // IMP=0x00000001000459e0 - (_Bool)_promptUserForComplianceWithRestrictions:(id)arg1 handler:(id)arg2 interactionClient:(id)arg3 outError:(id *)arg4; // IMP=0x00000001000451a8 - (id)_userCancelledErrorWithFriendlyName:(id)arg1; // IMP=0x0000000100045110 - (id)_invalidInputError; // IMP=0x0000000100045078 - (id)_installationHaltedTopLevelError; // IMP=0x0000000100044f60 - (id)_uiProfileInstallationDisabledTopLevelError; // IMP=0x0000000100044ec8 - (id)_targetDeviceMismatchError; // IMP=0x0000000100044e30 - (id)_targetDeviceInvalidError; // IMP=0x0000000100044d98 - (id)_targetDeviceArchivedError; // IMP=0x0000000100044d00 - (id)_targetDeviceUnavailableError; // IMP=0x0000000100044c68 - (id)_targetDeviceErrorWithUnderlyingError:(id)arg1; // IMP=0x0000000100044bb8 - (id)_malformedPayloadErrorWithUnderlyingError:(id)arg1; // IMP=0x0000000100044b08 - (id)_malformedPayloadErrorInternal:(_Bool)arg1; // IMP=0x0000000100044a54 - (id)_queueProfileData:(id)arg1 profile:(id)arg2 forDevice:(unsigned long long)arg3; // IMP=0x00000001000444f4 - (long long)_targetValidationStatusForProfile:(id)arg1; // IMP=0x00000001000443d0 - (void)queueProfileDataForInstallation:(id)arg1 originalFileName:(id)arg2 completion:(CDUnknownBlockType)arg3; // IMP=0x0000000100043978 - (id)popProvisioningProfileDataAtHeadOfInstallationQueue; // IMP=0x00000001000438f8 - (_Bool)queueProvisioningProfileDataForInstallation:(id)arg1 outError:(id *)arg2; // IMP=0x0000000100043794 - (id)_badProvisioningProfileError; // IMP=0x00000001000436fc - (id)popProfileDataAtHeadOfInstallationQueue; // IMP=0x000000010004367c - (id)pathToInstalledProfileByUUID:(id)arg1; // IMP=0x00000001000432f4 - (id)pathToUninstalledProfileByIdentifier:(id)arg1 installationType:(long long)arg2 targetDeviceType:(unsigned long long)arg3; // IMP=0x00000001000431fc - (id)pathToInstalledProfileByIdentifier:(id)arg1 installationType:(long long)arg2; // IMP=0x00000001000430dc - (id)identifiersOfInstalledProfilesWithFilterFlags:(int)arg1; // IMP=0x0000000100043078 - (id)init; // IMP=0x0000000100042fc4 @end
83.361111
213
0.820615
82daebe43521cc0fe7a597880f3a97c114f6eb8d
1,402
c
C
ports/newlib/newlib-2.5.0.20171222/newlib/libc/machine/microblaze/abort.c
codyd51/axle
2547432215c0e53e25bf47df5c7f9cce4d7ef4cb
[ "MIT" ]
453
2016-07-29T23:26:30.000Z
2022-02-21T01:09:13.000Z
ports/newlib/newlib-2.5.0.20171222/newlib/libc/machine/microblaze/abort.c
codyd51/axle
2547432215c0e53e25bf47df5c7f9cce4d7ef4cb
[ "MIT" ]
22
2016-07-31T23:24:56.000Z
2022-01-09T00:15:45.000Z
ports/newlib/newlib-2.5.0.20171222/newlib/libc/machine/microblaze/abort.c
codyd51/axle
2547432215c0e53e25bf47df5c7f9cce4d7ef4cb
[ "MIT" ]
57
2016-07-29T23:34:09.000Z
2021-07-13T18:17:02.000Z
/* NetWare can not use this implementation of abort. It provides its own version of abort in clib.nlm. If we can not use clib.nlm, then we must write abort in sys/netware. */ #ifdef ABORT_PROVIDED int _dummy_abort = 1; #else /* FUNCTION <<abort>>---abnormal termination of a program INDEX abort SYNOPSIS #include <stdlib.h> void abort(void); DESCRIPTION Use <<abort>> to signal that your program has detected a condition it cannot deal with. Normally, <<abort>> ends your program's execution. Before terminating your program, <<abort>> raises the exception <<SIGABRT>> (using `<<raise(SIGABRT)>>'). If you have used <<signal>> to register an exception handler for this condition, that handler has the opportunity to retain control, thereby avoiding program termination. In this implementation, <<abort>> does not perform any stream- or file-related cleanup (the host environment may do so; if not, you can arrange for your program to do its own cleanup with a <<SIGABRT>> exception handler). RETURNS <<abort>> does not return to its caller. PORTABILITY ANSI C requires <<abort>>. Supporting OS subroutines required: <<_exit>> and optionally, <<write>>. */ #include <stdlib.h> #include <unistd.h> #include <signal.h> _VOID _DEFUN_VOID (abort) { #ifdef ABORT_MESSAGE write (2, "Abort called\n", sizeof ("Abort called\n")-1); #endif while (1) { exit(1); } }
22.983607
75
0.721826
d0d37731bdd254a637dfcd6408f83cb55abf4ed4
5,253
c
C
components/wpa_supplicant/esp_supplicant/src/esp_hostap.c
BU-EC444/esp-idf
5963de1caf284b14ddfed11e52730a55e3783a3d
[ "Apache-2.0" ]
4
2022-03-15T22:43:28.000Z
2022-03-28T01:25:08.000Z
components/wpa_supplicant/esp_supplicant/src/esp_hostap.c
BU-EC444/esp-idf
5963de1caf284b14ddfed11e52730a55e3783a3d
[ "Apache-2.0" ]
null
null
null
components/wpa_supplicant/esp_supplicant/src/esp_hostap.c
BU-EC444/esp-idf
5963de1caf284b14ddfed11e52730a55e3783a3d
[ "Apache-2.0" ]
2
2022-02-04T21:36:58.000Z
2022-02-09T12:22:48.000Z
/* * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ #include "utils/includes.h" #include "utils/common.h" #include "crypto/sha1.h" #include "common/ieee802_11_defs.h" #include "common/eapol_common.h" #include "ap/wpa_auth.h" #include "ap/ap_config.h" #include "utils/wpa_debug.h" #include "ap/hostapd.h" #include "ap/wpa_auth_i.h" #include "esp_wifi_driver.h" #include "esp_wifi_types.h" void *hostap_init(void) { struct wifi_ssid *ssid = esp_wifi_ap_get_prof_ap_ssid_internal(); struct hostapd_data *hapd = NULL; struct wpa_auth_config *auth_conf; u8 mac[6]; u16 spp_attrubute = 0; u8 pairwise_cipher; wifi_pmf_config_t pmf_cfg; hapd = (struct hostapd_data *)os_zalloc(sizeof(struct hostapd_data)); if (hapd == NULL) { return NULL; } hapd->conf = (struct hostapd_bss_config *)os_zalloc(sizeof(struct hostapd_bss_config)); if (hapd->conf == NULL) { os_free(hapd); return NULL; } auth_conf = (struct wpa_auth_config *)os_zalloc(sizeof(struct wpa_auth_config)); if (auth_conf == NULL) { os_free(hapd->conf); os_free(hapd); hapd = NULL; return NULL; } if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA_PSK) { auth_conf->wpa = WPA_PROTO_WPA; } if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA2_PSK) { auth_conf->wpa = WPA_PROTO_RSN; } if (esp_wifi_ap_get_prof_authmode_internal() == WIFI_AUTH_WPA_WPA2_PSK) { auth_conf->wpa = WPA_PROTO_RSN | WPA_PROTO_WPA; } pairwise_cipher = esp_wifi_ap_get_prof_pairwise_cipher_internal(); #ifdef CONFIG_IEEE80211W esp_wifi_get_pmf_config_internal(&pmf_cfg, WIFI_IF_AP); if (pmf_cfg.required) { pairwise_cipher = WIFI_CIPHER_TYPE_CCMP; } #endif /* CONFIG_IEEE80211W */ /* TKIP is compulsory in WPA Mode */ if (auth_conf->wpa == WPA_PROTO_WPA && pairwise_cipher == WIFI_CIPHER_TYPE_CCMP) { pairwise_cipher = WIFI_CIPHER_TYPE_TKIP_CCMP; } if (pairwise_cipher == WIFI_CIPHER_TYPE_TKIP) { auth_conf->wpa_group = WPA_CIPHER_TKIP; auth_conf->wpa_pairwise = WPA_CIPHER_TKIP; auth_conf->rsn_pairwise = WPA_CIPHER_TKIP; } else if (pairwise_cipher == WIFI_CIPHER_TYPE_CCMP) { auth_conf->wpa_group = WPA_CIPHER_CCMP; auth_conf->wpa_pairwise = WPA_CIPHER_CCMP; auth_conf->rsn_pairwise = WPA_CIPHER_CCMP; } else { auth_conf->wpa_group = WPA_CIPHER_TKIP; auth_conf->wpa_pairwise = WPA_CIPHER_CCMP | WPA_CIPHER_TKIP; auth_conf->rsn_pairwise = WPA_CIPHER_CCMP | WPA_CIPHER_TKIP; } auth_conf->wpa_key_mgmt = WPA_KEY_MGMT_PSK; auth_conf->eapol_version = EAPOL_VERSION; #ifdef CONFIG_IEEE80211W if (pmf_cfg.required && pmf_cfg.capable) { auth_conf->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED; auth_conf->wpa_key_mgmt = WPA_KEY_MGMT_PSK_SHA256; wpa_printf(MSG_DEBUG, "%s :pmf required", __func__); } else if (pmf_cfg.capable && !pmf_cfg.required) { auth_conf->ieee80211w = MGMT_FRAME_PROTECTION_OPTIONAL; auth_conf->wpa_key_mgmt = WPA_KEY_MGMT_PSK; wpa_printf(MSG_DEBUG, "%s : pmf optional", __func__); } #endif /* CONFIG_IEEE80211W */ spp_attrubute = esp_wifi_get_spp_attrubute_internal(WIFI_IF_AP); auth_conf->spp_sup.capable = ((spp_attrubute & WPA_CAPABILITY_SPP_CAPABLE) ? SPP_AMSDU_CAP_ENABLE : SPP_AMSDU_CAP_DISABLE); auth_conf->spp_sup.require = ((spp_attrubute & WPA_CAPABILITY_SPP_REQUIRED) ? SPP_AMSDU_REQ_ENABLE : SPP_AMSDU_REQ_DISABLE); memcpy(hapd->conf->ssid.ssid, ssid->ssid, ssid->len); hapd->conf->ssid.ssid_len = ssid->len; hapd->conf->ssid.wpa_passphrase = (char *)os_zalloc(64); if (hapd->conf->ssid.wpa_passphrase == NULL) { os_free(auth_conf); os_free(hapd->conf); os_free(hapd); hapd = NULL; return NULL; } memcpy(hapd->conf->ssid.wpa_passphrase, esp_wifi_ap_get_prof_password_internal(), strlen((char *)esp_wifi_ap_get_prof_password_internal())); hapd->conf->ap_max_inactivity = 5 * 60; hostapd_setup_wpa_psk(hapd->conf); esp_wifi_get_macaddr_internal(WIFI_IF_AP, mac); hapd->wpa_auth = wpa_init(mac, auth_conf, NULL); esp_wifi_set_appie_internal(WIFI_APPIE_WPA, hapd->wpa_auth->wpa_ie, (uint16_t)hapd->wpa_auth->wpa_ie_len, 0); os_free(auth_conf); return (void *)hapd; } bool hostap_deinit(void *data) { struct hostapd_data *hapd = (struct hostapd_data *)data; if (hapd == NULL) { return true; } if (hapd->wpa_auth != NULL) { if (hapd->wpa_auth->wpa_ie != NULL) { os_free(hapd->wpa_auth->wpa_ie); } if (hapd->wpa_auth->group != NULL) { os_free(hapd->wpa_auth->group); } os_free(hapd->wpa_auth); } if (hapd->conf != NULL) { if (hapd->conf->ssid.wpa_psk != NULL) { os_free(hapd->conf->ssid.wpa_psk); } if (hapd->conf->ssid.wpa_passphrase != NULL) { os_free(hapd->conf->ssid.wpa_passphrase); } os_free(hapd->conf); } os_free(hapd); esp_wifi_unset_appie_internal(WIFI_APPIE_WPA); return true; }
31.45509
144
0.680754
aac9af088de3ad343bab0914d84ef94a65d674f2
17,498
c
C
source/blender/draw/intern/draw_common.c
undefinedroot/blender
6f34467f8775ea25dbaec905abca970cf2a2a375
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
source/blender/draw/intern/draw_common.c
undefinedroot/blender
6f34467f8775ea25dbaec905abca970cf2a2a375
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
source/blender/draw/intern/draw_common.c
undefinedroot/blender
6f34467f8775ea25dbaec905abca970cf2a2a375
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-12-02T20:05:42.000Z
2020-12-02T20:05:42.000Z
/* * 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. * * Copyright 2016, Blender Foundation. */ /** \file * \ingroup draw */ #include "DRW_render.h" #include "GPU_matrix.h" #include "GPU_shader.h" #include "GPU_texture.h" #include "UI_resources.h" #include "BKE_colorband.h" #include "BKE_global.h" #include "BKE_object.h" #include "draw_common.h" #if 0 # define UI_COLOR_RGB_FROM_U8(r, g, b, v4) \ ARRAY_SET_ITEMS(v4, (float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, 1.0) #endif #define UI_COLOR_RGBA_FROM_U8(r, g, b, a, v4) \ ARRAY_SET_ITEMS(v4, (float)r / 255.0f, (float)g / 255.0f, (float)b / 255.0f, (float)a / 255.0f) /* Colors & Constant */ struct DRW_Global G_draw = {{{0}}}; static bool weight_ramp_custom = false; static ColorBand weight_ramp_copy; static struct GPUTexture *DRW_create_weight_colorramp_texture(void); void DRW_globals_update(void) { GlobalsUboStorage *gb = &G_draw.block; UI_GetThemeColor4fv(TH_WIRE, gb->colorWire); UI_GetThemeColor4fv(TH_WIRE_EDIT, gb->colorWireEdit); UI_GetThemeColor4fv(TH_ACTIVE, gb->colorActive); UI_GetThemeColor4fv(TH_SELECT, gb->colorSelect); UI_COLOR_RGBA_FROM_U8(0x88, 0xFF, 0xFF, 155, gb->colorLibrarySelect); UI_COLOR_RGBA_FROM_U8(0x55, 0xCC, 0xCC, 155, gb->colorLibrary); UI_GetThemeColor4fv(TH_TRANSFORM, gb->colorTransform); UI_GetThemeColor4fv(TH_LIGHT, gb->colorLight); UI_GetThemeColor4fv(TH_SPEAKER, gb->colorSpeaker); UI_GetThemeColor4fv(TH_CAMERA, gb->colorCamera); UI_GetThemeColor4fv(TH_CAMERA_PATH, gb->colorCameraPath); UI_GetThemeColor4fv(TH_EMPTY, gb->colorEmpty); UI_GetThemeColor4fv(TH_VERTEX, gb->colorVertex); UI_GetThemeColor4fv(TH_VERTEX_SELECT, gb->colorVertexSelect); UI_GetThemeColor4fv(TH_VERTEX_UNREFERENCED, gb->colorVertexUnreferenced); UI_COLOR_RGBA_FROM_U8(0xB0, 0x00, 0xB0, 0xFF, gb->colorVertexMissingData); UI_GetThemeColor4fv(TH_EDITMESH_ACTIVE, gb->colorEditMeshActive); UI_GetThemeColor4fv(TH_EDGE_SELECT, gb->colorEdgeSelect); UI_GetThemeColor4fv(TH_GP_VERTEX, gb->colorGpencilVertex); UI_GetThemeColor4fv(TH_GP_VERTEX_SELECT, gb->colorGpencilVertexSelect); UI_GetThemeColor4fv(TH_EDGE_SEAM, gb->colorEdgeSeam); UI_GetThemeColor4fv(TH_EDGE_SHARP, gb->colorEdgeSharp); UI_GetThemeColor4fv(TH_EDGE_CREASE, gb->colorEdgeCrease); UI_GetThemeColor4fv(TH_EDGE_BEVEL, gb->colorEdgeBWeight); UI_GetThemeColor4fv(TH_EDGE_FACESEL, gb->colorEdgeFaceSelect); UI_GetThemeColor4fv(TH_FACE, gb->colorFace); UI_GetThemeColor4fv(TH_FACE_SELECT, gb->colorFaceSelect); UI_GetThemeColor4fv(TH_FACE_BACK, gb->colorFaceBack); UI_GetThemeColor4fv(TH_FACE_FRONT, gb->colorFaceFront); UI_GetThemeColor4fv(TH_NORMAL, gb->colorNormal); UI_GetThemeColor4fv(TH_VNORMAL, gb->colorVNormal); UI_GetThemeColor4fv(TH_LNORMAL, gb->colorLNormal); UI_GetThemeColor4fv(TH_FACE_DOT, gb->colorFaceDot); UI_GetThemeColor4fv(TH_SKIN_ROOT, gb->colorSkinRoot); UI_GetThemeColor4fv(TH_BACK, gb->colorBackground); UI_GetThemeColor4fv(TH_BACK_GRAD, gb->colorBackgroundGradient); UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_PRIMARY, gb->colorCheckerPrimary); UI_GetThemeColor4fv(TH_TRANSPARENT_CHECKER_SECONDARY, gb->colorCheckerSecondary); gb->sizeChecker = UI_GetThemeValuef(TH_TRANSPARENT_CHECKER_SIZE); UI_GetThemeColor4fv(TH_V3D_CLIPPING_BORDER, gb->colorClippingBorder); /* Custom median color to slightly affect the edit mesh colors. */ interp_v4_v4v4(gb->colorEditMeshMiddle, gb->colorVertexSelect, gb->colorWireEdit, 0.35f); copy_v3_fl( gb->colorEditMeshMiddle, dot_v3v3(gb->colorEditMeshMiddle, (float[3]){0.3333f, 0.3333f, 0.3333f})); /* Desaturate */ interp_v4_v4v4(gb->colorDupliSelect, gb->colorBackground, gb->colorSelect, 0.5f); /* Was 50% in 2.7x since the background was lighter making it easier to tell the color from * black, with a darker background we need a more faded color. */ interp_v4_v4v4(gb->colorDupli, gb->colorBackground, gb->colorWire, 0.3f); #ifdef WITH_FREESTYLE UI_GetThemeColor4fv(TH_FREESTYLE_EDGE_MARK, gb->colorEdgeFreestyle); UI_GetThemeColor4fv(TH_FREESTYLE_FACE_MARK, gb->colorFaceFreestyle); #else zero_v4(gb->colorEdgeFreestyle); zero_v4(gb->colorFaceFreestyle); #endif UI_GetThemeColor4fv(TH_TEXT, gb->colorText); UI_GetThemeColor4fv(TH_TEXT_HI, gb->colorTextHi); /* Bone colors */ UI_GetThemeColor4fv(TH_BONE_POSE, gb->colorBonePose); UI_GetThemeColor4fv(TH_BONE_POSE_ACTIVE, gb->colorBonePoseActive); UI_GetThemeColorShade4fv(TH_EDGE_SELECT, 60, gb->colorBoneActive); UI_GetThemeColorShade4fv(TH_EDGE_SELECT, -20, gb->colorBoneSelect); UI_GetThemeColorBlendShade4fv(TH_WIRE, TH_BONE_POSE, 0.15f, 0, gb->colorBonePoseActiveUnsel); UI_GetThemeColorBlendShade3fv(TH_WIRE_EDIT, TH_EDGE_SELECT, 0.15f, 0, gb->colorBoneActiveUnsel); UI_COLOR_RGBA_FROM_U8(255, 150, 0, 80, gb->colorBonePoseTarget); UI_COLOR_RGBA_FROM_U8(255, 255, 0, 80, gb->colorBonePoseIK); UI_COLOR_RGBA_FROM_U8(200, 255, 0, 80, gb->colorBonePoseSplineIK); UI_COLOR_RGBA_FROM_U8(0, 255, 120, 80, gb->colorBonePoseConstraint); UI_GetThemeColor4fv(TH_BONE_SOLID, gb->colorBoneSolid); UI_GetThemeColor4fv(TH_BONE_LOCKED_WEIGHT, gb->colorBoneLocked); copy_v4_fl4(gb->colorBoneIKLine, 0.8f, 0.5f, 0.0f, 1.0f); copy_v4_fl4(gb->colorBoneIKLineNoTarget, 0.8f, 0.8f, 0.2f, 1.0f); copy_v4_fl4(gb->colorBoneIKLineSpline, 0.8f, 0.8f, 0.2f, 1.0f); /* Curve */ UI_GetThemeColor4fv(TH_HANDLE_FREE, gb->colorHandleFree); UI_GetThemeColor4fv(TH_HANDLE_AUTO, gb->colorHandleAuto); UI_GetThemeColor4fv(TH_HANDLE_VECT, gb->colorHandleVect); UI_GetThemeColor4fv(TH_HANDLE_ALIGN, gb->colorHandleAlign); UI_GetThemeColor4fv(TH_HANDLE_AUTOCLAMP, gb->colorHandleAutoclamp); UI_GetThemeColor4fv(TH_HANDLE_SEL_FREE, gb->colorHandleSelFree); UI_GetThemeColor4fv(TH_HANDLE_SEL_AUTO, gb->colorHandleSelAuto); UI_GetThemeColor4fv(TH_HANDLE_SEL_VECT, gb->colorHandleSelVect); UI_GetThemeColor4fv(TH_HANDLE_SEL_ALIGN, gb->colorHandleSelAlign); UI_GetThemeColor4fv(TH_HANDLE_SEL_AUTOCLAMP, gb->colorHandleSelAutoclamp); UI_GetThemeColor4fv(TH_NURB_ULINE, gb->colorNurbUline); UI_GetThemeColor4fv(TH_NURB_VLINE, gb->colorNurbVline); UI_GetThemeColor4fv(TH_NURB_SEL_ULINE, gb->colorNurbSelUline); UI_GetThemeColor4fv(TH_NURB_SEL_VLINE, gb->colorNurbSelVline); UI_GetThemeColor4fv(TH_ACTIVE_SPLINE, gb->colorActiveSpline); UI_GetThemeColor4fv(TH_CFRAME, gb->colorCurrentFrame); /* Metaball */ UI_COLOR_RGBA_FROM_U8(0xA0, 0x30, 0x30, 0xFF, gb->colorMballRadius); UI_COLOR_RGBA_FROM_U8(0xF0, 0xA0, 0xA0, 0xFF, gb->colorMballRadiusSelect); UI_COLOR_RGBA_FROM_U8(0x30, 0xA0, 0x30, 0xFF, gb->colorMballStiffness); UI_COLOR_RGBA_FROM_U8(0xA0, 0xF0, 0xA0, 0xFF, gb->colorMballStiffnessSelect); /* Grid */ UI_GetThemeColorShade4fv(TH_GRID, 10, gb->colorGrid); /* emphasise division lines lighter instead of darker, if background is darker than grid */ UI_GetThemeColorShade4fv( TH_GRID, (gb->colorGrid[0] + gb->colorGrid[1] + gb->colorGrid[2] + 0.12f > gb->colorBackground[0] + gb->colorBackground[1] + gb->colorBackground[2]) ? 20 : -10, gb->colorGridEmphasise); /* Grid Axis */ UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_X, 0.5f, -10, gb->colorGridAxisX); UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Y, 0.5f, -10, gb->colorGridAxisY); UI_GetThemeColorBlendShade4fv(TH_GRID, TH_AXIS_Z, 0.5f, -10, gb->colorGridAxisZ); UI_GetThemeColorShadeAlpha4fv(TH_TRANSFORM, 0, -80, gb->colorDeselect); UI_GetThemeColorShadeAlpha4fv(TH_WIRE, 0, -30, gb->colorOutline); UI_GetThemeColorShadeAlpha4fv(TH_LIGHT, 0, 255, gb->colorLightNoAlpha); gb->sizePixel = U.pixelsize; gb->sizeObjectCenter = (UI_GetThemeValuef(TH_OBCENTER_DIA) + 1.0f) * U.pixelsize; gb->sizeLightCenter = (UI_GetThemeValuef(TH_OBCENTER_DIA) + 1.5f) * U.pixelsize; gb->sizeLightCircle = U.pixelsize * 9.0f; gb->sizeLightCircleShadow = gb->sizeLightCircle + U.pixelsize * 3.0f; /* M_SQRT2 to be at least the same size of the old square */ gb->sizeVertex = U.pixelsize * (max_ff(1.0f, UI_GetThemeValuef(TH_VERTEX_SIZE) * (float)M_SQRT2 / 2.0f)); gb->sizeVertexGpencil = U.pixelsize * UI_GetThemeValuef(TH_GP_VERTEX_SIZE); gb->sizeFaceDot = U.pixelsize * UI_GetThemeValuef(TH_FACEDOT_SIZE); gb->sizeEdge = U.pixelsize * (1.0f / 2.0f); /* TODO Theme */ gb->sizeEdgeFix = U.pixelsize * (0.5f + 2.0f * (2.0f * (gb->sizeEdge * (float)M_SQRT1_2))); const float(*screen_vecs)[3] = (float(*)[3])DRW_viewport_screenvecs_get(); for (int i = 0; i < 2; i++) { copy_v3_v3(gb->screenVecs[i], screen_vecs[i]); } gb->pixelFac = *DRW_viewport_pixelsize_get(); copy_v2_v2(gb->sizeViewport, DRW_viewport_size_get()); copy_v2_v2(gb->sizeViewportInv, gb->sizeViewport); invert_v2(gb->sizeViewportInv); /* Color management. */ { float *color = gb->UBO_FIRST_COLOR; do { /* TODO more accurate transform. */ srgb_to_linearrgb_v4(color, color); color += 4; } while (color != gb->UBO_LAST_COLOR); } if (G_draw.block_ubo == NULL) { G_draw.block_ubo = DRW_uniformbuffer_create(sizeof(GlobalsUboStorage), gb); } DRW_uniformbuffer_update(G_draw.block_ubo, gb); if (!G_draw.ramp) { ColorBand ramp = {0}; float *colors; int col_size; ramp.tot = 3; ramp.data[0].a = 1.0f; ramp.data[0].b = 1.0f; ramp.data[0].pos = 0.0f; ramp.data[1].a = 1.0f; ramp.data[1].g = 1.0f; ramp.data[1].pos = 0.5f; ramp.data[2].a = 1.0f; ramp.data[2].r = 1.0f; ramp.data[2].pos = 1.0f; BKE_colorband_evaluate_table_rgba(&ramp, &colors, &col_size); G_draw.ramp = GPU_texture_create_1d(col_size, GPU_RGBA8, colors, NULL); MEM_freeN(colors); } /* Weight Painting color ramp texture */ bool user_weight_ramp = (U.flag & USER_CUSTOM_RANGE) != 0; if (weight_ramp_custom != user_weight_ramp || (user_weight_ramp && memcmp(&weight_ramp_copy, &U.coba_weight, sizeof(ColorBand)) != 0)) { DRW_TEXTURE_FREE_SAFE(G_draw.weight_ramp); } if (G_draw.weight_ramp == NULL) { weight_ramp_custom = user_weight_ramp; memcpy(&weight_ramp_copy, &U.coba_weight, sizeof(ColorBand)); G_draw.weight_ramp = DRW_create_weight_colorramp_texture(); } } /* ********************************* SHGROUP ************************************* */ void DRW_globals_free(void) { } DRWView *DRW_view_create_with_zoffset(const DRWView *parent_view, const RegionView3D *rv3d, float offset) { /* Create view with depth offset */ float viewmat[4][4], winmat[4][4]; DRW_view_viewmat_get(parent_view, viewmat, false); DRW_view_winmat_get(parent_view, winmat, false); float viewdist = rv3d->dist; /* special exception for ortho camera (viewdist isnt used for perspective cameras) */ if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) { viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1])); } winmat[3][2] -= GPU_polygon_offset_calc(winmat, viewdist, offset); return DRW_view_create_sub(parent_view, viewmat, winmat); } /* ******************************************** COLOR UTILS ************************************ */ /* TODO FINISH */ /** * Get the wire color theme_id of an object based on it's state * \a r_color is a way to get a pointer to the static color var associated */ int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color) { const DRWContextState *draw_ctx = DRW_context_state_get(); const bool is_edit = (draw_ctx->object_mode & OB_MODE_EDIT) && (ob->mode & OB_MODE_EDIT); const bool active = (view_layer->basact && view_layer->basact->object == ob); /* confusing logic here, there are 2 methods of setting the color * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. * * note: no theme yet for 'colindex' */ int theme_id = is_edit ? TH_WIRE_EDIT : TH_WIRE; if (is_edit) { /* fallback to TH_WIRE */ } else if (((G.moving & G_TRANSFORM_OBJ) != 0) && ((ob->base_flag & BASE_SELECTED) != 0)) { theme_id = TH_TRANSFORM; } else { /* Sets the 'theme_id' or fallback to wire */ if ((ob->base_flag & BASE_SELECTED) != 0) { theme_id = (active) ? TH_ACTIVE : TH_SELECT; } else { switch (ob->type) { case OB_LAMP: theme_id = TH_LIGHT; break; case OB_SPEAKER: theme_id = TH_SPEAKER; break; case OB_CAMERA: theme_id = TH_CAMERA; break; case OB_EMPTY: theme_id = TH_EMPTY; break; case OB_LIGHTPROBE: /* TODO add lightprobe color */ theme_id = TH_EMPTY; break; default: /* fallback to TH_WIRE */ break; } } } if (r_color != NULL) { if (UNLIKELY(ob->base_flag & BASE_FROM_SET)) { *r_color = G_draw.block.colorDupli; } else if (UNLIKELY(ob->base_flag & BASE_FROM_DUPLI)) { switch (theme_id) { case TH_ACTIVE: case TH_SELECT: *r_color = G_draw.block.colorDupliSelect; break; case TH_TRANSFORM: *r_color = G_draw.block.colorTransform; break; default: *r_color = G_draw.block.colorDupli; break; } } else { switch (theme_id) { case TH_WIRE_EDIT: *r_color = G_draw.block.colorWireEdit; break; case TH_ACTIVE: *r_color = G_draw.block.colorActive; break; case TH_SELECT: *r_color = G_draw.block.colorSelect; break; case TH_TRANSFORM: *r_color = G_draw.block.colorTransform; break; case TH_SPEAKER: *r_color = G_draw.block.colorSpeaker; break; case TH_CAMERA: *r_color = G_draw.block.colorCamera; break; case TH_EMPTY: *r_color = G_draw.block.colorEmpty; break; case TH_LIGHT: *r_color = G_draw.block.colorLight; break; default: *r_color = G_draw.block.colorWire; break; } } } return theme_id; } /* XXX This is very stupid, better find something more general. */ float *DRW_color_background_blend_get(int theme_id) { static float colors[11][4]; float *ret; switch (theme_id) { case TH_WIRE_EDIT: ret = colors[0]; break; case TH_ACTIVE: ret = colors[1]; break; case TH_SELECT: ret = colors[2]; break; case TH_TRANSFORM: ret = colors[5]; break; case TH_SPEAKER: ret = colors[6]; break; case TH_CAMERA: ret = colors[7]; break; case TH_EMPTY: ret = colors[8]; break; case TH_LIGHT: ret = colors[9]; break; default: ret = colors[10]; break; } UI_GetThemeColorBlendShade4fv(theme_id, TH_BACK, 0.5, 0, ret); return ret; } bool DRW_object_is_flat(Object *ob, int *r_axis) { float dim[3]; if (!ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_HAIR, OB_POINTCLOUD, OB_VOLUME)) { /* Non-meshes object cannot be considered as flat. */ return false; } BKE_object_dimensions_get(ob, dim); if (dim[0] == 0.0f) { *r_axis = 0; return true; } if (dim[1] == 0.0f) { *r_axis = 1; return true; } if (dim[2] == 0.0f) { *r_axis = 2; return true; } return false; } bool DRW_object_axis_orthogonal_to_view(Object *ob, int axis) { float ob_rot[3][3], invviewmat[4][4]; DRW_view_viewmat_get(NULL, invviewmat, true); BKE_object_rot_to_mat3(ob, ob_rot, true); float dot = dot_v3v3(ob_rot[axis], invviewmat[2]); if (fabsf(dot) < 1e-3) { return true; } return false; } static void DRW_evaluate_weight_to_color(const float weight, float result[4]) { if (U.flag & USER_CUSTOM_RANGE) { BKE_colorband_evaluate(&U.coba_weight, weight, result); } else { /* Use gamma correction to even out the color bands: * increasing widens yellow/cyan vs red/green/blue. * Gamma 1.0 produces the original 2.79 color ramp. */ const float gamma = 1.5f; const float hsv[3] = {(2.0f / 3.0f) * (1.0f - weight), 1.0f, pow(0.5f + 0.5f * weight, gamma)}; hsv_to_rgb_v(hsv, result); for (int i = 0; i < 3; i++) { result[i] = pow(result[i], 1.0f / gamma); } } } static GPUTexture *DRW_create_weight_colorramp_texture(void) { char error[256]; float pixels[256][4]; for (int i = 0; i < 256; i++) { DRW_evaluate_weight_to_color(i / 255.0f, pixels[i]); pixels[i][3] = 1.0f; } return GPU_texture_create_1d(256, GPU_SRGB8_A8, pixels[0], error); }
34.042802
99
0.685507
c91028b51990b42140edee4805851066b859765a
1,443
h
C
lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h
lukekras/zig
6f303c01f3e06fe8203563065ea32537f6eff456
[ "MIT" ]
12,718
2018-05-25T02:00:44.000Z
2022-03-31T23:03:51.000Z
lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h
lukekras/zig
6f303c01f3e06fe8203563065ea32537f6eff456
[ "MIT" ]
8,483
2018-05-23T16:22:39.000Z
2022-03-31T22:18:16.000Z
lib/libc/include/sparcv9-linux-gnu/bits/termios-c_cc.h
lukekras/zig
6f303c01f3e06fe8203563065ea32537f6eff456
[ "MIT" ]
1,400
2018-05-24T22:35:25.000Z
2022-03-31T21:32:48.000Z
/* termios c_cc symbolic constant definitions. Linux/sparc version. Copyright (C) 2019-2021 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 <https://www.gnu.org/licenses/>. */ #ifndef _TERMIOS_H # error "Never include <bits/termios-c_cc.h> directly; use <termios.h> instead." #endif /* c_cc characters */ #define VINTR 0 #define VQUIT 1 #define VERASE 2 #define VKILL 3 #define VEOF 4 #define VEOL 5 #define VEOL2 6 #define VSWTC 7 #define VSTART 8 #define VSTOP 9 #define VSUSP 10 #define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ #define VREPRINT 12 #define VDISCARD 13 #define VWERASE 14 #define VLNEXT 15 /* User apps assume vmin/vtime is shared with eof/eol */ #define VMIN VEOF #define VTIME VEOL
33.55814
80
0.721414
d6ab6af4dec0665ba2f441a074880a4b17e1948f
585
h
C
src/plugin/graphics/shadermodel4/api/motor/plugin.graphics.shadermodel4/stdafx.h
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
src/plugin/graphics/shadermodel4/api/motor/plugin.graphics.shadermodel4/stdafx.h
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
src/plugin/graphics/shadermodel4/api/motor/plugin.graphics.shadermodel4/stdafx.h
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
/* Motor <motor.devel@gmail.com> see LICENSE for detail */ #ifndef MOTOR_SHADERMODEL4_STDAFX_H_ #define MOTOR_SHADERMODEL4_STDAFX_H_ /**************************************************************************************************/ #include <motor/stdafx.h> #include <motor/plugin.graphics.3d/stdafx.h> #include <motor/plugin.graphics.shadermodel1/stdafx.h> #include <motor/plugin.graphics.shadermodel2/stdafx.h> #include <motor/plugin.graphics.shadermodel3/stdafx.h> /**************************************************************************************************/ #endif
34.411765
100
0.519658
68074b838d63ce0149abcdee53bd08b222646b67
4,775
h
C
libraries/avatars/src/ScriptAvatarData.h
cain-kilgore/hifi
51bf3c1466f4e7fe783a81baae4dd96912560c92
[ "Apache-2.0" ]
null
null
null
libraries/avatars/src/ScriptAvatarData.h
cain-kilgore/hifi
51bf3c1466f4e7fe783a81baae4dd96912560c92
[ "Apache-2.0" ]
null
null
null
libraries/avatars/src/ScriptAvatarData.h
cain-kilgore/hifi
51bf3c1466f4e7fe783a81baae4dd96912560c92
[ "Apache-2.0" ]
null
null
null
// // ScriptAvatarData.h // libraries/script-engine/src // // Created by Zach Fox on 2017-04-10. // Copyright 2017 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #ifndef hifi_ScriptAvatarData_h #define hifi_ScriptAvatarData_h #include <QtCore/QObject> #include "AvatarData.h" class ScriptAvatarData : public QObject { Q_OBJECT // // PHYSICAL PROPERTIES: POSITION AND ORIENTATION // Q_PROPERTY(glm::vec3 position READ getPosition) Q_PROPERTY(float scale READ getTargetScale) Q_PROPERTY(glm::vec3 handPosition READ getHandPosition) Q_PROPERTY(float bodyPitch READ getBodyPitch) Q_PROPERTY(float bodyYaw READ getBodyYaw) Q_PROPERTY(float bodyRoll READ getBodyRoll) Q_PROPERTY(glm::quat orientation READ getOrientation) Q_PROPERTY(glm::quat headOrientation READ getHeadOrientation) Q_PROPERTY(float headPitch READ getHeadPitch) Q_PROPERTY(float headYaw READ getHeadYaw) Q_PROPERTY(float headRoll READ getHeadRoll) // // PHYSICAL PROPERTIES: VELOCITY // Q_PROPERTY(glm::vec3 velocity READ getVelocity) Q_PROPERTY(glm::vec3 angularVelocity READ getAngularVelocity) // // IDENTIFIER PROPERTIES // Q_PROPERTY(QUuid sessionUUID READ getSessionUUID) Q_PROPERTY(QString displayName READ getDisplayName NOTIFY displayNameChanged) Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName NOTIFY sessionDisplayNameChanged) Q_PROPERTY(bool isReplicated READ getIsReplicated) Q_PROPERTY(bool lookAtSnappingEnabled READ getLookAtSnappingEnabled NOTIFY lookAtSnappingChanged) // // ATTACHMENT AND JOINT PROPERTIES // Q_PROPERTY(QString skeletonModelURL READ getSkeletonModelURLFromScript) Q_PROPERTY(QVector<AttachmentData> attachmentData READ getAttachmentData) Q_PROPERTY(QStringList jointNames READ getJointNames) // // AUDIO PROPERTIES // Q_PROPERTY(float audioLoudness READ getAudioLoudness) Q_PROPERTY(float audioAverageLoudness READ getAudioAverageLoudness) // // MATRIX PROPERTIES // Q_PROPERTY(glm::mat4 sensorToWorldMatrix READ getSensorToWorldMatrix) Q_PROPERTY(glm::mat4 controllerLeftHandMatrix READ getControllerLeftHandMatrix) Q_PROPERTY(glm::mat4 controllerRightHandMatrix READ getControllerRightHandMatrix) public: ScriptAvatarData(AvatarSharedPointer avatarData); // // PHYSICAL PROPERTIES: POSITION AND ORIENTATION // glm::vec3 getPosition() const; float getTargetScale() const; glm::vec3 getHandPosition() const; float getBodyPitch() const; float getBodyYaw() const; float getBodyRoll() const; glm::quat getOrientation() const; glm::quat getHeadOrientation() const; float getHeadPitch() const; float getHeadYaw() const; float getHeadRoll() const; // // PHYSICAL PROPERTIES: VELOCITY // glm::vec3 getVelocity() const; glm::vec3 getAngularVelocity() const; // // IDENTIFIER PROPERTIES // QUuid getSessionUUID() const; QString getDisplayName() const; QString getSessionDisplayName() const; bool getIsReplicated() const; bool getLookAtSnappingEnabled() const; // // ATTACHMENT AND JOINT PROPERTIES // QString getSkeletonModelURLFromScript() const; Q_INVOKABLE char getHandState() const; Q_INVOKABLE glm::quat getJointRotation(int index) const; Q_INVOKABLE glm::vec3 getJointTranslation(int index) const; Q_INVOKABLE glm::quat getJointRotation(const QString& name) const; Q_INVOKABLE glm::vec3 getJointTranslation(const QString& name) const; Q_INVOKABLE QVector<glm::quat> getJointRotations() const; Q_INVOKABLE QVector<glm::vec3> getJointTranslations() const; Q_INVOKABLE bool isJointDataValid(const QString& name) const; Q_INVOKABLE int getJointIndex(const QString& name) const; Q_INVOKABLE QStringList getJointNames() const; Q_INVOKABLE QVector<AttachmentData> getAttachmentData() const; // // AUDIO PROPERTIES // float getAudioLoudness() const; float getAudioAverageLoudness() const; // // MATRIX PROPERTIES // glm::mat4 getSensorToWorldMatrix() const; glm::mat4 getControllerLeftHandMatrix() const; glm::mat4 getControllerRightHandMatrix() const; signals: void displayNameChanged(); void sessionDisplayNameChanged(); void lookAtSnappingChanged(bool enabled); public slots: glm::quat getAbsoluteJointRotationInObjectFrame(int index) const; glm::vec3 getAbsoluteJointTranslationInObjectFrame(int index) const; protected: std::weak_ptr<AvatarData> _avatarData; }; #endif // hifi_ScriptAvatarData_h
32.705479
102
0.744503
68106d5e02473d916f60d329d3989e0bdff5e8a5
1,330
h
C
PreferencesUI.framework/PSUITimeZoneController.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
4
2021-10-06T12:15:26.000Z
2022-02-21T02:26:00.000Z
PreferencesUI.framework/PSUITimeZoneController.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
null
null
null
PreferencesUI.framework/PSUITimeZoneController.h
reels-research/iOS-Private-Frameworks
9a4f4534939310a51fdbf5a439dd22487efb0f01
[ "MIT" ]
1
2021-10-08T07:40:53.000Z
2021-10-08T07:40:53.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/PreferencesUI.framework/PreferencesUI */ @interface PSUITimeZoneController : UITableViewController <UISearchBarDelegate, UISearchControllerDelegate, UISearchResultsUpdating> { NSArray * _cities; PSListController * _parentController; UISearchController * _searchController; PSSpecifier * _specifier; } @property (readonly, copy) NSString *debugDescription; @property (readonly, copy) NSString *description; @property (readonly) unsigned long long hash; @property (nonatomic) PSListController *parentController; @property (nonatomic, retain) UISearchController *searchController; @property (nonatomic, retain) PSSpecifier *specifier; @property (readonly) Class superclass; + (void)setTimeZone:(id)arg1; - (void).cxx_destruct; - (id)currentTimeZoneCityName; - (id)parentController; - (id)searchController; - (void)setParentController:(id)arg1; - (void)setSearchController:(id)arg1; - (void)setSpecifier:(id)arg1; - (id)specifier; - (id)tableView:(id)arg1 cellForRowAtIndexPath:(id)arg2; - (void)tableView:(id)arg1 didSelectRowAtIndexPath:(id)arg2; - (long long)tableView:(id)arg1 numberOfRowsInSection:(long long)arg2; - (void)updateSearchResultsForSearchController:(id)arg1; - (void)viewDidAppear:(bool)arg1; - (void)viewDidLoad; @end
35
134
0.785714
d05e38d8815e926f5ba06f770bcdf13baf6a6a25
588
h
C
iOS/lynx/base/ui_action.h
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
677
2017-09-23T16:03:12.000Z
2022-03-26T08:32:10.000Z
iOS/lynx/base/ui_action.h
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
3
2018-06-11T02:04:02.000Z
2020-04-24T09:26:05.000Z
iOS/lynx/base/ui_action.h
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
92
2017-09-21T14:21:27.000Z
2022-03-25T13:29:42.000Z
// Copyright 2017 The Lynx Authors. All rights reserved. #ifndef UI_BASE_UI_ACTION_H_ #define UI_BASE_UI_ACTION_H_ #import <Foundation/Foundation.h> #include "base/render_object_impl_bridge.h" typedef enum { DO_EVENT_NONE, DO_EVENT_ACTION, DO_UPDATE_DATA_ACTION } LynxUIActionType; @interface LynxUIAction : NSObject @property(nonatomic, readwrite) RenderObjectImplBridge *renderObjectImpl; @property LynxUIActionType type; - (id) initWithType:(LynxUIActionType)type andTarget:(RenderObjectImplBridge *)target; - (void) doAction; @end #endif // UI_BASE_UI_ACTION_H_
21.777778
86
0.795918
a969e10352477f231aa75ee34b5402ee93fab970
27,706
h
C
apps/sam_e54_xpro/sleepwalking/firmware/src/packs/ATSAME54P20A_DFP/component/aes.h
SyedThaseemuddin/MPLAB-Harmony-Reference-Apps
16e4da0b1d071a9c1f454697b275a2577c70a0aa
[ "0BSD" ]
9
2020-01-30T14:55:29.000Z
2021-03-18T07:44:49.000Z
apps/sam_e54_xpro/sleepwalking/firmware/src/packs/ATSAME54P20A_DFP/component/aes.h
SyedThaseemuddin/MPLAB-Harmony-Reference-Apps
16e4da0b1d071a9c1f454697b275a2577c70a0aa
[ "0BSD" ]
10
2019-12-22T07:19:29.000Z
2021-08-12T08:37:21.000Z
apps/sam_e54_xpro/sleepwalking/firmware/src/packs/ATSAME54P20A_DFP/component/aes.h
SyedThaseemuddin/MPLAB-Harmony-Reference-Apps
16e4da0b1d071a9c1f454697b275a2577c70a0aa
[ "0BSD" ]
13
2019-12-31T21:22:09.000Z
2022-03-07T15:55:27.000Z
/** * \brief Component description for AES * * Copyright (c) 2020 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software and any derivatives * exclusively with Microchip products. It is your responsibility to comply with third party license * terms applicable to your use of third party software (including open source software) that may * accompany Microchip software. * * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, * APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND * FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF * MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT * EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. * */ /* file generated from device description version 2020-06-22T15:30:56Z */ #ifndef _SAME54_AES_COMPONENT_H_ #define _SAME54_AES_COMPONENT_H_ /* ************************************************************************** */ /* SOFTWARE API DEFINITION FOR AES */ /* ************************************************************************** */ /* -------- AES_CTRLA : (AES Offset: 0x00) (R/W 32) Control A -------- */ #define AES_CTRLA_RESETVALUE _U_(0x00) /**< (AES_CTRLA) Control A Reset Value */ #define AES_CTRLA_SWRST_Pos _U_(0) /**< (AES_CTRLA) Software Reset Position */ #define AES_CTRLA_SWRST_Msk (_U_(0x1) << AES_CTRLA_SWRST_Pos) /**< (AES_CTRLA) Software Reset Mask */ #define AES_CTRLA_SWRST(value) (AES_CTRLA_SWRST_Msk & ((value) << AES_CTRLA_SWRST_Pos)) #define AES_CTRLA_ENABLE_Pos _U_(1) /**< (AES_CTRLA) Enable Position */ #define AES_CTRLA_ENABLE_Msk (_U_(0x1) << AES_CTRLA_ENABLE_Pos) /**< (AES_CTRLA) Enable Mask */ #define AES_CTRLA_ENABLE(value) (AES_CTRLA_ENABLE_Msk & ((value) << AES_CTRLA_ENABLE_Pos)) #define AES_CTRLA_AESMODE_Pos _U_(2) /**< (AES_CTRLA) AES Modes of operation Position */ #define AES_CTRLA_AESMODE_Msk (_U_(0x7) << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) AES Modes of operation Mask */ #define AES_CTRLA_AESMODE(value) (AES_CTRLA_AESMODE_Msk & ((value) << AES_CTRLA_AESMODE_Pos)) #define AES_CTRLA_AESMODE_ECB_Val _U_(0x0) /**< (AES_CTRLA) Electronic code book mode */ #define AES_CTRLA_AESMODE_CBC_Val _U_(0x1) /**< (AES_CTRLA) Cipher block chaining mode */ #define AES_CTRLA_AESMODE_OFB_Val _U_(0x2) /**< (AES_CTRLA) Output feedback mode */ #define AES_CTRLA_AESMODE_CFB_Val _U_(0x3) /**< (AES_CTRLA) Cipher feedback mode */ #define AES_CTRLA_AESMODE_COUNTER_Val _U_(0x4) /**< (AES_CTRLA) Counter mode */ #define AES_CTRLA_AESMODE_CCM_Val _U_(0x5) /**< (AES_CTRLA) CCM mode */ #define AES_CTRLA_AESMODE_GCM_Val _U_(0x6) /**< (AES_CTRLA) Galois counter mode */ #define AES_CTRLA_AESMODE_ECB (AES_CTRLA_AESMODE_ECB_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Electronic code book mode Position */ #define AES_CTRLA_AESMODE_CBC (AES_CTRLA_AESMODE_CBC_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Cipher block chaining mode Position */ #define AES_CTRLA_AESMODE_OFB (AES_CTRLA_AESMODE_OFB_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Output feedback mode Position */ #define AES_CTRLA_AESMODE_CFB (AES_CTRLA_AESMODE_CFB_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Cipher feedback mode Position */ #define AES_CTRLA_AESMODE_COUNTER (AES_CTRLA_AESMODE_COUNTER_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Counter mode Position */ #define AES_CTRLA_AESMODE_CCM (AES_CTRLA_AESMODE_CCM_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) CCM mode Position */ #define AES_CTRLA_AESMODE_GCM (AES_CTRLA_AESMODE_GCM_Val << AES_CTRLA_AESMODE_Pos) /**< (AES_CTRLA) Galois counter mode Position */ #define AES_CTRLA_CFBS_Pos _U_(5) /**< (AES_CTRLA) Cipher Feedback Block Size Position */ #define AES_CTRLA_CFBS_Msk (_U_(0x7) << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) Cipher Feedback Block Size Mask */ #define AES_CTRLA_CFBS(value) (AES_CTRLA_CFBS_Msk & ((value) << AES_CTRLA_CFBS_Pos)) #define AES_CTRLA_CFBS_128BIT_Val _U_(0x0) /**< (AES_CTRLA) 128-bit Input data block for Encryption/Decryption in Cipher Feedback mode */ #define AES_CTRLA_CFBS_64BIT_Val _U_(0x1) /**< (AES_CTRLA) 64-bit Input data block for Encryption/Decryption in Cipher Feedback mode */ #define AES_CTRLA_CFBS_32BIT_Val _U_(0x2) /**< (AES_CTRLA) 32-bit Input data block for Encryption/Decryption in Cipher Feedback mode */ #define AES_CTRLA_CFBS_16BIT_Val _U_(0x3) /**< (AES_CTRLA) 16-bit Input data block for Encryption/Decryption in Cipher Feedback mode */ #define AES_CTRLA_CFBS_8BIT_Val _U_(0x4) /**< (AES_CTRLA) 8-bit Input data block for Encryption/Decryption in Cipher Feedback mode */ #define AES_CTRLA_CFBS_128BIT (AES_CTRLA_CFBS_128BIT_Val << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) 128-bit Input data block for Encryption/Decryption in Cipher Feedback mode Position */ #define AES_CTRLA_CFBS_64BIT (AES_CTRLA_CFBS_64BIT_Val << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) 64-bit Input data block for Encryption/Decryption in Cipher Feedback mode Position */ #define AES_CTRLA_CFBS_32BIT (AES_CTRLA_CFBS_32BIT_Val << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) 32-bit Input data block for Encryption/Decryption in Cipher Feedback mode Position */ #define AES_CTRLA_CFBS_16BIT (AES_CTRLA_CFBS_16BIT_Val << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) 16-bit Input data block for Encryption/Decryption in Cipher Feedback mode Position */ #define AES_CTRLA_CFBS_8BIT (AES_CTRLA_CFBS_8BIT_Val << AES_CTRLA_CFBS_Pos) /**< (AES_CTRLA) 8-bit Input data block for Encryption/Decryption in Cipher Feedback mode Position */ #define AES_CTRLA_KEYSIZE_Pos _U_(8) /**< (AES_CTRLA) Encryption Key Size Position */ #define AES_CTRLA_KEYSIZE_Msk (_U_(0x3) << AES_CTRLA_KEYSIZE_Pos) /**< (AES_CTRLA) Encryption Key Size Mask */ #define AES_CTRLA_KEYSIZE(value) (AES_CTRLA_KEYSIZE_Msk & ((value) << AES_CTRLA_KEYSIZE_Pos)) #define AES_CTRLA_KEYSIZE_128BIT_Val _U_(0x0) /**< (AES_CTRLA) 128-bit Key for Encryption / Decryption */ #define AES_CTRLA_KEYSIZE_192BIT_Val _U_(0x1) /**< (AES_CTRLA) 192-bit Key for Encryption / Decryption */ #define AES_CTRLA_KEYSIZE_256BIT_Val _U_(0x2) /**< (AES_CTRLA) 256-bit Key for Encryption / Decryption */ #define AES_CTRLA_KEYSIZE_128BIT (AES_CTRLA_KEYSIZE_128BIT_Val << AES_CTRLA_KEYSIZE_Pos) /**< (AES_CTRLA) 128-bit Key for Encryption / Decryption Position */ #define AES_CTRLA_KEYSIZE_192BIT (AES_CTRLA_KEYSIZE_192BIT_Val << AES_CTRLA_KEYSIZE_Pos) /**< (AES_CTRLA) 192-bit Key for Encryption / Decryption Position */ #define AES_CTRLA_KEYSIZE_256BIT (AES_CTRLA_KEYSIZE_256BIT_Val << AES_CTRLA_KEYSIZE_Pos) /**< (AES_CTRLA) 256-bit Key for Encryption / Decryption Position */ #define AES_CTRLA_CIPHER_Pos _U_(10) /**< (AES_CTRLA) Cipher Mode Position */ #define AES_CTRLA_CIPHER_Msk (_U_(0x1) << AES_CTRLA_CIPHER_Pos) /**< (AES_CTRLA) Cipher Mode Mask */ #define AES_CTRLA_CIPHER(value) (AES_CTRLA_CIPHER_Msk & ((value) << AES_CTRLA_CIPHER_Pos)) #define AES_CTRLA_CIPHER_DEC_Val _U_(0x0) /**< (AES_CTRLA) Decryption */ #define AES_CTRLA_CIPHER_ENC_Val _U_(0x1) /**< (AES_CTRLA) Encryption */ #define AES_CTRLA_CIPHER_DEC (AES_CTRLA_CIPHER_DEC_Val << AES_CTRLA_CIPHER_Pos) /**< (AES_CTRLA) Decryption Position */ #define AES_CTRLA_CIPHER_ENC (AES_CTRLA_CIPHER_ENC_Val << AES_CTRLA_CIPHER_Pos) /**< (AES_CTRLA) Encryption Position */ #define AES_CTRLA_STARTMODE_Pos _U_(11) /**< (AES_CTRLA) Start Mode Select Position */ #define AES_CTRLA_STARTMODE_Msk (_U_(0x1) << AES_CTRLA_STARTMODE_Pos) /**< (AES_CTRLA) Start Mode Select Mask */ #define AES_CTRLA_STARTMODE(value) (AES_CTRLA_STARTMODE_Msk & ((value) << AES_CTRLA_STARTMODE_Pos)) #define AES_CTRLA_STARTMODE_MANUAL_Val _U_(0x0) /**< (AES_CTRLA) Start Encryption / Decryption in Manual mode */ #define AES_CTRLA_STARTMODE_AUTO_Val _U_(0x1) /**< (AES_CTRLA) Start Encryption / Decryption in Auto mode */ #define AES_CTRLA_STARTMODE_MANUAL (AES_CTRLA_STARTMODE_MANUAL_Val << AES_CTRLA_STARTMODE_Pos) /**< (AES_CTRLA) Start Encryption / Decryption in Manual mode Position */ #define AES_CTRLA_STARTMODE_AUTO (AES_CTRLA_STARTMODE_AUTO_Val << AES_CTRLA_STARTMODE_Pos) /**< (AES_CTRLA) Start Encryption / Decryption in Auto mode Position */ #define AES_CTRLA_LOD_Pos _U_(12) /**< (AES_CTRLA) Last Output Data Mode Position */ #define AES_CTRLA_LOD_Msk (_U_(0x1) << AES_CTRLA_LOD_Pos) /**< (AES_CTRLA) Last Output Data Mode Mask */ #define AES_CTRLA_LOD(value) (AES_CTRLA_LOD_Msk & ((value) << AES_CTRLA_LOD_Pos)) #define AES_CTRLA_LOD_NONE_Val _U_(0x0) /**< (AES_CTRLA) No effect */ #define AES_CTRLA_LOD_LAST_Val _U_(0x1) /**< (AES_CTRLA) Start encryption in Last Output Data mode */ #define AES_CTRLA_LOD_NONE (AES_CTRLA_LOD_NONE_Val << AES_CTRLA_LOD_Pos) /**< (AES_CTRLA) No effect Position */ #define AES_CTRLA_LOD_LAST (AES_CTRLA_LOD_LAST_Val << AES_CTRLA_LOD_Pos) /**< (AES_CTRLA) Start encryption in Last Output Data mode Position */ #define AES_CTRLA_KEYGEN_Pos _U_(13) /**< (AES_CTRLA) Last Key Generation Position */ #define AES_CTRLA_KEYGEN_Msk (_U_(0x1) << AES_CTRLA_KEYGEN_Pos) /**< (AES_CTRLA) Last Key Generation Mask */ #define AES_CTRLA_KEYGEN(value) (AES_CTRLA_KEYGEN_Msk & ((value) << AES_CTRLA_KEYGEN_Pos)) #define AES_CTRLA_KEYGEN_NONE_Val _U_(0x0) /**< (AES_CTRLA) No effect */ #define AES_CTRLA_KEYGEN_LAST_Val _U_(0x1) /**< (AES_CTRLA) Start Computation of the last NK words of the expanded key */ #define AES_CTRLA_KEYGEN_NONE (AES_CTRLA_KEYGEN_NONE_Val << AES_CTRLA_KEYGEN_Pos) /**< (AES_CTRLA) No effect Position */ #define AES_CTRLA_KEYGEN_LAST (AES_CTRLA_KEYGEN_LAST_Val << AES_CTRLA_KEYGEN_Pos) /**< (AES_CTRLA) Start Computation of the last NK words of the expanded key Position */ #define AES_CTRLA_XORKEY_Pos _U_(14) /**< (AES_CTRLA) XOR Key Operation Position */ #define AES_CTRLA_XORKEY_Msk (_U_(0x1) << AES_CTRLA_XORKEY_Pos) /**< (AES_CTRLA) XOR Key Operation Mask */ #define AES_CTRLA_XORKEY(value) (AES_CTRLA_XORKEY_Msk & ((value) << AES_CTRLA_XORKEY_Pos)) #define AES_CTRLA_XORKEY_NONE_Val _U_(0x0) /**< (AES_CTRLA) No effect */ #define AES_CTRLA_XORKEY_XOR_Val _U_(0x1) /**< (AES_CTRLA) The user keyword gets XORed with the previous keyword register content. */ #define AES_CTRLA_XORKEY_NONE (AES_CTRLA_XORKEY_NONE_Val << AES_CTRLA_XORKEY_Pos) /**< (AES_CTRLA) No effect Position */ #define AES_CTRLA_XORKEY_XOR (AES_CTRLA_XORKEY_XOR_Val << AES_CTRLA_XORKEY_Pos) /**< (AES_CTRLA) The user keyword gets XORed with the previous keyword register content. Position */ #define AES_CTRLA_CTYPE_Pos _U_(16) /**< (AES_CTRLA) Counter Measure Type Position */ #define AES_CTRLA_CTYPE_Msk (_U_(0xF) << AES_CTRLA_CTYPE_Pos) /**< (AES_CTRLA) Counter Measure Type Mask */ #define AES_CTRLA_CTYPE(value) (AES_CTRLA_CTYPE_Msk & ((value) << AES_CTRLA_CTYPE_Pos)) #define AES_CTRLA_Msk _U_(0x000F7FFF) /**< (AES_CTRLA) Register Mask */ /* -------- AES_CTRLB : (AES Offset: 0x04) (R/W 8) Control B -------- */ #define AES_CTRLB_RESETVALUE _U_(0x00) /**< (AES_CTRLB) Control B Reset Value */ #define AES_CTRLB_START_Pos _U_(0) /**< (AES_CTRLB) Start Encryption/Decryption Position */ #define AES_CTRLB_START_Msk (_U_(0x1) << AES_CTRLB_START_Pos) /**< (AES_CTRLB) Start Encryption/Decryption Mask */ #define AES_CTRLB_START(value) (AES_CTRLB_START_Msk & ((value) << AES_CTRLB_START_Pos)) #define AES_CTRLB_NEWMSG_Pos _U_(1) /**< (AES_CTRLB) New message Position */ #define AES_CTRLB_NEWMSG_Msk (_U_(0x1) << AES_CTRLB_NEWMSG_Pos) /**< (AES_CTRLB) New message Mask */ #define AES_CTRLB_NEWMSG(value) (AES_CTRLB_NEWMSG_Msk & ((value) << AES_CTRLB_NEWMSG_Pos)) #define AES_CTRLB_EOM_Pos _U_(2) /**< (AES_CTRLB) End of message Position */ #define AES_CTRLB_EOM_Msk (_U_(0x1) << AES_CTRLB_EOM_Pos) /**< (AES_CTRLB) End of message Mask */ #define AES_CTRLB_EOM(value) (AES_CTRLB_EOM_Msk & ((value) << AES_CTRLB_EOM_Pos)) #define AES_CTRLB_GFMUL_Pos _U_(3) /**< (AES_CTRLB) GF Multiplication Position */ #define AES_CTRLB_GFMUL_Msk (_U_(0x1) << AES_CTRLB_GFMUL_Pos) /**< (AES_CTRLB) GF Multiplication Mask */ #define AES_CTRLB_GFMUL(value) (AES_CTRLB_GFMUL_Msk & ((value) << AES_CTRLB_GFMUL_Pos)) #define AES_CTRLB_Msk _U_(0x0F) /**< (AES_CTRLB) Register Mask */ /* -------- AES_INTENCLR : (AES Offset: 0x05) (R/W 8) Interrupt Enable Clear -------- */ #define AES_INTENCLR_RESETVALUE _U_(0x00) /**< (AES_INTENCLR) Interrupt Enable Clear Reset Value */ #define AES_INTENCLR_ENCCMP_Pos _U_(0) /**< (AES_INTENCLR) Encryption Complete Interrupt Enable Position */ #define AES_INTENCLR_ENCCMP_Msk (_U_(0x1) << AES_INTENCLR_ENCCMP_Pos) /**< (AES_INTENCLR) Encryption Complete Interrupt Enable Mask */ #define AES_INTENCLR_ENCCMP(value) (AES_INTENCLR_ENCCMP_Msk & ((value) << AES_INTENCLR_ENCCMP_Pos)) #define AES_INTENCLR_GFMCMP_Pos _U_(1) /**< (AES_INTENCLR) GF Multiplication Complete Interrupt Enable Position */ #define AES_INTENCLR_GFMCMP_Msk (_U_(0x1) << AES_INTENCLR_GFMCMP_Pos) /**< (AES_INTENCLR) GF Multiplication Complete Interrupt Enable Mask */ #define AES_INTENCLR_GFMCMP(value) (AES_INTENCLR_GFMCMP_Msk & ((value) << AES_INTENCLR_GFMCMP_Pos)) #define AES_INTENCLR_Msk _U_(0x03) /**< (AES_INTENCLR) Register Mask */ /* -------- AES_INTENSET : (AES Offset: 0x06) (R/W 8) Interrupt Enable Set -------- */ #define AES_INTENSET_RESETVALUE _U_(0x00) /**< (AES_INTENSET) Interrupt Enable Set Reset Value */ #define AES_INTENSET_ENCCMP_Pos _U_(0) /**< (AES_INTENSET) Encryption Complete Interrupt Enable Position */ #define AES_INTENSET_ENCCMP_Msk (_U_(0x1) << AES_INTENSET_ENCCMP_Pos) /**< (AES_INTENSET) Encryption Complete Interrupt Enable Mask */ #define AES_INTENSET_ENCCMP(value) (AES_INTENSET_ENCCMP_Msk & ((value) << AES_INTENSET_ENCCMP_Pos)) #define AES_INTENSET_GFMCMP_Pos _U_(1) /**< (AES_INTENSET) GF Multiplication Complete Interrupt Enable Position */ #define AES_INTENSET_GFMCMP_Msk (_U_(0x1) << AES_INTENSET_GFMCMP_Pos) /**< (AES_INTENSET) GF Multiplication Complete Interrupt Enable Mask */ #define AES_INTENSET_GFMCMP(value) (AES_INTENSET_GFMCMP_Msk & ((value) << AES_INTENSET_GFMCMP_Pos)) #define AES_INTENSET_Msk _U_(0x03) /**< (AES_INTENSET) Register Mask */ /* -------- AES_INTFLAG : (AES Offset: 0x07) (R/W 8) Interrupt Flag Status -------- */ #define AES_INTFLAG_RESETVALUE _U_(0x00) /**< (AES_INTFLAG) Interrupt Flag Status Reset Value */ #define AES_INTFLAG_ENCCMP_Pos _U_(0) /**< (AES_INTFLAG) Encryption Complete Position */ #define AES_INTFLAG_ENCCMP_Msk (_U_(0x1) << AES_INTFLAG_ENCCMP_Pos) /**< (AES_INTFLAG) Encryption Complete Mask */ #define AES_INTFLAG_ENCCMP(value) (AES_INTFLAG_ENCCMP_Msk & ((value) << AES_INTFLAG_ENCCMP_Pos)) #define AES_INTFLAG_GFMCMP_Pos _U_(1) /**< (AES_INTFLAG) GF Multiplication Complete Position */ #define AES_INTFLAG_GFMCMP_Msk (_U_(0x1) << AES_INTFLAG_GFMCMP_Pos) /**< (AES_INTFLAG) GF Multiplication Complete Mask */ #define AES_INTFLAG_GFMCMP(value) (AES_INTFLAG_GFMCMP_Msk & ((value) << AES_INTFLAG_GFMCMP_Pos)) #define AES_INTFLAG_Msk _U_(0x03) /**< (AES_INTFLAG) Register Mask */ /* -------- AES_DATABUFPTR : (AES Offset: 0x08) (R/W 8) Data buffer pointer -------- */ #define AES_DATABUFPTR_RESETVALUE _U_(0x00) /**< (AES_DATABUFPTR) Data buffer pointer Reset Value */ #define AES_DATABUFPTR_INDATAPTR_Pos _U_(0) /**< (AES_DATABUFPTR) Input Data Pointer Position */ #define AES_DATABUFPTR_INDATAPTR_Msk (_U_(0x3) << AES_DATABUFPTR_INDATAPTR_Pos) /**< (AES_DATABUFPTR) Input Data Pointer Mask */ #define AES_DATABUFPTR_INDATAPTR(value) (AES_DATABUFPTR_INDATAPTR_Msk & ((value) << AES_DATABUFPTR_INDATAPTR_Pos)) #define AES_DATABUFPTR_Msk _U_(0x03) /**< (AES_DATABUFPTR) Register Mask */ /* -------- AES_DBGCTRL : (AES Offset: 0x09) (R/W 8) Debug control -------- */ #define AES_DBGCTRL_RESETVALUE _U_(0x00) /**< (AES_DBGCTRL) Debug control Reset Value */ #define AES_DBGCTRL_DBGRUN_Pos _U_(0) /**< (AES_DBGCTRL) Debug Run Position */ #define AES_DBGCTRL_DBGRUN_Msk (_U_(0x1) << AES_DBGCTRL_DBGRUN_Pos) /**< (AES_DBGCTRL) Debug Run Mask */ #define AES_DBGCTRL_DBGRUN(value) (AES_DBGCTRL_DBGRUN_Msk & ((value) << AES_DBGCTRL_DBGRUN_Pos)) #define AES_DBGCTRL_Msk _U_(0x01) /**< (AES_DBGCTRL) Register Mask */ /* -------- AES_KEYWORD : (AES Offset: 0x0C) ( /W 32) Keyword n -------- */ #define AES_KEYWORD_RESETVALUE _U_(0x00) /**< (AES_KEYWORD) Keyword n Reset Value */ #define AES_KEYWORD_Msk _U_(0x00000000) /**< (AES_KEYWORD) Register Mask */ /* -------- AES_INDATA : (AES Offset: 0x38) (R/W 32) Indata -------- */ #define AES_INDATA_RESETVALUE _U_(0x00) /**< (AES_INDATA) Indata Reset Value */ #define AES_INDATA_Msk _U_(0x00000000) /**< (AES_INDATA) Register Mask */ /* -------- AES_INTVECTV : (AES Offset: 0x3C) ( /W 32) Initialisation Vector n -------- */ #define AES_INTVECTV_RESETVALUE _U_(0x00) /**< (AES_INTVECTV) Initialisation Vector n Reset Value */ #define AES_INTVECTV_Msk _U_(0x00000000) /**< (AES_INTVECTV) Register Mask */ /* -------- AES_HASHKEY : (AES Offset: 0x5C) (R/W 32) Hash key n -------- */ #define AES_HASHKEY_RESETVALUE _U_(0x00) /**< (AES_HASHKEY) Hash key n Reset Value */ #define AES_HASHKEY_Msk _U_(0x00000000) /**< (AES_HASHKEY) Register Mask */ /* -------- AES_GHASH : (AES Offset: 0x6C) (R/W 32) Galois Hash n -------- */ #define AES_GHASH_RESETVALUE _U_(0x00) /**< (AES_GHASH) Galois Hash n Reset Value */ #define AES_GHASH_Msk _U_(0x00000000) /**< (AES_GHASH) Register Mask */ /* -------- AES_CIPLEN : (AES Offset: 0x80) (R/W 32) Cipher Length -------- */ #define AES_CIPLEN_RESETVALUE _U_(0x00) /**< (AES_CIPLEN) Cipher Length Reset Value */ #define AES_CIPLEN_Msk _U_(0x00000000) /**< (AES_CIPLEN) Register Mask */ /* -------- AES_RANDSEED : (AES Offset: 0x84) (R/W 32) Random Seed -------- */ #define AES_RANDSEED_RESETVALUE _U_(0x00) /**< (AES_RANDSEED) Random Seed Reset Value */ #define AES_RANDSEED_Msk _U_(0x00000000) /**< (AES_RANDSEED) Register Mask */ /** \brief AES register offsets definitions */ #define AES_CTRLA_REG_OFST (0x00) /**< (AES_CTRLA) Control A Offset */ #define AES_CTRLB_REG_OFST (0x04) /**< (AES_CTRLB) Control B Offset */ #define AES_INTENCLR_REG_OFST (0x05) /**< (AES_INTENCLR) Interrupt Enable Clear Offset */ #define AES_INTENSET_REG_OFST (0x06) /**< (AES_INTENSET) Interrupt Enable Set Offset */ #define AES_INTFLAG_REG_OFST (0x07) /**< (AES_INTFLAG) Interrupt Flag Status Offset */ #define AES_DATABUFPTR_REG_OFST (0x08) /**< (AES_DATABUFPTR) Data buffer pointer Offset */ #define AES_DBGCTRL_REG_OFST (0x09) /**< (AES_DBGCTRL) Debug control Offset */ #define AES_KEYWORD_REG_OFST (0x0C) /**< (AES_KEYWORD) Keyword n Offset */ #define AES_INDATA_REG_OFST (0x38) /**< (AES_INDATA) Indata Offset */ #define AES_INTVECTV_REG_OFST (0x3C) /**< (AES_INTVECTV) Initialisation Vector n Offset */ #define AES_HASHKEY_REG_OFST (0x5C) /**< (AES_HASHKEY) Hash key n Offset */ #define AES_GHASH_REG_OFST (0x6C) /**< (AES_GHASH) Galois Hash n Offset */ #define AES_CIPLEN_REG_OFST (0x80) /**< (AES_CIPLEN) Cipher Length Offset */ #define AES_RANDSEED_REG_OFST (0x84) /**< (AES_RANDSEED) Random Seed Offset */ #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) /** \brief AES register API structure */ typedef struct { /* Advanced Encryption Standard */ __IO uint32_t AES_CTRLA; /**< Offset: 0x00 (R/W 32) Control A */ __IO uint8_t AES_CTRLB; /**< Offset: 0x04 (R/W 8) Control B */ __IO uint8_t AES_INTENCLR; /**< Offset: 0x05 (R/W 8) Interrupt Enable Clear */ __IO uint8_t AES_INTENSET; /**< Offset: 0x06 (R/W 8) Interrupt Enable Set */ __IO uint8_t AES_INTFLAG; /**< Offset: 0x07 (R/W 8) Interrupt Flag Status */ __IO uint8_t AES_DATABUFPTR; /**< Offset: 0x08 (R/W 8) Data buffer pointer */ __IO uint8_t AES_DBGCTRL; /**< Offset: 0x09 (R/W 8) Debug control */ __I uint8_t Reserved1[0x02]; __O uint32_t AES_KEYWORD[8]; /**< Offset: 0x0C ( /W 32) Keyword n */ __I uint8_t Reserved2[0x0C]; __IO uint32_t AES_INDATA; /**< Offset: 0x38 (R/W 32) Indata */ __O uint32_t AES_INTVECTV[4]; /**< Offset: 0x3C ( /W 32) Initialisation Vector n */ __I uint8_t Reserved3[0x10]; __IO uint32_t AES_HASHKEY[4]; /**< Offset: 0x5C (R/W 32) Hash key n */ __IO uint32_t AES_GHASH[4]; /**< Offset: 0x6C (R/W 32) Galois Hash n */ __I uint8_t Reserved4[0x04]; __IO uint32_t AES_CIPLEN; /**< Offset: 0x80 (R/W 32) Cipher Length */ __IO uint32_t AES_RANDSEED; /**< Offset: 0x84 (R/W 32) Random Seed */ } aes_registers_t; #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */ #endif /* _SAME54_AES_COMPONENT_H_ */
100.021661
203
0.558435
65854cc637f4d05a6eb5be43940143af1c313a9f
1,338
h
C
usr/libexec/gamed/NSData-GKBase64.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
1
2020-11-04T15:43:01.000Z
2020-11-04T15:43:01.000Z
usr/libexec/gamed/NSData-GKBase64.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
null
null
null
usr/libexec/gamed/NSData-GKBase64.h
zhangkn/iOS14Header
4323e9459ed6f6f5504ecbea2710bfd6c3d7c946
[ "MIT" ]
null
null
null
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <Foundation/NSData.h> @interface NSData (GKBase64) + (void)_gkLoadRemoteImageDataForORBForURL:(id)arg1 queue:(id)arg2 handler:(CDUnknownBlockType)arg3; // IMP=0x00000001000ec42c + (void)_gkLoadRemoteImageDataForUrl:(id)arg1 subdirectory:(id)arg2 filename:(id)arg3 queue:(id)arg4 imageQueue:(id)arg5 handler:(CDUnknownBlockType)arg6; // IMP=0x00000001000eb9f8 + (void)_gkLoadRemoteImageDataForURL:(id)arg1 subdirectory:(id)arg2 filename:(id)arg3 queue:(id)arg4 handler:(CDUnknownBlockType)arg5; // IMP=0x00000001000eb92c + (void)_gkRequestClientsRemoteImageDataForURL:(id)arg1 queue:(id)arg2 reply:(CDUnknownBlockType)arg3; // IMP=0x00000001000eb53c - (id)_gkBase64EncodedString; // IMP=0x0000000100072b98 - (id)initWithBase64EncodedString_gk:(id)arg1; // IMP=0x0000000100072b88 - (id)_gkMD5HashData; // IMP=0x0000000100091c90 - (id)_gkSHA1HashData; // IMP=0x0000000100091bf0 - (id)_gkMD5HashString; // IMP=0x0000000100091b60 - (id)_gkSHA1HashString; // IMP=0x0000000100091ad0 - (void)_gkWriteToImageCacheWithURLString:(id)arg1; // IMP=0x00000001000eb28c - (id)_gkUnzippedData; // IMP=0x00000001000eb14c - (id)_gkZippedData; // IMP=0x00000001000eb014 @end
53.52
180
0.785501
45589b9d4f5cdaa3f3234bee61b4212ce100436c
7,238
c
C
paka/cmark/cmark_src/xml.c
kapyshin/paka.cmark
e297fe3ca1855c40ba81f61ae7aa5989a4cce3ad
[ "BSD-3-Clause" ]
22
2017-01-10T09:25:50.000Z
2020-08-21T01:13:51.000Z
paka/cmark/cmark_src/xml.c
PavloKapyshin/paka.cmark
e297fe3ca1855c40ba81f61ae7aa5989a4cce3ad
[ "BSD-3-Clause" ]
5
2017-03-01T11:09:38.000Z
2018-10-24T23:16:21.000Z
paka/cmark/cmark_src/xml.c
kapyshin/paka.cmark
e297fe3ca1855c40ba81f61ae7aa5989a4cce3ad
[ "BSD-3-Clause" ]
7
2017-01-07T15:48:25.000Z
2020-11-15T00:58:59.000Z
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include "config.h" #include "cmark.h" #include "node.h" #include "buffer.h" #define BUFFER_SIZE 100 #define MAX_INDENT 40 // Functions to convert cmark_nodes to XML strings. // C0 control characters, U+FFFE and U+FFF aren't allowed in XML. static const char XML_ESCAPE_TABLE[256] = { /* 0x00 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, /* 0x10 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x20 */ 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x30 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 5, 0, /* 0x40 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x90 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xA0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xB0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, /* 0xC0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xF0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; // U+FFFD Replacement Character encoded in UTF-8 #define UTF8_REPL "\xEF\xBF\xBD" static const char *XML_ESCAPES[] = { "", UTF8_REPL, "&quot;", "&amp;", "&lt;", "&gt;" }; static void escape_xml(cmark_strbuf *ob, const unsigned char *src, bufsize_t size) { bufsize_t i = 0, org, esc = 0; while (i < size) { org = i; while (i < size && (esc = XML_ESCAPE_TABLE[src[i]]) == 0) i++; if (i > org) cmark_strbuf_put(ob, src + org, i - org); if (i >= size) break; if (esc == 9) { // To replace U+FFFE and U+FFFF with U+FFFD, only the last byte has to // be changed. // We know that src[i] is 0xBE or 0xBF. if (i >= 2 && src[i-2] == 0xEF && src[i-1] == 0xBF) { cmark_strbuf_putc(ob, 0xBD); } else { cmark_strbuf_putc(ob, src[i]); } } else { cmark_strbuf_puts(ob, XML_ESCAPES[esc]); } i++; } } static void escape_xml_str(cmark_strbuf *dest, const unsigned char *source) { if (source) escape_xml(dest, source, strlen((char *)source)); } struct render_state { cmark_strbuf *xml; int indent; }; static CMARK_INLINE void indent(struct render_state *state) { int i; for (i = 0; i < state->indent && i < MAX_INDENT; i++) { cmark_strbuf_putc(state->xml, ' '); } } static int S_render_node(cmark_node *node, cmark_event_type ev_type, struct render_state *state, int options) { cmark_strbuf *xml = state->xml; bool literal = false; cmark_delim_type delim; bool entering = (ev_type == CMARK_EVENT_ENTER); char buffer[BUFFER_SIZE]; if (entering) { indent(state); cmark_strbuf_putc(xml, '<'); cmark_strbuf_puts(xml, cmark_node_get_type_string(node)); if (options & CMARK_OPT_SOURCEPOS && node->start_line != 0) { snprintf(buffer, BUFFER_SIZE, " sourcepos=\"%d:%d-%d:%d\"", node->start_line, node->start_column, node->end_line, node->end_column); cmark_strbuf_puts(xml, buffer); } literal = false; switch (node->type) { case CMARK_NODE_DOCUMENT: cmark_strbuf_puts(xml, " xmlns=\"http://commonmark.org/xml/1.0\""); break; case CMARK_NODE_TEXT: case CMARK_NODE_CODE: case CMARK_NODE_HTML_BLOCK: case CMARK_NODE_HTML_INLINE: cmark_strbuf_puts(xml, " xml:space=\"preserve\">"); escape_xml(xml, node->data, node->len); cmark_strbuf_puts(xml, "</"); cmark_strbuf_puts(xml, cmark_node_get_type_string(node)); literal = true; break; case CMARK_NODE_LIST: switch (cmark_node_get_list_type(node)) { case CMARK_ORDERED_LIST: cmark_strbuf_puts(xml, " type=\"ordered\""); snprintf(buffer, BUFFER_SIZE, " start=\"%d\"", cmark_node_get_list_start(node)); cmark_strbuf_puts(xml, buffer); delim = cmark_node_get_list_delim(node); if (delim == CMARK_PAREN_DELIM) { cmark_strbuf_puts(xml, " delim=\"paren\""); } else if (delim == CMARK_PERIOD_DELIM) { cmark_strbuf_puts(xml, " delim=\"period\""); } break; case CMARK_BULLET_LIST: cmark_strbuf_puts(xml, " type=\"bullet\""); break; default: break; } snprintf(buffer, BUFFER_SIZE, " tight=\"%s\"", (cmark_node_get_list_tight(node) ? "true" : "false")); cmark_strbuf_puts(xml, buffer); break; case CMARK_NODE_HEADING: snprintf(buffer, BUFFER_SIZE, " level=\"%d\"", node->as.heading.level); cmark_strbuf_puts(xml, buffer); break; case CMARK_NODE_CODE_BLOCK: if (node->as.code.info) { cmark_strbuf_puts(xml, " info=\""); escape_xml_str(xml, node->as.code.info); cmark_strbuf_putc(xml, '"'); } cmark_strbuf_puts(xml, " xml:space=\"preserve\">"); escape_xml(xml, node->data, node->len); cmark_strbuf_puts(xml, "</"); cmark_strbuf_puts(xml, cmark_node_get_type_string(node)); literal = true; break; case CMARK_NODE_CUSTOM_BLOCK: case CMARK_NODE_CUSTOM_INLINE: cmark_strbuf_puts(xml, " on_enter=\""); escape_xml_str(xml, node->as.custom.on_enter); cmark_strbuf_putc(xml, '"'); cmark_strbuf_puts(xml, " on_exit=\""); escape_xml_str(xml, node->as.custom.on_exit); cmark_strbuf_putc(xml, '"'); break; case CMARK_NODE_LINK: case CMARK_NODE_IMAGE: cmark_strbuf_puts(xml, " destination=\""); escape_xml_str(xml, node->as.link.url); cmark_strbuf_putc(xml, '"'); if (node->as.link.title) { cmark_strbuf_puts(xml, " title=\""); escape_xml_str(xml, node->as.link.title); cmark_strbuf_putc(xml, '"'); } break; default: break; } if (node->first_child) { state->indent += 2; } else if (!literal) { cmark_strbuf_puts(xml, " /"); } cmark_strbuf_puts(xml, ">\n"); } else if (node->first_child) { state->indent -= 2; indent(state); cmark_strbuf_puts(xml, "</"); cmark_strbuf_puts(xml, cmark_node_get_type_string(node)); cmark_strbuf_puts(xml, ">\n"); } return 1; } char *cmark_render_xml(cmark_node *root, int options) { char *result; cmark_strbuf xml = CMARK_BUF_INIT(root->mem); cmark_event_type ev_type; cmark_node *cur; struct render_state state = {&xml, 0}; cmark_iter *iter = cmark_iter_new(root); cmark_strbuf_puts(state.xml, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); cmark_strbuf_puts(state.xml, "<!DOCTYPE document SYSTEM \"CommonMark.dtd\">\n"); while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) { cur = cmark_iter_get_node(iter); S_render_node(cur, ev_type, &state, options); } result = (char *)cmark_strbuf_detach(&xml); cmark_iter_free(iter); return result; }
31.469565
79
0.576264
ca46d86c9923182081eaddbc517dc4411faa214c
779
h
C
src/dpdk/drivers/net/ark/ark_logs.h
ajitkhaparde/trex-core
1834ebd49112af0731a819056612dde832f7a94e
[ "Apache-2.0" ]
956
2015-06-24T15:04:55.000Z
2022-03-30T06:25:04.000Z
src/dpdk/drivers/net/ark/ark_logs.h
hjat2005/trex-core
400f03c86c844a0096dff3f6b13e58a808aaefff
[ "Apache-2.0" ]
782
2015-09-20T15:19:00.000Z
2022-03-31T23:52:05.000Z
src/dpdk/drivers/net/ark/ark_logs.h
hjat2005/trex-core
400f03c86c844a0096dff3f6b13e58a808aaefff
[ "Apache-2.0" ]
429
2015-06-27T19:34:21.000Z
2022-03-23T11:02:51.000Z
/* SPDX-License-Identifier: BSD-3-Clause * Copyright (c) 2015-2018 Atomic Rules LLC */ #ifndef _ARK_DEBUG_H_ #define _ARK_DEBUG_H_ #include <inttypes.h> #include <rte_log.h> /* system camel case definition changed to upper case */ #define PRIU32 PRIu32 #define PRIU64 PRIu64 /* Format specifiers for string data pairs */ #define ARK_SU32 "\n\t%-20s %'20" PRIU32 #define ARK_SU64 "\n\t%-20s %'20" PRIU64 #define ARK_SU64X "\n\t%-20s %#20" PRIx64 #define ARK_SPTR "\n\t%-20s %20p" extern int ark_logtype; #define ARK_PMD_LOG(level, fmt, args...) \ rte_log(RTE_LOG_ ##level, ark_logtype, "ARK: " fmt, ## args) /* Debug macro to enable core debug code */ #ifdef RTE_LIBRTE_ETHDEV_DEBUG #define ARK_DEBUG_CORE 1 #else #define ARK_DEBUG_CORE 0 #endif #endif
22.257143
61
0.711168
a9e614618e1a665c38b8b6cd9188ff47436995cb
712
c
C
src/libstddjb/getlnmax.c
hanhlinux/skalibs
e8407224cf8d625f6348ae03d2d60ed4823b69a8
[ "ISC" ]
84
2015-02-28T12:04:25.000Z
2022-03-29T07:49:27.000Z
src/libstddjb/getlnmax.c
Acidburn0zzz/skalibs
d7fdd3f5cb297cddf08b8962040e48095893ab02
[ "0BSD" ]
3
2016-12-20T13:17:56.000Z
2021-04-11T12:45:20.000Z
src/libstddjb/getlnmax.c
Acidburn0zzz/skalibs
d7fdd3f5cb297cddf08b8962040e48095893ab02
[ "0BSD" ]
30
2015-11-03T05:40:52.000Z
2021-12-28T03:36:40.000Z
/* ISC license. */ #include <sys/uio.h> #include <errno.h> #include <skalibs/buffer.h> #include <skalibs/siovec.h> #include <skalibs/skamisc.h> int getlnmax (buffer *b, char *d, size_t max, size_t *w, char sep) { if (max < *w) return (errno = EINVAL, -1) ; for (;;) { struct iovec v[2] ; size_t len = buffer_len(b) ; size_t pos ; ssize_t r ; buffer_rpeek(b, v) ; if (len > max - *w) len = max - *w ; pos = siovec_bytechr(v, 2, sep) ; if (pos > len) pos = len ; r = pos < len ; pos += r ; buffer_getnofill(b, d + *w, pos) ; *w += pos ; if (*w >= max) return (errno = ERANGE, -1) ; if (r) return 1 ; r = buffer_fill(b) ; if (r <= 0) return r ; } }
23.733333
66
0.54073
8063ab7d00e1818a94845513fd4ad321adeb5e1c
2,792
h
C
pocketsphinx-5prealpha/src/libpocketsphinx/ngram_search_fwdtree.h
sowmyavasudeva/SmartBookmark
797a90cfea624d2ab977e5aa78614c0db1177a23
[ "Apache-2.0" ]
139
2017-06-10T17:23:54.000Z
2022-03-23T21:08:17.000Z
pocketsphinx-5prealpha/src/libpocketsphinx/ngram_search_fwdtree.h
sowmyavasudeva/SmartBookmark
797a90cfea624d2ab977e5aa78614c0db1177a23
[ "Apache-2.0" ]
72
2017-09-30T17:58:56.000Z
2021-08-16T08:13:01.000Z
pocketsphinx-5prealpha/src/libpocketsphinx/ngram_search_fwdtree.h
sowmyavasudeva/SmartBookmark
797a90cfea624d2ab977e5aa78614c0db1177a23
[ "Apache-2.0" ]
67
2017-11-28T17:59:19.000Z
2022-02-22T04:09:38.000Z
/* -*- c-basic-offset: 4; indent-tabs-mode: nil -*- */ /* ==================================================================== * Copyright (c) 2008 Carnegie Mellon University. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * This work was supported in part by funding from the Defense Advanced * Research Projects Agency and the National Science Foundation of the * United States of America, and the CMU Sphinx Speech Consortium. * * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND * ANY EXPRESSED 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 CARNEGIE MELLON UNIVERSITY * NOR ITS EMPLOYEES 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. * * ==================================================================== * */ /** * @file ngram_search_fwdtree.h Lexicon tree based Viterbi search. */ #ifndef __NGRAM_SEARCH_FWDTREE_H__ #define __NGRAM_SEARCH_FWDTREE_H__ /* SphinxBase headers. */ /* Local headers. */ #include "ngram_search.h" /** * Initialize N-Gram search for fwdtree decoding. */ void ngram_fwdtree_init(ngram_search_t *ngs); /** * Release memory associated with fwdtree decoding. */ void ngram_fwdtree_deinit(ngram_search_t *ngs); /** * Rebuild search structures for updated language models. */ int ngram_fwdtree_reinit(ngram_search_t *ngs); /** * Start fwdtree decoding for an utterance. */ void ngram_fwdtree_start(ngram_search_t *ngs); /** * Search one frame forward in an utterance. * * @return Number of frames searched (either 0 or 1). */ int ngram_fwdtree_search(ngram_search_t *ngs, int frame_idx); /** * Finish fwdtree decoding for an utterance. */ void ngram_fwdtree_finish(ngram_search_t *ngs); #endif /* __NGRAM_SEARCH_FWDTREE_H__ */
33.238095
73
0.710244
2c03e65dbb45eb500eca10562e3e893860bcd1b2
8,451
h
C
libs/rkh/fwk/inc/rkhfwk_hook.h
mrds90/firmware_v3
52e36085fd3fa8917786bdffc2143de2ae3d1b9a
[ "BSD-3-Clause" ]
23
2019-08-01T07:55:41.000Z
2021-11-28T15:44:52.000Z
libs/rkh/fwk/inc/rkhfwk_hook.h
td3-frm/freeRTOS
967665cafb3d8e1d626f063898fa0bb4d6111eb5
[ "BSD-3-Clause" ]
21
2019-10-04T13:20:02.000Z
2021-08-07T00:16:08.000Z
libs/rkh/fwk/inc/rkhfwk_hook.h
td3-frm/freeRTOS
967665cafb3d8e1d626f063898fa0bb4d6111eb5
[ "BSD-3-Clause" ]
52
2019-07-20T22:56:21.000Z
2022-02-10T20:03:16.000Z
/* * -------------------------------------------------------------------------- * * Framework RKH * ------------- * * State-machine framework for reactive embedded systems * * Copyright (C) 2010 Leandro Francucci. * All rights reserved. Protected by international copyright laws. * * * RKH 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. * * RKH 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 RKH, see copying.txt file. * * Contact information: * RKH site: http://vortexmakes.com/que-es/ * RKH GitHub: https://github.com/vortexmakes/RKH * RKH Sourceforge: https://sourceforge.net/projects/rkh-reactivesys/ * e-mail: lf@vortexmakes.com * --------------------------------------------------------------------------- */ /** * \file rkhfwk_hook.h * \brief Specifies the interface of hook functions. * \ingroup fwk */ /* -------------------------- Development history -------------------------- */ /* * 2017.25.04 LeFr v2.4.05 Initial version */ /* -------------------------------- Authors -------------------------------- */ /* * LeFr Leandro Francucci lf@vortexmakes.com */ /* --------------------------------- Notes --------------------------------- */ /* --------------------------------- Module -------------------------------- */ #ifndef __RKHFWK_HOOK_H__ #define __RKHFWK_HOOK_H__ /* ----------------------------- Include files ----------------------------- */ #include "rkhtype.h" #include "rkhsma.h" /* ---------------------- External C language linkage ---------------------- */ #ifdef __cplusplus extern "C" { #endif /* --------------------------------- Macros -------------------------------- */ #if (RKH_CFG_HOOK_DISPATCH_EN == RKH_ENABLED) #define RKH_HOOK_DISPATCH(sma, e) \ rkh_hook_dispatch((sma), (RKH_EVT_T *)(e)) #else #define RKH_HOOK_DISPATCH(sma, e) (void)0 #endif #if (RKH_CFG_HOOK_TIMEOUT_EN == RKH_ENABLED) #define RKH_HOOK_TIMEOUT(t) rkh_hook_timeout((t)) #else #define RKH_HOOK_TIMEOUT(t) (void)0 #endif #if (RKH_CFG_HOOK_SIGNAL_EN == RKH_ENABLED) #define RKH_HOOK_SIGNAL(e) rkh_hook_signal((RKH_EVT_T *)(e)) #else #define RKH_HOOK_SIGNAL(e) (void)0 #endif #if (RKH_CFG_HOOK_START_EN == RKH_ENABLED) #define RKH_HOOK_START() rkh_hook_start() #else #define RKH_HOOK_START() (void)0 #endif #if (RKH_CFG_HOOK_EXIT_EN == RKH_ENABLED) #define RKH_HOOK_EXIT() rkh_hook_exit() #else #define RKH_HOOK_EXIT() (void)0 #endif #if (RKH_CFG_HOOK_TIMETICK_EN == RKH_ENABLED) #define RKH_HOOK_TIMETICK() rkh_hook_timetick() #else #define RKH_HOOK_TIMETICK() (void)0 #endif #if (RKH_CFG_HOOK_PUT_TRCEVT_EN == RKH_ENABLED) #define RKH_HOOK_PUT_TRCEVT() rkh_hook_putTrcEvt() #else #define RKH_HOOK_PUT_TRCEVT() (void)0 #endif /* -------------------------------- Constants ------------------------------ */ /* ------------------------------- Data types ------------------------------ */ /* -------------------------- External variables --------------------------- */ /* -------------------------- Function prototypes -------------------------- */ /** * \brief * When dispatching an event to a SMA the dispatch hook function will be * executed. * * \param[in] me pointer to previously created state machine application. * \param[in] e pointer to arrived event. * * \note * The dispatch hook will only get called if RKH_CFG_HOOK_DISPATCH_EN is * set to 1 within rkhcfg.h file. When this is set the application must * provide the hook function. * * \ingroup apiBSPHook */ void rkh_hook_dispatch( RKH_SMA_T *me, RKH_EVT_T *e ); /** * \brief * When the producer of an event directly posts the event to the event queue * of the consumer SMA the rkh_hook_signal() will optionally called. * * \param[in] e pointer to arrived event. * * \note * The signal hook will only get called if RKH_CFG_HOOK_SIGNAL_EN is set * to 1 within rkhcfg.h file. When this is set the application must provide * the hook function. * * \ingroup apiBSPHook */ void rkh_hook_signal( RKH_EVT_T *e ); /** * \brief * If a timer expires the rkh_hook_timeout() function is called just before * the assigned event is directly posted into the state machine application * queue. * * \param[in] t pointer to previously allocated timer structure. * A cast to RKH_TMR_T data type must be internally * implemented to get the appropiated timer control block. * * \note * The timeout hook will only get called if RKH_CFG_HOOK_TIMEOUT_EN is set * to 1 within rkhcfg.h file. When this is set the application must provide * the hook function. * * \ingroup apiBSPHook */ void rkh_hook_timeout( const void *t ); /** * \brief * This hook function is called just before the RKH takes over control of * the application. * * \note * The start hook will only get called if RKH_CFG_HOOK_START_EN is set to 1 * within rkhcfg.h file. When this is set the application must provide the * hook function. * * \ingroup apiBSPHook */ void rkh_hook_start( void ); /** * \brief * This hook function is called just before the RKH returns to the * underlying OS/RTOS. Usually, the rkh_hook_exit() is useful when executing * clean-up code upon SMA terminate or framework exit. * * \note * The exit hook will only get called if RKH_CFG_HOOK_EXIT_EN is set to 1 * within rkhcfg.h file. When this is set the application must provide the * hook function. * * \ingroup apiBSPHook */ void rkh_hook_exit( void ); /** * \brief * An idle hook function will only get executed (with interrupts LOCKED) * when there are no SMAs of higher priority that are ready to run. * * This makes the idle hook function an ideal place to put the processor * into a low power state - providing an automatic power saving whenever * there is no processing to be performed. * * \note * The rkh_hook_idle() callback is called with interrupts locked, because the * determination of the idle condition might change by any interrupt posting * an event. This function must internally unlock interrupts, ideally * atomically with putting the CPU to the power-saving mode. * * \usage * \code * void * rkh_hook_idle( void ) // NOTE: entered with interrupts DISABLED * { * RKH_ENA_INTERRUPT(); // must at least enable interrupts * ... * } * \endcode * * \ingroup apiBSPHook */ void rkh_hook_idle( void ); /** * \brief * This function is called by rkh_tmr_tick(), which is assumed to be called * from an ISR. rkh_hook_timetick() is called at the very beginning of * rkh_tmr_tick(), to give priority to user or port-specific code when the * tick interrupt occurs. * * Usually, this hook allows to the application to extend the functionality * of RKH, giving the port developer the opportunity to add code that will * be called by rkh_tmr_tick(). Frequently, the rkh_hook_timetick() is * called from the tick ISR and must not make any blocking calls and must * execute as quickly as possible. * * \note * The time tick hook will only get called if RKH_CFG_HOOK_TIMETICK_EN is * set to 1 within rkhcfg.h file. When this is set the application must * provide the hook function. * * \ingroup apiBSPHook */ void rkh_hook_timetick( void ); /** * \brief * This function is called from rkh_trc_end() function, at the end of that, * to allow to the application to extend the functionality of RKH, giving * the port developer the opportunity to add code that will be called when * is put a trace event into the stream buffer. * * \ingroup apiBSPHook */ void rkh_hook_putTrcEvt( void ); /* -------------------- External C language linkage end -------------------- */ #ifdef __cplusplus } #endif /* ------------------------------ Module end ------------------------------- */ #endif /* ------------------------------ End of file ------------------------------ */
32.011364
79
0.620518
0370693add61a55aba32767edce9df40d7508fe5
1,495
h
C
toonz/sources/include/ttile.h
rozhuk-im/opentoonz
ad5b632512746b97fd526aa79660fbaedf934fad
[ "BSD-3-Clause" ]
3,710
2016-03-26T00:40:48.000Z
2022-03-31T21:35:12.000Z
toonz/sources/include/ttile.h
rozhuk-im/opentoonz
ad5b632512746b97fd526aa79660fbaedf934fad
[ "BSD-3-Clause" ]
4,246
2016-03-26T01:21:45.000Z
2022-03-31T23:10:47.000Z
toonz/sources/include/ttile.h
rozhuk-im/opentoonz
ad5b632512746b97fd526aa79660fbaedf934fad
[ "BSD-3-Clause" ]
633
2016-03-26T00:42:25.000Z
2022-03-17T02:55:13.000Z
#pragma once #ifndef T_TILE_INCLUDED #define T_TILE_INCLUDED #include "traster.h" #include "trasterimage.h" #include "ttoonzimage.h" #include "timagecache.h" #undef DVAPI #undef DVVAR #ifdef TRASTER_EXPORTS #define DVAPI DV_EXPORT_API #define DVVAR DV_EXPORT_VAR #else #define DVAPI DV_IMPORT_API #define DVVAR DV_IMPORT_VAR #endif class DVAPI TTile { private: std::string m_rasterId; TRect m_subRect; TTile(const TTile &); TTile &operator=(const TTile &); void addInCache(const TRasterP &raster); public: TPointD m_pos; TTile() : m_rasterId(""), m_pos(), m_subRect() {} TTile(const TRasterP &raster); TTile(const TRasterP &raster, TPointD pos); ~TTile(); void setRaster(const TRasterP &raster); inline const TRasterP getRaster() const { TImageP img = TImageCache::instance()->get(m_rasterId, true); TRasterImageP rimg = (TRasterImageP)img; if (rimg) { if (m_subRect == rimg->getRaster()->getBounds()) return rimg->getRaster(); else return rimg->getRaster()->extract(m_subRect.x0, m_subRect.y0, m_subRect.x1, m_subRect.y1); } TToonzImageP timg = (TToonzImageP)img; if (timg) { if (m_subRect == timg->getRaster()->getBounds()) return timg->getRaster(); else return timg->getRaster()->extract(m_subRect.x0, m_subRect.y0, m_subRect.x1, m_subRect.y1); } return TRasterP(); } }; #endif
24.112903
72
0.644816
c169991fd042b51fde831b587ee7210f89056429
6,079
c
C
Sample/Universal/Network/Tcp4/Dxe/ComponentName.c
kontais/EFI-MIPS
c4de746e6a926fc9df71231a539e2c0a170bcc90
[ "BSD-3-Clause" ]
11
2016-07-21T11:39:51.000Z
2022-01-06T10:35:12.000Z
Sample/Universal/Network/Tcp4/Dxe/ComponentName.c
kontais/EFI-MIPS
c4de746e6a926fc9df71231a539e2c0a170bcc90
[ "BSD-3-Clause" ]
1
2019-09-03T04:11:46.000Z
2019-09-03T04:11:46.000Z
Sample/Universal/Network/Tcp4/Dxe/ComponentName.c
kontais/EFI-MIPS
c4de746e6a926fc9df71231a539e2c0a170bcc90
[ "BSD-3-Clause" ]
3
2019-09-04T02:59:01.000Z
2021-08-23T06:07:28.000Z
/*++ Copyright (c) 2005 - 2006, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: ComponentName.c Abstract: --*/ #include "Tcp4Main.h" // // EFI Component Name Functions // EFI_STATUS EFIAPI TcpComponentNameGetDriverName ( IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName ); EFI_STATUS EFIAPI TcpComponentNameGetControllerName ( IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName ); // // EFI Component Name Protocol // EFI_COMPONENT_NAME_PROTOCOL gTcp4ComponentName = { TcpComponentNameGetDriverName, TcpComponentNameGetControllerName, "eng" }; static EFI_UNICODE_STRING_TABLE mTcpDriverNameTable[] = { { "eng", L"Tcp Network Service Driver" }, { NULL, NULL } }; EFI_STATUS EFIAPI TcpComponentNameGetDriverName ( IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName ) /*++ Routine Description: Retrieves a Unicode string that is the user readable name of the EFI Driver. Arguments: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language. Returns: EFI_SUCCES - The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - DriverName is NULL. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language. --*/ { return EfiLibLookupUnicodeString ( Language, gTcp4ComponentName.SupportedLanguages, mTcpDriverNameTable, DriverName ); } EFI_STATUS EFIAPI TcpComponentNameGetControllerName ( IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName ) /*++ Routine Description: Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Arguments: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in supported languages. The number of languages supported by a driver is up to the driver writer. ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This. Returns: EFI_SUCCESS - The Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - ControllerName is NULL. EFI_UNSUPPORTED - The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language. --*/ { return EFI_UNSUPPORTED; }
35.970414
101
0.611449
c16fb64d00cea3955ef95821fe6fd73a3f6fc389
3,706
c
C
ccstat/ccstat.c
JanSkalny/tools
1a8946b6cb8dadfa7602366469686ed3f2243e80
[ "MIT" ]
2
2017-10-02T15:07:42.000Z
2019-08-21T05:55:34.000Z
ccstat/ccstat.c
JanSkalny/tools
1a8946b6cb8dadfa7602366469686ed3f2243e80
[ "MIT" ]
null
null
null
ccstat/ccstat.c
JanSkalny/tools
1a8946b6cb8dadfa7602366469686ed3f2243e80
[ "MIT" ]
2
2019-04-08T13:05:59.000Z
2019-08-21T05:51:09.000Z
#include "stdafx.h" #define OUTPUT_PATH "/var/lib/ccstat" #define DEV "wan0" #define SNAP_LEN 38 typedef struct record { uint64_t src; uint64_t dst; uint32_t addr; char *country; struct record *next; } t_record; typedef struct { t_record* map[256]; } t_record_list; t_record_list *records; GeoIP *geoip; struct tm *start; uint8_t hash_addr(uint32_t addr) { return (addr>>24) & 0xFF; } t_record_list* create_record_list() { t_record_list *p; p = malloc(sizeof(t_record_list)); if (!p) die("malloc failed"); memset(p, 0, sizeof(t_record_list)); return p; } void destory_record_list(t_record_list *records) { int i; t_record *p, *q; for (i=0; i!=256; i++) { p = records->map[i]; while(p) { q = p; p = p->next; if (q->country) free(q->country); free(q); } } free(records); } void dump_records(t_record_list *records, FILE *f) { struct in_addr addr; t_record *p; int i; for (i=0; i!=256; i++) { p = records->map[i]; while (p) { addr.s_addr = htonl(p->addr); fprintf(f, "%s %ld %ld %s\n", inet_ntoa(addr), p->src, p->dst, p->country); p = p->next; } } } t_record* create_record(t_record_list *record_list, uint32_t addr) { const char *country; t_record *p; int i; // create blank record p = malloc(sizeof(t_record)); if (!p) die("malloc failed"); memset(p, 0, sizeof(t_record)); // and insert it into our hash map i = hash_addr(addr); p->addr = addr; p->next = records->map[i]; records->map[i] = p; // lookup geoip region country = GeoIP_country_code_by_ipnum(geoip, addr); if (country) p->country = strdup(country); //xlog("new host %08xh (%s)", addr, p->country); return p; } t_record* find_record(t_record_list *records, uint32_t addr) { uint8_t i; t_record *p; i = hash_addr(addr); p = records->map[i]; while (p) { if (p->addr == addr) break; p = p->next; } if (!p) p = create_record(records, addr); return p; } void process_packet(t_record_list *records, uint32_t src_ip, uint32_t dst_ip, int len) { t_record *p; p = find_record(records, src_ip); p->src += len; p = find_record(records, dst_ip); p->dst += len; } /** * CTRL^C and kill signal handler * - write statistics into output file */ static void signal_handler(int signo) { char path[200], buf[100]; FILE *f; strftime(buf, sizeof(buf), "%Y-%m-%d_%H%I%S", start); sprintf(path, "%s/%s.stats", OUTPUT_PATH, buf); f = fopen(path, "w"); xlog("saving stats to %s...", path); dump_records(records, f); fclose(f); exit(0); } int main() { char err[PCAP_ERRBUF_SIZE]; pcap_t *pcap; time_t now; struct pcap_pkthdr hdr; const uint8_t *data; struct ether_header *eth; uint32_t src_ip, dst_ip; // signal handler signal(SIGINT, signal_handler); signal(SIGUSR1, signal_handler); // load geoip database geoip = GeoIP_open("/usr/share/GeoIP/GeoIP.dat", GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE); if (!geoip) die("failed to open geoip database"); // create record list records = create_record_list(); // mark current time, for dump purposes time(&now); start = localtime(&now); // open pcap capture device pcap = pcap_open_live(DEV, SNAP_LEN, 0, 1000, err); if (!pcap) die("pcap_open_live: %s", err); while(1) { // receive next packet data = pcap_next(pcap, &hdr); if (!data) continue; if (hdr.caplen < 32) continue; // parse L2 data eth = (struct ether_header*)data; data += 14; if (ntohs(eth->ether_type) != ETHERTYPE_IP) continue; // parse IPv4 if ((data[0]&0xf0) != 0x40) continue; src_ip = ntohl(*((uint32_t*)(data+12))); dst_ip = ntohl(*((uint32_t*)(data+16))); process_packet(records, src_ip, dst_ip, hdr.len); } return 0; }
18.078049
90
0.646789
1e464f6b3932b766b13b28e55f90f6a7ae4161ca
672
h
C
tests/src/TasksTests.h
CodeSmithyIDE/Tasks
71e9e674ff35c7c807fab2e0a1b5dce1577652b2
[ "MIT" ]
null
null
null
tests/src/TasksTests.h
CodeSmithyIDE/Tasks
71e9e674ff35c7c807fab2e0a1b5dce1577652b2
[ "MIT" ]
1
2020-10-18T15:33:38.000Z
2020-10-18T15:33:38.000Z
tests/src/TasksTests.h
CodeSmithyIDE/Tasks
71e9e674ff35c7c807fab2e0a1b5dce1577652b2
[ "MIT" ]
1
2020-10-17T21:32:36.000Z
2020-10-17T21:32:36.000Z
/* Copyright (c) 2018-2022 Xavier Leclercq Released under the MIT License See https://github.com/ishiko-cpp/user-tasks/blob/main/LICENSE.txt */ #ifndef _ISHIKO_CPP_USERTASKS_TESTS_TASKSTESTS_H_ #define _ISHIKO_CPP_USERTASKS_TESTS_TASKSTESTS_H_ #include <Ishiko/TestFramework/Core.hpp> class TasksTests : public Ishiko::TestSequence { public: TasksTests(const Ishiko::TestNumber& number, const Ishiko::TestContext& context); private: static void CreationTest1(Ishiko::Test& test); static void AddTest1(Ishiko::Test& test); static void AddObserverTest1(Ishiko::Test& test); static void RemoveObserverTest1(Ishiko::Test& test); }; #endif
26.88
85
0.763393
4b9a9450c73b3b5e2c415525169934445c1b13c7
32,727
c
C
v2_TMTDyn_IJRR2020/Samples/Rods/1. STIFF-FLOP/code/codegen/mex/EOM/interface/_coder_EOM_info.c
smhadisadati/TMTDyn
961213052fd8cda16d8db00ee1c676fe31fc5b66
[ "BSD-4-Clause" ]
9
2020-04-17T03:34:54.000Z
2022-03-11T13:20:43.000Z
v2_TMTDyn_IJRR2020/Samples/Rods/1. STIFF-FLOP/code/codegen/mex/EOM/interface/_coder_EOM_info.c
LenhartYang/TMTDyn
134d89b156bdc078f6426561d1de76271f07259e
[ "BSD-4-Clause" ]
2
2019-09-04T00:46:47.000Z
2020-01-20T14:59:52.000Z
v2_TMTDyn_IJRR2020/Samples/Rods/1. STIFF-FLOP/code/codegen/mex/EOM/interface/_coder_EOM_info.c
LenhartYang/TMTDyn
134d89b156bdc078f6426561d1de76271f07259e
[ "BSD-4-Clause" ]
6
2020-08-31T05:55:12.000Z
2022-03-17T11:23:49.000Z
/* * Academic License - for use in teaching, academic research, and meeting * course requirements at degree granting institutions only. Not for * government, commercial, or other organizational use. * * _coder_EOM_info.c * * Code generation for function '_coder_EOM_info' * */ /* Include files */ #include "rt_nonfinite.h" #include "EOM.h" #include "_coder_EOM_info.h" /* Function Definitions */ mxArray *emlrtMexFcnProperties(void) { mxArray *xResult; mxArray *xEntryPoints; const char * fldNames[6] = { "Name", "NumberOfInputs", "NumberOfOutputs", "ConstantInputs", "FullPath", "TimeStamp" }; mxArray *xInputs; const char * b_fldNames[4] = { "Version", "ResolvedFunctions", "EntryPoints", "CoverageInfo" }; xEntryPoints = emlrtCreateStructMatrix(1, 1, 6, fldNames); xInputs = emlrtCreateLogicalMatrix(1, 3); emlrtSetField(xEntryPoints, 0, "Name", emlrtMxCreateString("EOM")); emlrtSetField(xEntryPoints, 0, "NumberOfInputs", emlrtMxCreateDoubleScalar(3.0)); emlrtSetField(xEntryPoints, 0, "NumberOfOutputs", emlrtMxCreateDoubleScalar (1.0)); emlrtSetField(xEntryPoints, 0, "ConstantInputs", xInputs); emlrtSetField(xEntryPoints, 0, "FullPath", emlrtMxCreateString( "/home/hadi/Safe/MEGAsync/Hadi/TMTDyn/Code/TMTDyn/Beta/v1.0/Rods/1. STIFF-FLOP/code/EOM.m")); emlrtSetField(xEntryPoints, 0, "TimeStamp", emlrtMxCreateDoubleScalar (737568.43567129632)); xResult = emlrtCreateStructMatrix(1, 1, 4, b_fldNames); emlrtSetField(xResult, 0, "Version", emlrtMxCreateString( "9.5.0.944444 (R2018b)")); emlrtSetField(xResult, 0, "ResolvedFunctions", (mxArray *) emlrtMexFcnResolvedFunctionsInfo()); emlrtSetField(xResult, 0, "EntryPoints", xEntryPoints); return xResult; } const mxArray *emlrtMexFcnResolvedFunctionsInfo(void) { const mxArray *nameCaptureInfo; const char * data[115] = { "789ced7d6b8c23d9751eb5abb577a1d86124dbbbab97672463b089ac6936c9269b6bafc4f7abf9269bddd3abddee2259248b5dac2a5615d96cda816918306c40" "4064180e12c080d73f6cc8b2e26c62205ad8824145f9e19f5220d9880c2b0b2742fcc301fc47060218704856554f570def90d37579c92a9e0b0c6e170feb7e97", "67cefdcebde7be1c1f48653fe070387e7cfa6ff84b0ec76bafbce098a51f7328c9a9e6cf39f4c928ff809aff0fc3b3965e707c50f7de0754bcdf569feb3c27d3" "43597960198ecef5bb355a9c3e705497be29a6c177198ee2e4cab5403b445ae2d901dd984b9a0c4b57982e9de16f3d2499e943377e4b74f33013cdfe8eb4e9fa", "65b9df75886de97175d9db0f0e553fb33441fcfe0faea89f3711fa711ae46fc6deda6bf35d7aaf4d3598bd32d5a4f7b2b14448bae6ea7bc9d947956c257acded" "45f806adfd1da6656a6fb0ffd0b557e21bd2defec37be54a2a1eff6c3c932fecd5675f8ce5b30fbbbadf7381a8ef8facf87b8cb9965e72bc78ebe967821ade18", "51deaafafb2402cf6990cf7eaef890991a95c851ecf48f063d2cb72941f9ff5efefb97d5c79850f5d19286f7de1df1b4f28b4bf034f99ba9cce9d484fa92b8c7" "f2758addcb862a995078afe476ed1fd6f6649e676bfc708feeb2f37f9f99eb6bef339ac2f60c0a53ad86a4dd045f63dffc6e88ac9d926e179bc31b22ca5bd50e", "7f0a81e734c8db67a548a025c61ef54e438fce5274b51c72a7938feb515882b3ac1e0ec433a9f22788f7c11fe893de0e5fbbf10702a2bc55f5f7cf10784e837c" "4a6ce75da6712ec9f41cd22cff6b783f62787e8caf482459ecd7e5c7787f6e12af81c4d3cbd7632fb7b5a8180e417f70f58fbebf047fb0263c52fe202ff88b52", "d99d3fab33d489bfb69ff2374f99887dfc01b4efc5bf6b357bbc87cd2fbc84c0731ae4922036ba427cdfa33e93f20b0dbe5f63697c764321f1f4f2f5d8cd8d16" "37304e1807bfff21f00b56f70b81639ebff6cb8150f4b05e4b478f4faa2771570cfcc2b6b76fd70716d77b557bfc28e27769fcfcaddb1f7eeb5f079542464a1e", "1c2af9bbb2920b6aeee829f98451bfd7523f2f28f938af3eabefbfdf569fd5ef3bd24afe8ef67e47fd5c7deffd5f50f20bb5dcb1fabd89f6fc96fa7db5dc7b6a" "1ed49e99202e3ff382e1d971f33d4522f057f328eaa6fcda974de28590787af933c4bb58a6b6d7a56496aaedf182b437d7d026fcd617bfebfb0bf05b6bc223e5", "b74eda55da572e960f4a9562ff347a7456e5cbc7361acf58b5fda2c60fabdadb7386672d697e491fdf7f1054f24f619be7f86904bed32037ce7348e13ec3ca29" "2ed7efd22253df18ef9b9de72821f1f472d3f31c0685698644d00f7ced87df83790eabfb81fca01709359383c34ad17b5d8f753977fc8cb5d13cc7bb88f757d5", "631a51bed32037ed07ee375959ebf43a08dbdd381bc465772f23f09c06b981ffa5a9ca2831d6da18ef6fa19d2ce47d4d511be0fb3f7af036f4fbadcef7ae526b" "7f20a703bcd86a4be538d50ac7538328f0fdeeb463878eefcdce57fc98e1d961f89e2667244ee9a8cab315709b8beb98b58f14124f2f7fc6fe409319d20d819f", "9ac79e4e531b88ef38fec3c9abd0afb73acf273c97d7e55e8b612395c865a9176e552e8f63c0f33bcbf328bc55f5f5a2e1d971f33d45c2484d663aa8695b355e" "1f45e2e9e566785dd110f1f509c0e76bc433cbe73f89c0731ae4831e1d13067529707ae5e1f98254def73c3a73d887cfad12777dcce7f79b8c28c94d46ff3b2e", "10f5c46a7f930be2fb12a6ca389fadb26af222cbf3c2393fa0c526cb5f9dd737bb2f6172473cadfcb325789afc6ef13dd58c9ea239f2fd82c9d77ff002c471b6" "d51facdabf978e62c35874342aa4876e6fd6ed8a1443fb765a77f43ee2fd55f5384694ef34c8d7d7aeef3ffd0be76d9a156891ac9d26b08d073e687876dc7c4f", "91cc7abbb37cc3f30af3ed60294ebea9c73b26eb115c520f4d6e6e9cf0b04bd02ede83795cebfb83f2b5c0740f7aa5937da6d6f0a6ce8a85ecbe9de2faef20de" "dfe1763b4d2edbc4f197f9937a9b9acf8c431c7f71ae2588fb90c183383e9ef2df47bc0ffdfcc5bf77353b4d61ebe72f8bc34f7f78971a6ece0f6c69dc5fb31f", "76fac79ea223d271ffc97b2fbf04711eabf3bfd873091d46f286babe829f2bd44e3d4755290cfc0ffcaf4ffa795fb2fccf70c0ffcbf89fe188f3ff9f02ff5b9f" "ff5bd4237fde7392ebf96b21397240e5bdb4b798b00fffc3bcefe25c4b3afb7bff021baf3f6bfcde2cdeb3aee779c7245e1089a7975b28de0771fa35e2419c1e", "4ff916e4f3112df252bfabff1da878fa5af6e14ebe109ce7c1b788f17bb3cfb2b31cd66b2eeab74b022536fbdcde4c4ba4fbede3ff04717bebf3bcec73774bd1" "9344fbccc38f0672b61bcfeecb36e2f97711efc3bedadb76f778fdfdaf21ca5b555faf21f09c06b961fd0b2508ec7598e128f1ba3cf778f13e5797199ec3356f", "fccf97d44b933755dcf336c535a68e00d7facd95cfa135d95f402a92f839b4e3fffc0722c475acee1f8ac5887c59e8b8fcb5b3dc51ae56a10ef359296e1fff30" "41bc0fed5a9ff476e8c7e62f3e8dc0731ae4467f31e099464814a9eb384bc932cd315c6bfebd4dadef373b9eac2ec1d3e4a6ed6881e2662644d07ec6ff5003bf", "6075bf304a273d9163e1b45bace51ba1d366323bece66d741e8fd9f65c4194ef34c8cd8f1b9408d17993e529f9fc660441769fd7199ccb6312cffefbbce15c9e" "75e2c1b93c78cadfc2fba310bccff1728ecae5c5d4b469b7b4b011e1731b4eb0cd032c3b679991388a7358771e2082c4d3cb4daddf99e9887c9c07e67bd78847", "eadc865ea89fef7aaf4fbdae92e8ee47f6e9c0a09b73d887d7a1fdead3baee8f84739551787a399cabfcac784ada153c3857194ff9d09f5f9c6b09d59f1f23ca" "5b556f1f43e0390df285719c874d96e7150d58359e9347e2e9e566fdc067148dedcd3536750204f9ff2bb0fec7fafc5f6bfb0aa71c2b37ca7c37d6e7929e5a2c", "9cb6d1bafd2d8ccb6edffa9f710e5bfcfe2710784e83dcc0fbb428f22bcd5bac6b7fd696f5fba569f5e8c69ec2f62ae71ba97faeb30df4fbffece811c4f1adce" "fb43ae7835ca0add70a2178d4b8791746fc0bb6c14c7b7eb7d9028fb58d51e9f47fc2e6dbdff2bb73f1cabf739beafde0b393e26b6ee5fea89f22cb76abc3f8c", "c4d3cbef1a2f9cadfa9fe9883cff07bf71fc00fafd56e77f6f22d66cbb7ca94e3ee649c98522c70d22511bc57da0fdea93dede1e608bf37c1c81e734c89f88f7" "47f92ec5703163bf5f30591fb3ebfcad12f7d129906cdce74ffe0ed66f5a9effd96cb7d1bd14e9ac1039910ff97ea3f9a8cfd8e8bc1e68c78bebafb73b1fb6fe", "fcf27b57667b5525daaafdf924124f2f37b78f57d312c9f31a822fbe01eb322dcfe757272929ce5e56e3eea65866079d7c9a1b1523c0e7bbc5e76fc0be2c35c1" "be2c7dbd57b01fd897b5463cd89785a77c88ebe893dede5e83795c9378308fbb2e3c25ed0a1ecce3e2291ff85e9ff4f6f6105b1cffa3083ca741be78bda6365b", "bbb97ebed9f1616e099e26c7b55e53b31972f632f9dafffa3f306fbbad7cbfea3eadc37ea6ecaa7af22131e58971a7e9928f2bf91cc0f7bbc6f75f4294b7aa9e" "fe2502cf69902f3aa74d7f00518a2bb0549d56bfbf2df3b81393f85f5882afc9b19cebb450a1c4cfe1af7da803e3816df50fab8e07782ad3a9515422d2f01c76", "a453379d3d13ae6d341e9820de8776ad4f7a3bfc5998e75d110fe67971e1296957f0609e174ff913c4fbc0effa64f738d05df91fe2408beb0f712032781007c2" "53be5df76f5d20ea8dd51eefb5b0f5f751fbc59caaa4ce4bf3dcaafdfd10124f2f37132f9cea68137600fbb4d68847aabf2f54861d7f5e2ef8fc79aa52ee54c4", "c4759db3d13a7d68bffab4ae73d95e45e0390df2c5fd7a8de5ad3bbf9b5d82a7c971f5eb359b2118dff1fddb3f00beb73adf1f8a19892ad6b38f4e6a8f4e6be1" "b0cfdb6cd1c0f73bc7f75f429407f3bb4a9a98c4dfbd3821ccefae130fe677f1943f41bc0fed5a9fd615ffdf9671c25de341304e585c7f182790c18371029ef2", "21febff877ad648fef938bff4b0c37cf21feff94f5c20cb7013b8073dad689478ae7292a193ebbba4c32d56ca4cf86c35cd45fc8d9a8bf0fed579fb633feafb1" "3cc4ff575ed7a3da0cc1f84e10faf5d6e77bd741d27718b93a71bbc25757ac4b60bdd1d6c846fd7ae07b7d82f8ffe2fa41fc5f4910ffb7061ec4fff1943f41bc", "0fed5a9fb633fe8f6f9c70d778108c1316d71fc60964f0609c80a77cbbc6ffdf41d47b557b44edbfd5ee6f09defe70a2dedbf2ad5f50f20b59c9df1794fc1df5" "f9efaf94dc35545f1f119b3fa06ab07f60d97874aaa30d8c472713983fb0be9fe8d56a8da657a8e52b85b258e4f7130936e3b5919f80f6ab4f7a7bbb876d5c00", "f7baa3f0f472b8d7fd59f194b42b7870af3b9ef281f7f5496f6fae2d890769bd7b98375e351ea4d90cc17efe6ffcd5ebc0f756e7fbce41a2d86a14aba9403cb7" "1fa8d68a07ad66c146e70201dfeb138aefcddefbf229049ed3205f3e6fac7c6f5be68bcdf6ff8f97e06bf235cc2b91f6077f03f73b5adf1f1c55f72f79efa849", "35aeae4e4a6e6f36103f7e14b38f3f80f6bc38d792defe0eb0f907b8174c49702fd8daf0e66957f0e05e303ce5833f589c6b496f7f49dbc587ee3a2f00f1a1c5" "f587f810193c880fe129dfaeeb852e10f5c66a8fdffa456cfee01e02cf69901bfc81484b6d4aa0cbcc888eb4e9faa564d5714179099e2637eb0f9e50986a3904", "e789bffdd52fc3b8c0ea7ec19770b1fe82bf58a826ab52f5c4d73a2af5641bed2780f6bc38d7126abd9059fb7b0581e734c80d7e80a3c416c3d5db9756e57fcc" "71a155ee0fbed119d9b8d0f823af97be03fcbf263c52fc7f3dbc4a05a878b375e0aae7637cb913effbaf609e60ebda33ca1e56b53fd43a7c6ddfc02bba4f7f36", "a8e49f52f307d8f603bc80a887539534597e7e81bc55f7034490787ab9997506731d91ef1fc079426bc423766e5ccf9faff4d8e8c165b85d2926ca722f1aadc7" "edc3f7d07ef509f603c07e80a7fd8e15faf9b01f608d78b01f004ff9c0fbfab4ae73e43e86c0731ae48be77bb5debd75f703e497e069725cf3bd9acd10e4fbaf", "9cbc0a7c6f75beafb57d85538e951b65be1beb73494f2d164e2780ef778defbf84280fce9153d2c424feee9d3705e7c8ad130fce91c353fe04f13eb46b7d5ad7" "3972db324eb86b7c08c6098beb0fe3043278304ec0533eacff599c6b695dfb88ef23f09c06b971dc2049b42857299669cc5411125beaf7ac3a4f5041e2e9e5a6", "fb114f288ef8b8e0b9c8158c0bacee0fdceecb51201a0fa75a9961f96c94ac25032519d603ed607b9ea67110dbba1fd4b9a54e55c248924089126dd5753f4924" "9e5e7eb778e24c37b388a2a6a5875d7276107cf18db781d7adceeb57272929ce5e56e3eea65866079d7c9a1b156db4ff0b787d71ae253daf87601d90fa39ac03", "5a9c6b09d60191c183754078ca9f20de5f558fe788f29d06f93afcc07d469ac95b22c592b5c3c92362ebfb673fb1e980f5fda87503d33ff6e63a22bf9ff73de0" "77ebf3fbc130cbc62f078d4eca773a4c3744b7972bfb607dff0eb4df59c2b7ce13faf5283cbd1cfaf5cf8aa7a45dc1837e3d9ef22788f72dd3afaff17dae2111", "eed717b1f9834f20f09c06f913fe20351bd1d062849d6ac681afdfff41c3f3e3fa28927a9b9a2f20c2b59ea760787618bea7c9cdfb83db0a231ae7ffe24fbd04" "717eabfb81389729844327b911d31de63b42a39b9773d7368af34f10ef831fd027bd1f38c616df59d60f9f2aa04b0d37c7f366c78751249e5e6e6a7c38d711f1", "f539efbd0cfc6e797e177b2ea1c348de50d757f07385daa9e7a82ad9e83ec709e27de0777dd2db619528bfcf2e79077e7f3abfabd7ba93e4f73f057eb73ebfb7" "a847febce724d7f3d74272e480ca7b696f11d6e3df94b72deb7404443d57b5bfe710bf433b8fcd79fbc37126a8fc91049e5f110f781e179e9276050f781e4ff9", "76e1f90b443df1aec7cc417c66453c88cfe0c253d2aee0417c064ff9c4ee59c1bf9ff6fe8012e7472b9f0b22df30fcae0b44bdf1f27c1ddb7cec2711784e837c" "aa9cf3a952ce9bbcc8f2bc70ce0f68b1c9f257e7f5995636770edbe48e785af9674bf034f91dfd8062564fd11cf9753a93afffe005f00f56f70fd2516c188b8e", "4685f4d0edcdba5d916268df65a3fdb566fd43c3f0ec307c4f93afe71eae597bef328d7349a685cd9ebf83c28373f69564e3f3fbe09cfd35e2c139fb78ca9f20" "de5f558f6f22ca771ae4ebe1f9583ebb91f5f93f4b8edf3be7975373db18bf4f4ce2bd85c4d3cbd7631f73ed91be9739f4fd0ffd25f0fe9af048f17e69285742", "c9b3fed509e31ea5d2d951e6dae5b751fc6782781f785f9fd6d5af5fc6c353e61a34e2d6e5fdb791787af9da787faa3db2f72802efaf138f14ef370ee52e7710" "c834eaa50a9fa835e803bed6b3515c6782781f785f9f50e769a2f030f23ec301efdf9df7a7da03deb70f1e29de7fd44f57e444fba4de0ccba193da117fe26989", "708efe8ef3fecf11e3fd2e2549f17de0fdbbd987a23dc2f7a607ff1a78dff2bcdfbd0a45fcb57621d50fd3f9ea91c7151d76681baddf9c20deb76abbfe16a2be" "abdae18f1b9eb5a4add7176e7f38ce07953fb43cade649259f54d4e7a0928f23ea7341cd3fa7e62955ae7e6f72ac7e1e56f308b1f90481bfa2ad3c5f1c42e2e9", "e5779b2fe605696fae216d5910497ff2c5effa605d90d5fdc949bb4afbcac5f241a952ec9f468fceaa7cf918ce6dd85a7f7281a8efbace6946e1adaabfe71178" "4e5522cd367b3980df9fb61e48d2367b3948da4110d603ad118f14bf5354327c76759964aad9489f0d87b9a8bf908338d18ef37b9818bfd779699e03bfa3f97d", "aaa30df03bacf75c271e297e172ac38e3f2f177cfe3c5529772a62e2bacec1ba9fade577945dac6a8728bed5e241afdcfe30580f2a7fa8f11c4705db3eb07b88" "7a380d72c3b99c4f6c8fdbd43e30b89f7371aea55b719e6f7ff5cb10e7b1ba9ff0255cacbfe02f16aac9aa543df1b58e4a3d19c6015beb27b4b8fe5dedf099ce", "f999a8f1ff7101dbb860d9f90c524f9467b955c70561249e5e6e2aee33d511f9fdbe10f759271e29bef72662cdb6cb97eae4639e945c2872dc20128573f96fca" "dbb6f541ef20eabbaa1da2eeb9d5f83ea8fbd4302fecf879251f87d5e7889abfa1e609559e08e2b2e37f81a8afd3209f9d86d095992e2d9db7695698cf05cfd2", "a6c60defde114f2b3fbb044f93df7d3ef8098d11de4f36fef7af8c61bc6075ff71966d0eabe96120576fe7ceca890cd76af02ed847fcecfe03673bbe5fe7bb5d" "9e534e82d1c7d5898e176ed60be5b1c593e0de2f149e5e0ef77e3d2b9e9276050feefdc2533ef4f316d75f6f77696cfcff51049ed32037f07f8da5a4878a1614", "f9a6f8dfacbde490787ab959feffcc4c637b8ac608af3b78f97bdf8071c1b6f2fe4f22f09c0639cd470fbbb9e6e1f5d1a578ca97e85a2773dc7700efef503b76" "e0bcefd70cef331ccb70b422b76a3c88acbd281a236c2fbe177ff93bc0fb6bc223d5df0fd7a89014ce790b03f6b0c8c9f2e1c965af67a37d67d66ac79be2fdd7", "b0c5ff5f46e0390d7203ef4b53955162ac65d97e7e1a89a7979bb5134d511b88effcd183b7a19f6f75be77955afb03391de0c5565b2ac7a956389e1ad868bd90" "d5f9fe4b88faad6a7728ded3e2fd2edda7da7e606dbe58cdc7dabc705cfd1cdffcf01dfd833a2e902d3b1e385a82a7c9718d0764e2eb4983fff4ab9f03ff6075", "ff20b45252f360581cb803b1a925fa23bdf831c4ffb7c73f5c20ea87d7ee32d8e2409f40e0390df2457c2fb767abe47976764703a9f5abc6fbc5ccceff169178" "7a391e7bb9d1d826f615bf19fb26ccff5a9dffb38d6a209f3bec27e2e946aec7e70bc7d191c746e78e02ff2faebfdeee8a9b5eff33e7ffbe449f8b7473f6f7c6", "fafd56d94fa6d8cb2d8d11efff4f7ea7f1fbd0ffb73aff0bb541ce1d7097d9f2fe69365c0fb80e1a7cd446fb8ec9dd237c1a59de9ca5696f936eec298d596dd2" "4a161b2a0d3b4a0b34d7a0b9faf526ee118eddf8815f4394b7aade3e85c0731ae4063fa0ac8b9a6dc268d15c92e21a2ca67961ad1e3f8aac9722e973971c7fc5", "615b5ffc0889a797cffcc10a06b4c0721efb8405ca7b28a8e513f40bbff28fb03ec8f27ea1938f66e2d7f54a247e5497ce7c9192dbcb2661dee0a6bc3ca27ca7" "41be62bb5ed2cf0b6742e590c04c5d0259bbfbfbcfe3b2bb570ccf0ec3f734b9e20f9ef4869be27fe83f2cceb5746bbef897beffebb03e685b797fd575a12707", "ac8beab7f32d8639cbc57ad7725e4cb20efbf03eb1fb8531f4e7d2a94ab92f08bc28d38d05ed5bb8fdbb2e10f55e973f80f181922626f1607cb06e3c25ed0a1e" "8c0ff0940fe383c5f547f9832f21ca5b555f9f45e0390d72833f78ba8b746cce2f403f63f1ef5ac1aec03fac118f947ff0486e4f998a9cd6dccd929771f32295", "6ff76c74ee8459ffb013f3cae32f609b57fe1802cf69902f9a5756bde35c6ed5f5a4f6ef4f043b7f01f3c996e77ddfe551dc7f19a0a77da1c420338889570795" "47365a4f3a41bcbfaa1ecf10e53b0d72bcbc7fbf4e0f28f67cd8a2bb5dfdefb940d417af1f686f7a3f01ec3783fd66063c25ed0a1eec37c353fe04f13ef0bf3e", "e9ec70d2c1360ef83802cf69902f1a0748cc883e1764dd7aff8b3bd6c798488d030a8667239e26c7633f9ac61e7609dacb1f7ee777c10f58dd0fa4b38976a9cc" "46d9ea7e27194da70e13a32bd946f19f09e27dabfa0154fc7e2dfb90dfb90ccef3b19a5fa87950cd1d6a7eef12dbb861d5f50f06bf513faf53d2ec82035ce386", "65f7244f913d6e073e7f9141e2e9e52bdad953e7111465c17c819df048b53b463af5674ed26da674907ce4673bfdde233aee007fb1adfee202515fac761864b1" "8d1b3e89c0731ae48bf7a5315c2b328b896f6edc609573a9b57d699ac6c8c791605fda3af1488d1f4623ef692c7b75c052be70279239b8ae568e8a36da973641", "bc6f557f2020eabb967b0b042138cf0b02b6fd6a0f10f84e837c917f68d1f28cea227c5760e961e55aa0f18d179e759e6162128fac5d3da939f2fe02ceb35e27" "1e297f713c0c87d37d7fa7341a76926db619e1ca9e18cc3bef72bb9ea60730ef6c120fe69d71e3296957f060de194ff966c7ff2788f29d0639e6f14229161f26", "62d92c59fb7bff0278df241ef03e6e3c25ed0a1ef03e9ef2edc2fb287b58d5fe9e47fc0e2d3ef48aee533a38cf820d257fa7417c1e6176abdb5439e74d5e6479" "5e38e707b4d864f92be5cecfcdcd234cee88b7c671e4adfbf054f37a8ae636309ff0f51fbc007ec2ea7e423a8a0d63d1d1a8901ebabd59b72b520cedbb6c74ce", "e904f13ef67b90a78dbacd77e9bd36d560f6ca5493decbc61221e99aabef25671f55b295e835b7373b6540fb3b4ccbd4de60ffa16bafc437a4bdfd87f7ca9554" "3cfed978265f98af25d98be5b3c4cfaf9ca5709054ffbc4b4952dc6ddd7981b791787af97aec43d11ed9fd8be3e85f7fe82f81f7d784478af72f87d2c975e0f0", "20956d5c0622b57c341f6db136baef6c8278dfaaedfa1d447d57b5c3170dcf5ad2c609c1db1f4e4acae3a4a87efcf36afe736aaedd93135673ed9e9c0436bfb1" "6c3da8c05fd1b30d0b9bf21b5f36891742e2e9e577bf3f7baea10ddc7f30fee2777d302eb0ba7f386957695fb9583e28558afdd3e8d159952f1f47c03f6cab7f", "201a477aa71d54fe08a939be7b12ee21eae134c80df30ab3eb5e28812e33233a320b8748565d8f4aea9e842714467c9c39fef657bf0c7ec2ea7ec29770b1fe82" "bf58a826ab52f5c4d73a2af5641bcd334c10ef5bd54f0888faae653dea58bd57d391c2362e58766f99d41367dbd22c3b2e0823f1f4f23bce23b0cd3eb737d311", "f9f982e0378e1fc0bd6856e77b6f22d66cbb7ca94e3ee649c98522c70d2251584fbadbf305e37870997f59557f2f199e1d86ef697249101b5d21beef519f37c5" "f766cf33a590787af97aece5468b9b881305bf0ff30896f70781639ebff6cb8150f4b05e4b478f4faa2771983fde757f80afbfbfec7c6996a71a527cdfb2f3c7", "e7483cbd7c3df6a16a8fecf9e821e0fdede5fd55cfa518b0d74d3125546537bf7f9a491e503ee1e0f6b9f2bbcefbdbd6aec788faae6a87a8b88bd61fbfa7fb54" "9d17180795dce153f320cc0faf881742e2e9e5303fbc0c4f49bb8207f3c378ca9f20deb72aff938dfb8783ca1ff8d69142dc5f4910f75f86a7a45dc183b83f9e", "f22788f7adcaf71788fae2b5c3c7719e31a23c58f7f3743cad7c58f7b32e3c25ed0a1eacfbc153fe04f1be55e3fe44fbff8e4c709e8d8fb09d37f16104bed320" "379e534dc9cae79bf20b66c705b125789adcac5f982a6a6e3104f70fffedef71e007acee0746d16cad92491e511dd63d90ca42526a760e611fd9d6fa810b447d", "f1ceff66b0c57d50fbd69caaa4cb369801d3a0ad1af78922f1f4f2bbc7f9350d298640d00ef612df067eb73abf97f2017a54abb6da03e9b496e27c8f2a9e74d9" "46e74d43fbd527bdbd7989f138234d7fb2c80cadcae371249e5e7ed7f8fdf48f3d4d4764cf7b087ee35f2580c7adcee3b9fae5494a8cd79b71f9d453df2f1e84", "1f65c336eaa7038feb93dede42d8e230abda9b210ec3f6259e1d6cf0fcff774de2a590787ab9d9388caaa80daccb81fefa3af148b53bda1b7757a272bc762c1c" "d713435ff7b4712dda282e6f769ead8228df6990636bc7f7d5bf72c3dceddf7181a82756fb9b9c619b9fbde3fdc22c2550f5cb87c3162d8bcd99dcaafc5f303c", "3b0cdfd3e4a6cf8b5534b6a7688ce4fdc26388c7af118fd4bafc2e9fa81ccb95b3424d1ef847e9cb4ca2923a76d887ffa11d2faebfdeee5edff4ba1c95f7fb12" "7daefc69d57539a4fa0b9abd3cd618e971e2e4f9fff28bb04e735bf97fd5fe7f3492f4862e5d6efaea91f7a858ea1d673a1501d669de94778128df6990e3e6ff", "fb357a7656bbdc9e2dc0e3d906d9f9d830367ff0d3083ca741bed81fdcfc7c6ce38065fb02ea6d6ab60dcc72eb3435fbb9d118f9759addfd37c01f58dd1fc443" "9ecca9dcc9a543bd93a33e3764cbdd6cc046e733906ccf110ced39132a8422472181d9c8b9fe7fff795cf6f78ae1d961f89e2657fc406ca8a8214a0b34d7a0b9", "fa352efe5f763e449fbbe4f82b6e03e38155cc459a7a27bab1a7188b6a324af6a4c6488f07c6bff4fd5fff0ef0ff9af048c5834e0e5817d56fe75b0c73968bf5" "aee5bc98641dc0ffbbceff5f4294b7aade3e8bc0731ae48671403a5529f705811765baf124c539f0cd0f3cab5f307b8e5b0389a797af68470b3cc2635b7aba12", "1f0a331c8276f52bff08f7c46fad9f58759ce091dc9e321539adb99b252fe3e6452adfeec5ede3272688f757d5e35b88f29d0639f6b8519d1e50ecf9cd04aa55" "f7f79a8b1bdd78cd8dede3827ec6e25c4bb7e6118ebefbbbe00facee0f9295d323df7014ce24dca14ae860d4f727ce12308fb0b5fe80e8fd2fe37250c9d57dbe", "8e2c363ff12aa21e4e837cb19f983eabf24df98977ef88a7959f5d82a7c971d9d5f403c2fb7ec7cc7ffdbf30af6075ff70cc0b433a92f2f3f5b42b9a4b48fd44" "f5206223ff00ed7871fdf576f771181fa8398c0f16e75a82f101193c181fe0297f8278dfaae3830b447db7f5dc8765ebfb455ae8cecef6b1ea7ee1f5ee3754f6", "0b2b3a223e6ffc3fb3bf0ffc6e757ecf24af6272205c19e4ddaecad0273442becbb08dce7786f6ab4f7a7b7b0ddb7ee1675b2774d3afe728b1c570f5b665f70d" "5497e069f215ed03bd50e87157e0466764cf87187fe4f512ac13b23adf5f0faf52012ade6c1db8eaf9185feec4fbfe2b1bad1305bed727bdbdfddc0ddfff1aa2", "bc55f5741f81e734c80d7c4f49122dca558a651ab3a38943624bfddea6faf756d937f6a4e288ef1b7b2e7205fd7dabf3bfdb7d390a44e3e1542b332c9f8d92b5" "64a024db88ffa13d2fceb5a48fe3e0bba76bf9b96f924089128dcbde5f46e2e9e506ffc3700d7a98e2646cfd85e4927a68f2bbf517663a9bdde8a2698fe4fef2", "e08b6fbc0d7c6f75bebf3a494971f6b21a7737c5323be8e4d3dca868a3f80ef0fde25c4b7abe7f7c3edc1851de9ae7711929dc675839c5e5fa5d5a64ead8da03" "2e7f60d69e4a4beaa1c9cdda935191e4effb1a7fed87df83f53d56f70ff9412f126a26078795a2f7ba1eeb72eef8196ba3f95d8807e9d3bace8bf82402cf6990", "4f15703e25b1f3262fb23c2f9cf3035a6cce4ecca8cf6ea9dadc7acec91df1b4f2cf96e069f23bda89e2069ea239f2fc3ff9fa0f5e80f181d5f95f3a8a0d63d1" "d1a8901ebabd59b72b520cedbb6c140f9a20de87f53dfaa4f70b15e27e61f17acf2ed5e14546bec6373f40fa1c2152e301cd7e348d6dc01ffcc9bfe9c378c0ea", "fe801ad1ad6e4e88a4037c2e1feab45c8c974fdb683c00ed7971ae25bdfddddb74bc08d6fdc3baff25784ada153c58f78fa7fc09e27d1817e8937e5c708ccd1f" "98bb6780e19afcf97c0bb055f7ff160ccf463c4d8e6fdfe04c6344ef19f8e0375f87f1c0b6fa8155cf95cbfb4b67897a51f6709e61a4116fd329b61f76801fd8", "6d3f50dd9271c18cd59489035cf1a11790f55124d31a78dc8ecd8c0b70f981db130604ede68f213eb4bdfe60d57141d8dd3fca04ae187f3e9f6c36fcd799e655" "e9cc46f305d09e17e75ad2dbdfe7b7c40f407c08e243283c25ed0a1ec487f0940f7e6071ae25bdfde15b4774473fd0a6a4529f93992e1d13455e942ceb0748cd", "2f1915b681f5a3a57fe0603c60753f502bbb6b3dc9475593c7d142337a7826842b69d85fb0757e4040d47355fb7b0ef13bb47343757c388e05953f22305fa0e6" "305fb0b8fe305f40060fe60bf0946f177f7081a827de798238b6f3857e0281e734c80dfc4fcf3ab7b3cf61fde8cae70bcd75b681f1c09f1d3d82b8d0b6f2ffaa", "e3812157bc1a65856e38d18bc6a5c348ba37e05d51e0ff9de47f47d276fc4f7a7e18f87f5d784ada153ce07f3ce54f10efc37a217dd2d9e1a48acd0f7c1881e7" "34c89f386794533e87f8cf339c33ca918cff4cbefadc6f02ff6f2bffaf1aff499e563b6c3a14628ab96eb17618681ee71f151dc0ffdbcaff02a2be6b9917709c", "0695fc04ce9d50f3c91df1b4f2e1dc8975e3296957f0e0dc093ce56f597f6f653f41d6ee3e87cd0fdc43e0390d72c3b840a49bea14f17034d700ae38915dcfa1" "fecc8dc6f6548d11bf77e66f7f8f03feb73aff5f56872d399493bd54e7512c5d0dd51b42a899b00fff437b5e9c6b496f7fbe202edefd51049e53958834c57619", "6e63f3c166cf238c21f1f47273e711ce7544f89ed1c9475e790978ddeabc5e9773159f3b92eae562e9dac0d3ef9d66f6dd36ead743fbd527bdbdbd7ec3e3a8b8" "d2aa7afa1002cf6990cfa2131aa7cfd22eacf329dcd5300491195032bd774b69e4e337c1ff78f22aacf3b43ccffb0ebaac94e18e8683c30e95aec65307852eec", "ffdac1f63c4bf8ce897b1581e734c80d719c26cb537276fa19abca37e507ccc6fd32483cbddcecb8efb1c288df23f615e07febf3ffe0d0e3f5d3e9a37c331a90" "cffc5429136180ff217e83c25b556fcf23f09caa8416a4796ed5f84d0889a7979b19ff4d75a4750348c6e5fff76ffe0cc46facceeb0d564ec7e3921048c84cd8", "5d0f45e335e9c446eb37a1fdea93dede1e60ebc77f0c81e734c89fb81f2c3eeb9846584ada2ccf9bedc7e790787ab9f97bc01e2b8cf07df07ff00988d75b9eef" "af9a1ea67b1d73bb9262e6b2bc1ff226caad7c18f87e37f8de456cde7516a29af5dd7781cfb1c4f354a380b8bc3df048f13977d6393c12d3978944c623f2f488", "3fe40b0736eabf433b5e5c7fbdddfd0cc4e3d5cf211ebfb8fe108f278307f1783ce5433c7e71ae25bdfdf9b1f5eb979d7750e7597eb6f26653ebe6b77b7cc70b" "d2de5c431b18df057ffb6f3e0df119abf37a64d4625394e7e8b49216469d7d17c350e9b3b87d78ddaaed5740d46b3de7694682ca1f1e6cfdfa3b9eb3cc48e13e", "c3ca292ed7efd22253df18ef6fd9b93a4f89cfeb15b6817375bef6c3ef41ffdeea7e203fe84542cde4e0b052f45ed7635dce1d3f636dd4bfb7aa1fb840d40baf" "bd05a03fbf229e7ded00faf3ebc483fe3c9ef2a1fdea93fe3ce4e8d6f6dfcddaffcb4beaa3c98df5e11af430c5c9d0af37d41bfaf59bc5837e3d9ef2adea0f88", "c67726a5e03c1f9788f5f39b2c3f3f18d9aafdfc08124f2fbfebbaac669fdb9beb88fcb9d9df387e00bc6e755e3fecf9f3951e1b3db80cb72bc54459ee45a375" "1bf5f3df45bcbfc175158b79fdfefc984291e25af4edfa5f20ea87d5ee0a036c7cbe8c5fa71dd3f9110856dd171545e2e9e566d6d92a3a22bebee64f5f8675f2", "96e7f316f5c89ff79ce47afe5a488e1c50792fed2ddae8bc32e0f3c5f5d7d9dd05593ea786c0e7cbf89c1a12e7f3f780cfadcfe762cf257418c91beafa0a7eae" "503bf51c55251bed7b9a20de5f558f6f23ca771ae4e6f95c3d5f9c6ed1e2f9fcb3f3062309943ce57991b41dbe05fdf515f1a0bf8e0b4f49bb8207fd753ce54f", "10ef03bfebd326f91dfaefd07fd7d2aee041ff1d4ff913c4fbc0effaa45f5ff398df899d836a5c5f431d4f1ff0b5075ceb6accc6f7524beaa1c9cdafab992b70" "03ebb326072ffef277c02fac098f547ba42f63f5925c3eb8ec16aea3a71e572c1c3aee44c02f90f70b7a9fc0d25c4b6e9f733cc7d1ad06613b7c87c3b6eef2e3", "083ca7416ee0e33e27312d8e6edc1c6cb6a97181593f9047e2e9e566fd804e61536f40709dfd1fc27908dbeb0756bd87b69095cf12cd4ef1c8978bb70f039deb" "fc692dee003fb0ad7e4040d4772deb2ddfe782f37cf2d82f5c20ca87789092201e840b4f49bb8207f1203ce54f10ef5b95ef2f10f5c56b873cc483201eb4b0fe", "100fda2c1ec483f0943f41bc0f7e419f7476f82d019b5f780581e734c817f17181ed4b9bda7f6596ff8f90787ab969fed714457e1f56f5c332f0bfd5f93f594e" "9e9e963df9133941e52f3ba9a36cebe00ad601dd94778628df6990e399275662bafae962fdefb940d417ef7c400ddb7cc02711784e835c9d253f6ff222cbf3c2", "393fa0c526cb5f9dcfb733988f0b1913aa3e5ab286fda86ee1299a237feec2e4eb3f7801e24556f70bd2516c188b8e4685f4d0edcdba5d916268df65a37bcae1" "bce4c5b996f4f677b8e9f9614505d3e7267f2ecfe49bf20766c70505c3b3114f939bb61bd568148d3dec92b397f107bff93acc0f6f2bffaf3a3f9cf797ce12f5", "a2ece13cc34823dea6536c3fec00fedf36fe47d9c3aaf6f73ce27768f3c2afe83e0d0795fc0d350f419cc8241ec489b0e3cdd3aee0419c084ff976f10702a29e" "6b5927e4480595fc73102f52f3c91df1205e440a4f49bb8207f1223ce5dbc53f901d2f7c3ea8e49a9f0863f31377bc7771de0dce325c5f52e5561d3790ba77f1", "b1c288c71d61dcb0463c527ea1d33d08c7c2d7c533ba3b60652f9d8b7b027d1bad3bb58b5f203b6ec806953cb8b5fec02eeb50c14f60c79ba75dc1033f81a77c" "bbf8890b443df19e53b11d7ea1c27469f00b18fcc25c91a4ed28087e618d78a4fc42f7513de3f115ca898c90f637a2d9de803f69dbe89e00bbf8857710f55cd5", "fe5e343c6b491b3f046f7f380e2b8fe3a89a6be389989ae7d4cfd5e7a93f513e4f6ddd7cb55dfc09cc6363c79ba75dc183796c3ce5dbc59f5c20ea89d7fef0cd" "477c1481e734c80d3c5c6329e92133a4e6675fcc9255e72372483cbddcb4ddcc34b6a7686c663104ede5e5ef7d03e6a9b795ff575dd75a094967a1abc871261c", "88b822ade4a3cb2bd1e7b00fff433b5e5c7fbdddb9b783f73996e168456ed5fd0c84ed65ae31c2f6e283732eb697f757edf7876b54480ae7bc85017b58e464f9" "f0e4b2d7b351bfdf62ed7843bcefc5c6fb77bc5f7ecefb7d893e9f0e7f667f6f8cf7cd8e13cb4bf034391e7bb9a531e2719fc9ef347e1ffafd56e77fa136c8b9", "03ee325bde3fcd86eb01d741838fda687e7982787f83e71cadc0fff76bf46ce5b9dc1669a9cdb3a4cf391aa7b0f9834f20f09c06f9227f70ebe7638bff3cebf9" "a766fd411189a797e3b19f1b8d6de0dcbbe09bb16fc2fe66abfb836ca31ac8e70efb8978ba91ebf1f9c27174e4b1d17e8509e27df007faa4b7c3236cf3c3abc6", "238de75ccc8ffd736c2e1e64f61cece4123c4d6ed66e1445913cd722f8f67ffb088c03b695f7578eff67aa67816ee3540c9d78fdc37d4fb5ebca1d39ecc3fb10" "075a5c7fbdddf937ddefd782193753bf9b9af7b54cbf5fd5d82d93992782fcff15b8f7667bf97fd57e3f57bb3a09d16ccddfaff8e3fc71fc20739d39b0d13c80", "5ddab380a8e77af6a3bd1e54f2adf10bc33a5593f61de01756b6234563e0176c8647ca2f548e9395cbe13edd39f044b8b62bd08d95da2d1bdd8300ed7971ae25" "bdfd3d0ce2e25dd479194e5532fd91f37c533c6f36de1342e2e9e577bdf7acd9e7f6a63adac4fd3693e307c0eb56e7f55eadd6687a855abe52288b457e3f9160", "335e1bcdfb5a8ed737367e9f257ce758c339754fc78373eacce2296957f0e09c3a3ce5833f589c6b496f7f01d80f0cfb8117d67f05fb81fdc06bc483fdc078ca" "87fdc08b732de9ed2f8e6d7c70c7738794e0bf744509aa7c537121b3fc9f45e2e9e578d611cc35363718d80f6c0f3c52eb818e47070cd73ba8253bf91cf788b9", "cc24a3c769877df81fdaf1e2faa3c601634479b01ff8e9785af9b01f183bde3ced0a1eec07c6533ef0fee2faebedee0dd80face6b01f7871ae25d80f4c060ff6" "03e3297f82787f553dbe8528df699063e5ff27b77f11de0f9cdbf4fa4fd80f0cfb8197e0296957f0603f309ef2613cb0b8fe7abbc3778fe51defb9bf59ffaf4d", "015835fe5f303c3b0cdfd3e4f8d60b2b2643701cf0e9dfba04deb73aefd784703b93cae743e9423351727b0fc40c7f0a71a0ad69c702a27eebd907e6092af9e3" "f3412f10e5af6bfdffb6acff817d01fa04fb02c8e0c1be003ce543fbd527bdbddddb74dc9f91c27d8695535caedfa545a6be75fc6f36fe535a520f4d6e7afda7", "4191e4f7058cbff6c3ef813fb0ba3fc80f7a9150333938ac14bdd7f5589773c7cfd8a47dfc81d9f67c8c28df69909b6dcf9420b0d7e5e98b9418ef737599e1b9" "0dc481929b5e072acd35f0501b1d6cdff8c032f1444593377d0d82e384dff8abd7c12f58dd2f740e12c556a3584d05e2b9fd40b5563c68350b363a17c2eaf1a1", "0b44fdb6f5de00d837fc743cd8376c164f49bb8207fb86f1940f7e6071fdf576e7db74dc48d92720e5fa2c1beb0af2f5c6e687adb55ef496c6c8ef13feb3df80" "79e2ade5ff55f7890db2d4282f788bb49c1d96ba7ef194aa462a0efbf03fb4e7c5b996f4f6f700dbfcf08f22f09caa8491e85e9f6237c6f366e79162483cbdfc", "aef348d33ff6541d118eef04fffb97bf08fd7aabf37a5a18edf7fcf9c6f1a37dd64d97e89333d91370d887d7a1fdea136a1e584094b7aa9e50ff2f4e433e8f4e" "28bff7bcce8bb455fbef27483cbd7c661785bb1a862032034aa6f78c4a9b5a0a419eff77c0f3dbcbf3abc66f1207a12153f27706aee39ecfe589b4b2a588cf46", "eb7da03d2fceb5a4b7bfd782b8ecef8ee7be7194d862b87afbd2aafb7dab4bf034f98afd02a94d8974634f19eda9633ee3d0ef466764cf7b187fe4f5129cf760" "75febf1e5ea50254bcd93a70d5f331bedc89f7fd57368adfff39e2fd55f5d84494ef34c8d7c4fff76bccb4795f6b9f12b6c760155b3ce745c3b3e3e67b8a8491", "248112a58df5fbb7f07ec75b6632d3cd6c65b0a625a2f73bbef8c6dbd0cfb73acf5f9da4a4387b598dbb9b62991d74f2696e5484f53a37e5150ccf0ec3f734b9" "2df6738dc341e58fe0a6fbfb70ce339cf3bc2ade3ced0a1e9cf38ca77c38e77971ae25fd393f296cfee0c3083ca7416ee0e10633503eb7ea38600df3420bed65", "aa28d2f3ba1fff7f0d1807589def5bfe33ba506c0f1abd542752114e6239e184b351bc07f87e71ae25bdfd6537bd9f4b39d4a7458b7d55be29de37dbdfcf22f1" "f4724ce740cd3406e7fadb088fd8f9ce9e7421954d45b9dea9b77a255ef7db81a39c8df81fdaf1e2faebed2e8a8df7e15cffa7e3697238d77f65bc79da153c38", "d71f4ff956e77d0151bff5c4ff6341e58f18ecdb523f877d1e8b732dc1be2d3278b06f0b4ff956f7071788fae18df73fbed77143f3bf37f11fabc67d32483cbd" "1c9f9d108f1342dc678d78a4faff8df67eb8e60ae5d866221e70b7ae8e8eeb8d2ac47d76a91d4f5318e23e6a0e719fc5f587b80f193c88fbe029dfeabc4f36ee", "13092a7f4420eea37e0e719fc5b99620ee43060fe23e78cab7ba3fb840d40f6fdc07dffc2fdceffb743cb8dff7ae784ada153cb8df174ff913c4fbabeaf10b88" "f29d06394efe5f70bd2f613b3cc6e60fe07e5f149e5e0ef7fb3e2b9e9276050feef7c553fe04f1be55fd01d978d159709e4f1e9f03b1a1fdb9eabc81bcb17182", "d97125a9fdc0da7c814c7c7c10fca75ffd1c8c0facee0f84564a6a1e0c8b03772036b5447fa4173fb6d37d5f13c4fbe00ff469557f7081281f57bc7eaa902e35" "dcdc78c0ec7ee028124f2f37754eec5c47a4e38893f75e7e09f8deea7c2ff65c428791bca1aeafe0e70ab553cf5155b2513c08e60316d71fb50e748c286f557d", "7d0c81e734c80dfd7b2da83d53c05c6ed5f5a079249e5e8eef1c29c56408f6f3bf72f22ac47daccefbdee851d653aa7addad76393592f2aef2b55401dedfa176" "3c4b0fb1f1fec711784e83fc29bc3f37fd4df5f3cdda4bc1f0ec307c4f9363b59721c97340279ffe2d58ff6379de1f260a87eec4b07499099c15dd95fca361f9", "200fbcbf35ed98683cc71109ceb371185b3ce77904be53956837b76f783ee189f33ecdc679424beaa1c9ef1ae7999dfeacddd53e4b04797f72fc0078dfeabcdf" "abd51a4daf50cb570a65b1c8ef27126cc60bbcbf35bc7f81a81fde380fbe75ff773cef6dcebb5986eb4baadcaa711e5271c1c70a231e1784f39dd788478af73b", "dd83702c7c5d3ca3bb0356f6d2b9b827d007dedf1ade27dbdf3f0ace338cebff3f89c0771ae4f3ab6d38f9bcc98b2ccf0be7fc80169bb359ed7a9bae5f6e6e1f" "f0e48e785af9674bf034f91dfbfd8a393d4573da8080e078e0eb3f7801e67dadee17a4a3d830161d8d0ae9a1db9b75bb22c5d0becb46eb3ec12f2caeffe2753d", "aa5f80f3e02cba2f0cf605db150ff605e329dfeafee002513fbc7677846d9d3faefbc02e4cd683745c08eefdc28e374fbb8207f77ee129dfea7c3f46d46f55bb" "43ad7fd1fafff7749f96824aaec5878a6a9edf3a7fb02df3c5e02716d71ffc04193cf01378ca373bce3f4194ef34c8cdb6e3690be6d9c1ec46f82b4ae4ce2586", "6bf5594a24bc4f00df3ee055edcfc0c3b31f3ffde9d63d1f02f3fd72d2b47a74634fb116d5668ca6a3ea8cf8fcf11fc33e01ebf3ff8138643d1e29d448d7fa54" "be19bd2a5447ac8de68fb7ac3dafc0ffea5fb961eef6efb840d413abfd4ddedcf43910d2547594186b5976dd501a89a7979bb5174d51e4e787c77ff4e06d981f", "b63aefbb4aadfd819c0ef062ab2d95e3542b1c4f0da2c0fb3bc9fb1714ac1752f3c91df1b4f261bdd0baf194b42b78b05e084ff976f10702a29eeb594f5a0fce" "b3496dd3fb0a944dc4b228a9f466d97dc459249e5e8ee9bc9199c6e01e791be1118bcbb633e9b4a77914658a95b3d07ea1c197a88e8de242d08e17d75f6f7769", "6cbc0ff7893d1d4f93c37d622be3cdd3aee0c17d6278ca07de5f5c7fbddd65b6629f00dc1f03f7c76c2b1f93c683fb63f0943f41bcbfaa1edf4294ef34c8b1f2" "ff8203a2c9dae117b0f903b83f0685a797c3fd31cf8aa7a45dc183fb63f0940fe381c5f5d7db1dbe7d02b02ec888a797c3baa055f194b42b78b02e084ff9c0f7", "8bebafdf0790c5d6df377b6eb436e56bd5f9de82e1d961f89e26c7b7cf50311982bcff0f7f57807ebed579ff34178db9b29427795cf11e768f8af5ec65c60571" "ff1d6ac7b3e4857ebe493ce8e7e3c653d2aee0413f1f4ff956e7fb31a27e6b391f621c0f2a794ac98305259f14615f809a4fee88a7950ffb02d68da7a45dc183", "7d01e6caffff2173fbf4", "" }; nameCaptureInfo = NULL; emlrtNameCaptureMxArrayR2016a(data, 333888U, &nameCaptureInfo); return nameCaptureInfo; } /* End of code generation (_coder_EOM_info.c) */
114.031359
135
0.930302
7663db2a008bf70f9b1048f190e1b50b653afbdd
225
c
C
src/uri_judge/begginer/1002_area_of_a_circle.c
Mazuh/MISC-Algs
7fccb3d4eb27a2511bda4b1e408ab96b0cccd5ae
[ "MIT" ]
3
2017-04-25T19:36:22.000Z
2018-02-08T18:22:44.000Z
src/uri_judge/begginer/1002_area_of_a_circle.c
Mazuh/MISC-Algs
7fccb3d4eb27a2511bda4b1e408ab96b0cccd5ae
[ "MIT" ]
1
2017-04-26T10:15:26.000Z
2017-04-26T12:19:11.000Z
src/uri_judge/begginer/1002_area_of_a_circle.c
Mazuh/MISC-Algs
7fccb3d4eb27a2511bda4b1e408ab96b0cccd5ae
[ "MIT" ]
1
2017-04-25T23:59:48.000Z
2017-04-25T23:59:48.000Z
/* https://www.urionlinejudge.com.br/judge/en/problems/view/1002 */ #include <stdio.h> int main(){ const double PI = 3.14159; double radius; scanf("%lf", &radius); printf("A=%.4lf\n", PI*radius*radius); return 0; }
13.235294
61
0.648889
76238c546d9c19c2a15ec2f29e21e62bcc199136
3,575
c
C
adm/daemon/ipc.c
KismetSuS/SunderingShadows
fbf0cd60c72c5cc2649ee6a17a91b104571d70b8
[ "MIT" ]
null
null
null
adm/daemon/ipc.c
KismetSuS/SunderingShadows
fbf0cd60c72c5cc2649ee6a17a91b104571d70b8
[ "MIT" ]
null
null
null
adm/daemon/ipc.c
KismetSuS/SunderingShadows
fbf0cd60c72c5cc2649ee6a17a91b104571d70b8
[ "MIT" ]
null
null
null
#include <std.h> #include <socket_err.h> #include <daemons.h> #pragma strict_types #pragma warnings #define SOCK_MODE 1 #define IPC_PORT 8181 private int* ttys = ({}); int conn_fd; object debug_obj; void debug(string s) { if (objectp(debug_obj)) { tell_object(debug_obj,"IPC: " + s); } log_file("ipc", s + "\n"); return; } int set_debug_obj(object obj) { if (objectp(obj)) { debug_obj = obj; return 1; } else { return 0; } } int create() { ipc_setup_socket(); ipc_monitor_self(); return 1; } void ipc_setup_socket() { int conn_stat; conn_fd = socket_create(SOCK_MODE, "ipc_read", "ipc_shutdown"); if (conn_fd < 0) { debug("Error create: " + conn_fd); return; } conn_stat = socket_bind(conn_fd, 8181); if (conn_stat < 0) { debug("Error bind: " + conn_stat); return; } conn_stat = socket_listen(conn_fd, "ipc_listen"); if (conn_stat < 0) { debug("Error listen: " + conn_stat); return; } debug("Ok listen: " + identify(socket_status(conn_fd))); } void ipc_monitor_self() { if (!socket_status(conn_fd)) { ipc_setup_socket(); debug("Error socket down."); } call_out("ip_monitor_self", 30); } void ipc_listen(int fd) { int this_conn_fd; this_conn_fd = socket_accept(fd, "ipc_read", "ipc_write"); debug("Conn attempt: " + identify(socket_status(this_conn_fd))); if (socket_address(this_conn_fd)[0..8] != "127.0.0.1" && socket_address(this_conn_fd)[0..14] != "165.227.218.140") { debug("Rejected on conn: " + identify(socket_status(this_conn_fd))); socket_close(this_conn_fd); return; } if (this_conn_fd < 0) { debug("Error listen: " + this_conn_fd); return; } ttys += ({ this_conn_fd }); } /** * This function reads for IPC messages. * * @param fd Socket's file descriptor. * @param data Recieved data, */ void ipc_read(int fd, mixed data) { if (!stringp(data)) { socket_close(fd); debug("Error non string."); return; } if (socket_address(fd)[0..8] != "127.0.0.1" && socket_address(fd)[0..14] != "165.227.218.140") { debug("Error non local spoof: " + identify(socket_status(fd))); socket_close(fd); return; } if (sizeof(data) > 1024) { debug("Error size: " + sizeof(data)); return; } // Messages handling here. if (data[0..4] == "CHAT:") { string chan, pos, nick, msg; debug(identify(data)); if (sscanf(data, "CHAT:%s:%s:%s:%s", chan, pos, nick, msg) != 4) { debug("Malformed chat msg:" + socket_address(fd) + ":" + data); return; } CHAT_D->ipc_chat(chan, nick, msg); } /* if (data[0..4] == "HELP:") { //string helpstring; // helper=new(helper); // helper->force_me("help helpstring"); // helpfile=collapse(helper->query_buffer(),"\n"); // hlper->remove(); // ip_send_back(helpfile); } */ } int* query_ttys() { return ttys; } int* ipc_send_all(mixed data) { int tty; foreach(tty in ttys) { socket_write(tty, data); } } int ipc_close_all() { int tty; foreach(tty in ttys) { socket_close(tty); } return; } mixed ipc_status() { return socket_status(conn_fd); } void ipc_shutdown(int fd) { debug("Removing socket: " + identify(socket_status(fd))); ttys -= ({ fd }); return; }
18.523316
120
0.563077
639617a741b1c5ab34c242c5dddbd3ab69ad9bcc
7,245
c
C
ucpp/mem.c
clayne/Convert-Binary-C
159625dc6355f55d16c74df0a9e0526c650bff75
[ "FSFAP" ]
5
2015-03-12T03:01:01.000Z
2020-11-22T18:30:25.000Z
ucpp/mem.c
clayne/Convert-Binary-C
159625dc6355f55d16c74df0a9e0526c650bff75
[ "FSFAP" ]
5
2017-01-30T13:21:04.000Z
2021-02-09T12:03:08.000Z
ucpp/mem.c
clayne/Convert-Binary-C
159625dc6355f55d16c74df0a9e0526c650bff75
[ "FSFAP" ]
10
2015-07-24T19:19:37.000Z
2020-11-22T18:30:27.000Z
/* * Memory manipulation routines * (c) Thomas Pornin 1998 - 2002 * * 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. * 4. The name of the authors may not be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT 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 AUTHORS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "mem.h" #include <stdio.h> #include <stdlib.h> #include <string.h> /* * Shifting a pointer of that some bytes is supposed to satisfy * alignment requirements. This is *not* guaranteed by the standard * but should work everywhere anyway. */ #define ALIGNSHIFT (sizeof(long) > sizeof(long double) \ ? sizeof(long) : sizeof(long double)) #ifdef AUDIT void die(void) { abort(); } static void suicide(unsigned long e) { fprintf(stderr, "ouch: Schrodinger's beef is not dead ! %lx\n", e); die(); } #else void die(void) { exit(EXIT_FAILURE); } #endif #if defined AUDIT || defined MEM_CHECK || defined MEM_DEBUG /* * This function is equivalent to a malloc(), but will display an error * message and exit if the wanted memory is not available */ #ifdef MEM_DEBUG static void *getmem_raw(size_t x) #else void *(getmem)(size_t x) #endif { void *m; #ifdef AUDIT m = UCPP_MALLOC(x + ALIGNSHIFT); #else m = UCPP_MALLOC(x); #endif if (m == 0) { fprintf(stderr, "ouch: malloc() failed\n"); die(); } #ifdef AUDIT *((unsigned long *)m) = 0xdeadbeefUL; return (void *)(((char *)m) + ALIGNSHIFT); #else return m; #endif } #endif #ifndef MEM_DEBUG /* * This function is equivalent to a realloc(); if the realloc() call * fails, it will try a malloc() and a memcpy(). If not enough memory is * available, the program exits with an error message */ void *(incmem)(void *m, size_t x, size_t nx) { void *nm; #ifdef AUDIT m = (void *)(((char *)m) - ALIGNSHIFT); if (*((unsigned long *)m) != 0xdeadbeefUL) suicide(*((unsigned long *)m)); x += ALIGNSHIFT; nx += ALIGNSHIFT; #endif if (!(nm = UCPP_REALLOC(m, nx))) { if (x > nx) x = nx; nm = (getmem)(nx); memcpy(nm, m, x); /* free() and not freemem(), because of the Schrodinger beef */ UCPP_FREE(m); } #ifdef AUDIT return (void *)(((char *)nm) + ALIGNSHIFT); #else return nm; #endif } #endif #if defined AUDIT || defined MEM_DEBUG /* * This function frees the given block */ #ifdef MEM_DEBUG static void freemem_raw(void *x) #else void (freemem)(void *x) #endif { #ifdef AUDIT void *y = (void *)(((char *)x) - ALIGNSHIFT); if ((*((unsigned long *)y)) != 0xdeadbeefUL) suicide(*((unsigned long *)y)); *((unsigned long *)y) = 0xfeedbabeUL; UCPP_FREE(y); #else UCPP_FREE(x); #endif } #endif #ifdef AUDIT /* * This function copies n bytes from src to dest */ void *mmv(void *dest, const void *src, size_t n) { return memcpy(dest, src, n); } /* * This function copies n bytes from src to dest */ void *mmvwo(void *dest, const void *src, size_t n) { return memmove(dest, src, n); } #endif #ifndef MEM_DEBUG /* * This function creates a new char * and fills it with a copy of src */ char *(sdup)(const char *src) { size_t n = 1 + strlen(src); char *x = getmem(n); mmv(x, src, n); return x; } #endif #ifdef MEM_DEBUG /* * We include here special versions of getmem(), freemem() and incmem() * that track allocations and are used to detect memory leaks. * * Each allocation is referenced in a list, with a serial number. */ /* * Define "true" functions for applications that need pointers * to such functions. */ #ifndef MEM_DEBUG_NO_TRUE_FUNC void *(getmem)(size_t n) { return getmem(n); } void (freemem)(void *x) { freemem(x); } void *(incmem)(void *x, size_t s, size_t ns) { return incmem(x, s, ns); } char *(sdup)(const char *s) { return sdup(s); } #endif static long current_serial = 0L; /* must be a power of two */ #define MEMDEBUG_MEMG 128U static struct mem_track { void *block; long serial; const char *file; int line; } *mem = 0; static size_t meml = 0; static unsigned int current_ptr = 0; static void *true_incmem(void *x, size_t old_size, size_t new_size) { void * y = UCPP_REALLOC(x, new_size); if (y == 0) { y = UCPP_MALLOC(new_size); if (y == 0) { fprintf(stderr, "ouch: malloc() failed\n"); die(); } mmv(y, x, old_size < new_size ? old_size : new_size); UCPP_FREE(x); } return y; } static long find_free_block(void) { unsigned int n; size_t i; for (i = 0, n = current_ptr; i < meml; i ++) { if (mem[n].block == 0) { current_ptr = n; return n; } n = (n + 1) & (meml - 1U); } if (meml == 0) { size_t j; meml = MEMDEBUG_MEMG; mem = UCPP_MALLOC(meml * sizeof(struct mem_track)); current_ptr = 0; for (j = 0; j < meml ; j ++) mem[j].block = 0; } else { size_t j; mem = true_incmem(mem, meml * sizeof(struct mem_track), 2 * meml * sizeof(struct mem_track)); current_ptr = meml; for (j = meml; j < 2 * meml ; j ++) mem[j].block = 0; meml *= 2; } return current_ptr; } void *getmem_debug(size_t n, const char *file, int line) { void *x = getmem_raw(n + ALIGNSHIFT); long i = find_free_block(); *(long *)x = i; mem[i].block = x; mem[i].serial = current_serial ++; mem[i].file = file; mem[i].line = line; return (void *)((unsigned char *)x + ALIGNSHIFT); } void freemem_debug(void *x, const char *file, int line) { void *y = (unsigned char *)x - ALIGNSHIFT; long i = *(long *)y; if (i < 0 || (size_t)i >= meml || mem[i].block != y) { fprintf(stderr, "ouch: freeing free people (from %s:%d)\n", file, line); die(); } mem[i].block = 0; freemem_raw(y); } void *incmem_debug(void *x, size_t ol, size_t nl, const char *file, int line) { void *y = getmem_debug(nl, file, line); mmv(y, x, ol < nl ? ol : nl); freemem_debug(x, file, line); return y; } char *sdup_debug(const char *src, const char *file, int line) { size_t n = 1 + strlen(src); char *x = getmem_debug(n, file, line); mmv(x, src, n); return x; } void report_leaks(void) { size_t i; for (i = 0; i < meml; i ++) { if (mem[i].block) fprintf(stderr, "leak: serial %ld, %s:%d\n", mem[i].serial, mem[i].file, mem[i].line); } } #endif
21.888218
77
0.662664
e46e2110edc5730807becc8dbad3ab7715aa4d15
1,519
h
C
src/tcp/ITcpEventManager.h
nneesshh/netsystem
8ff391f38ebba07fb83edc8581d7203134012feb
[ "Apache-2.0" ]
null
null
null
src/tcp/ITcpEventManager.h
nneesshh/netsystem
8ff391f38ebba07fb83edc8581d7203134012feb
[ "Apache-2.0" ]
null
null
null
src/tcp/ITcpEventManager.h
nneesshh/netsystem
8ff391f38ebba07fb83edc8581d7203134012feb
[ "Apache-2.0" ]
null
null
null
#pragma once //------------------------------------------------------------------------------ /** @class ITcpEventManager (C) 2016 n.lee */ #include <functional> // enum TCP_EVENT_ID { CONNECTION_CONNECTED = 1, CONNECTION_DISCONNECTED, SERVICE_READY, // TCP_EVENT_ID_MAX }; // class ITcpConn; using TCP_EVENT_HANDLER = std::function<void(ITcpConn *)>; using TCP_PACKET_HANDLER = std::function<void(ITcpConn *, uint8_t, std::string&, std::string&)>; using TCP_INNER_PACKET_HANDLER = std::function<void(ITcpConn *, uint64_t, uint8_t, std::string&, std::string&)>; //------------------------------------------------------------------------------ /** */ class ITcpEventManager { public: virtual ~ITcpEventManager() noexcept { } /** **/ virtual void OnEvent(TCP_EVENT_ID nEventId, ITcpConn *pConn) = 0; /** **/ virtual void OnPacket(ITcpConn *pConn, uint8_t uSerialNo, std::string& sTypeName, std::string& sBody) = 0; virtual void OnInnerPacket(ITcpConn *pConn, uint64_t uInnerUuid, uint8_t uSerialNo, std::string& sTypeName, std::string& sBody) = 0; /** **/ virtual bool IsReady() = 0; virtual void SetReady(bool bReady) = 0; /** **/ virtual void RegisterEventHandler(uint32_t uEventId, TCP_EVENT_HANDLER d) = 0; virtual void ClearAllEventHandlers() = 0; /** **/ virtual void RegisterPacketHandler(TCP_PACKET_HANDLER d) = 0; virtual void RegisterInnerPacketHandler(TCP_INNER_PACKET_HANDLER d) = 0; }; /*EOF*/
27.618182
137
0.60632
77b01196a25f5ed9916f23008250c76d0f1dcca0
2,739
h
C
lib/dstructure_auto.h
arinichevN/1wgr
47bfddb0d27fd62bc11f04b1c09a0f4c748937d5
[ "Unlicense" ]
null
null
null
lib/dstructure_auto.h
arinichevN/1wgr
47bfddb0d27fd62bc11f04b1c09a0f4c748937d5
[ "Unlicense" ]
null
null
null
lib/dstructure_auto.h
arinichevN/1wgr
47bfddb0d27fd62bc11f04b1c09a0f4c748937d5
[ "Unlicense" ]
null
null
null
#ifndef LIBPAS_DSTRUCTURE_AUTO_H #define LIBPAS_DSTRUCTURE_AUTO_H #define FREE_LIST(list) free((list)->item); (list)->item=NULL; (list)->length=0; #define FUN_LIST_INIT(T) int init ## T ## List(T ## List *list, unsigned int n){list->item = (T *) malloc(n * sizeof *(list->item));if (list->item == NULL) {return 0;}return 1;} #define FUN_LIST_GET_BY(V,T) T *get##T##By_##V (int id, const T##List *list) { LIST_GET_BY(V) } #define FUN_LIST_GET_BY_ID(T) T *get ## T ## ById(int id, const T ## List *list) { LIST_GET_BY_ID } #define FUN_LIST_GET_BY_IDSTR(T) T *get ## T ## ById(char *id, const T ## List *list) { LIST_GET_BY_IDSTR } #define FUN_LLIST_GET_BY_ID(T) T *get ## T ## ById(int id, const T ## List *list) { LLIST_GET_BY_ID(T) } #define DEF_FUN_LIST_INIT(T) int init ## T ## List(T ## List *list, unsigned int n); #define DEF_FUN_LIST_GET_BY_ID(T) extern T *get ## T ## ById(int id, const T ## List *list); #define DEF_FUN_LIST_GET_BY_IDSTR(T) extern T *get ## T ## ById(char *id, const T ## List *list); #define DEF_FUN_LLIST_GET_BY_ID(T) extern T *get ## T ## ById(int id, const T ## List *list); #define DEF_LIST(T) typedef struct {T *item; size_t length;} T##List; #define DEF_LLIST(T) typedef struct {T *top; T *last; size_t length;} T##List; #define DEF_FIFO_LIST(T) struct fifo_item_ ## T {T data;int free;struct fifo_item_ ## T *prev;struct fifo_item_ ## T *next;};typedef struct fifo_item_ ## T FIFOItem_ ## T;typedef struct {FIFOItem_ ## T *item;size_t length;FIFOItem_ ## T *push_item;FIFOItem_ ## T *pop_item;Mutex mutex;} FIFOItemList_ ## T; #define FUN_FIFO_PUSH(T) int T ## _fifo_push(T item, FIFOItemList_ ## T *list) {if (!lockMutex(&list->mutex)) {return 0;}if (list->push_item == NULL) {unlockMutex(&list->mutex);return 0;}list->push_item->data = item;list->push_item->free = 0;if(list->pop_item==NULL){list->pop_item=list->push_item;}if (list->push_item->next->free) {list->push_item = list->push_item->next;} else {list->push_item = NULL;}unlockMutex(&list->mutex);return 1;} #define FUN_FIFO_POP(T) int T ## _fifo_pop(T * item, FIFOItemList_ ## T *list) {if (!lockMutex(&list->mutex)) {return 0;}if (list->pop_item == NULL) {unlockMutex(&list->mutex);return 0;}*item = list->pop_item->data;list->pop_item->free = 1;if (list->push_item == NULL) {list->push_item = list->pop_item;}if (!list->pop_item->next->free) {list->pop_item = list->pop_item->next;} else {list->pop_item = NULL;}unlockMutex(&list->mutex);return 1;} #define FREE_FIFO(fifo) FREE_LIST(fifo);(fifo)->pop_item = NULL;(fifo)->push_item = NULL; #define DEF_FUN_FIFO_PUSH(T) extern int T ## _fifo_push(T item, FIFOItemList_ ## T *list); #define DEF_FUN_FIFO_POP(T) extern int T ## _fifo_pop(T * item, FIFOItemList_ ## T *list); #endif
91.3
443
0.693684
e2cbced8ec237acbc04d1afefd861e4e42c711ba
2,154
c
C
Tek1/CPE/CPE_2014_allum1/sources/check.c
Estayparadox/Epitech-Bundle
e4395961bb86bf494e3c84ab44c27b5a9afc6c6c
[ "MIT" ]
30
2018-10-26T12:54:11.000Z
2022-02-04T18:18:57.000Z
Tek1/CPE/CPE_2014_allum1/sources/check.c
Estayparadox/Epitech-Bundle
e4395961bb86bf494e3c84ab44c27b5a9afc6c6c
[ "MIT" ]
null
null
null
Tek1/CPE/CPE_2014_allum1/sources/check.c
Estayparadox/Epitech-Bundle
e4395961bb86bf494e3c84ab44c27b5a9afc6c6c
[ "MIT" ]
26
2018-11-20T18:11:39.000Z
2022-01-28T21:05:30.000Z
#include "allum.h" int check_linezero(int line) { if (line < 0) { if ((my_putstr("Error: invalid input ")) == EXIT_FAILURE) return (EXIT_FAILURE); if ((my_putstr("(positiv number excepted)\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } return (EXIT_SUCCESS); } int check_line(int line, int *map) { if ((check_linezero(line)) == EXIT_FAILURE) return (EXIT_FAILURE); if (line == 0 || line > 4) { if ((my_putstr("Error: this line ")) == EXIT_FAILURE) return (EXIT_FAILURE); if ((my_putstr("is out of range\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } if (line >= 1 && line <= 4) { if (map[line - 1] == 0) { if ((my_putstr("Error: this line is empty\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } } return (EXIT_SUCCESS); } int check_match(int match, int *map, int line) { if (match < 0) { if ((my_putstr("Error: invalid input ")) == EXIT_FAILURE) return (EXIT_FAILURE); if ((my_putstr("(positive number expected)\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } if (match == 0) { if ((my_putstr("Error: you have to remove ")) == EXIT_FAILURE) return (EXIT_FAILURE); if ((my_putstr("at least one match\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } if (match > map[line - 1]) { if ((my_putstr("Error: not enough ")) == EXIT_FAILURE) return (EXIT_FAILURE); if ((my_putstr("matches on this line\n")) == EXIT_FAILURE) return (EXIT_FAILURE); return (EXIT_FAILURE); } return (EXIT_SUCCESS); } void aff_del(int line_rem, int match_rem) { my_putstr("Player removed "); my_put_nbr(match_rem); my_putstr(" match(es) from line "); my_put_nbr(line_rem); my_putchar('\n'); } int is_over(int *map) { int nb; int stock; stock = 0; nb = 0; while (stock < 4) { nb = nb + map[stock]; stock++; } if (nb == 0) return (EXIT_SUCCESS); else return (EXIT_FAILURE); }
22.673684
70
0.588208
3fac0efbf0b8e7cd32eeaff67a5de76366323bd1
3,797
c
C
Parciales/Parcial_1/Practica/3/main.c
ApophisXIV/Algo1-9511-Ejercicios-Obligatorios
8302a895a95aae8d2727d83a3d64bc8e875f4ac9
[ "MIT" ]
2
2021-12-20T03:47:00.000Z
2022-01-02T22:35:11.000Z
Parciales/Parcial_1/Practica/3/main.c
ApophisXIV/Algo1-9511-Ejercicios-Obligatorios
8302a895a95aae8d2727d83a3d64bc8e875f4ac9
[ "MIT" ]
null
null
null
Parciales/Parcial_1/Practica/3/main.c
ApophisXIV/Algo1-9511-Ejercicios-Obligatorios
8302a895a95aae8d2727d83a3d64bc8e875f4ac9
[ "MIT" ]
null
null
null
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define ejercicio 3 #define N_Ejercicio 59 #if N_Ejercicio == 1 #elif N_Ejercicio == 2 #elif N_Ejercicio == 3 #endif #if ejercicio == 1 void subcadena(char destino[], const char origen[], size_t inicio, size_t fin) { for (size_t i = inicio >= 0 ? inicio : 0; i < fin && origen[i]; i++) { destino[inicio >= 0 ? i - inicio : i] = origen[i]; } } int main(void) { char buffer[20]; subcadena(buffer, "Algoritmos", 2, 6); printf("%s\n", buffer); } #elif ejercicio == 2 #define N 3 #define M 3 void combinar_filas(float mat[N][M], size_t n, size_t m, float multiplier) { for (size_t i = n; i < M; i++) mat[n][i] += mat[m][i] * multiplier; } int main(void) { float mat[N][M] = { {0.56, -5.1, 3.2}, {53.6, 6.1, 1.2}, {-0.56, 4.7, -9.2}}; combinar_filas(mat, 1, 0, 2); for (size_t i = 0; i < N; i++) { for (size_t j = 0; j < M; j++) { printf("%1.2f ", mat[i][j]); } printf("\n"); } } #elif ejercicio == 3 // #include <time.h> bool entradaValida(int datoValido, const char *string) { char *errChar = NULL; datoValido = strtol(string, &errChar, 10); if(datoValido < 1 || datoValido > 6){ printf("Fuera de rango [1 - 6]\n"); return false; } return (errChar == string || *errChar !='\n') ? false : true; } bool estanCargados(int cantidadTiros, int repeticiones, int valorEnsayo) { const int secuenciaPrueba[] = {1, 1, 2, 6, 5, 5, 5}; int repCont = 0; for (size_t i = 0; i < cantidadTiros; i++) { if (valorEnsayo == secuenciaPrueba[i]) repCont++; if (repCont == repeticiones) return true; } return false; } int main(void) { char buffer[10]; enum estados { CANTIDAD_DE_TIROS, CANTIDAD_REPETICIONES, VALOR_ENSAYO, RESULTADO_ENSAYO }; unsigned int modoEntrada = CANTIDAD_DE_TIROS; int d[3] = {0}; printf("Ingrese la cantidad de tiros a realizar\n"); while (fgets(buffer, sizeof(buffer), stdin)){ switch (modoEntrada) { case CANTIDAD_DE_TIROS: printf("Ingrese la cantidad de tiros a realizar\n"); if (entradaValida(d[modoEntrada], buffer)) modoEntrada = CANTIDAD_REPETICIONES; else printf("Los datos ingresados son invalidos. Vuelva a intentarlo.\n"); break; case CANTIDAD_REPETICIONES: printf("Ingrese la cantidad de repeticiones necesarias para considerar que el dado esta cargado\n"); if (entradaValida(d[modoEntrada], buffer)) modoEntrada = VALOR_ENSAYO; else printf("Los datos ingresados son invalidos. Vuelva a intentarlo.\n"); break; case VALOR_ENSAYO: printf("Ingrese el valor de ensayo\n"); if (entradaValida(d[modoEntrada], buffer)) modoEntrada = RESULTADO_ENSAYO; else printf("Los datos ingresados son invalidos. Vuelva a intentarlo.\n"); break; case RESULTADO_ENSAYO: printf("Resultado: %s\n", estanCargados(d[CANTIDAD_DE_TIROS], d[CANTIDAD_REPETICIONES],d[VALOR_ENSAYO])? "ESTAN CARGADOS":"NO ESTAN CARGADOS"); default: break; } } } #elif ejercicio == 4 int main() { char* end = NULL; char buf[255]; long n = 0; printf("Enter an integer:\n"); while (fgets(buf, sizeof(buf), stdin)) { n = strtol(buf, &end, 10); if (end == buf || *end !='\n') printf("Not recognised as an integer. Please enter an integer:\n"); else break; } printf("You entered %ld\n", n); } #endif
22.204678
155
0.565183
d834157eeae3545e1a5bae90b9bf42697a7f14c3
1,173
h
C
iOSOpenDev/frameworks/PhotoLibrary.framework/Headers/PLAutoScroller.h
bzxy/cydia
f8c838cdbd86e49dddf15792e7aa56e2af80548d
[ "MIT" ]
678
2017-11-17T08:33:19.000Z
2022-03-26T10:40:20.000Z
iOSOpenDev/frameworks/PhotoLibrary.framework/Headers/PLAutoScroller.h
chenfanfang/Cydia
5efce785bfd5f1064b9c0f0e29a9cc05aa24cad0
[ "MIT" ]
22
2019-04-16T05:51:53.000Z
2021-11-08T06:18:45.000Z
iOSOpenDev/frameworks/PhotoLibrary.framework/Headers/PLAutoScroller.h
chenfanfang/Cydia
5efce785bfd5f1064b9c0f0e29a9cc05aa24cad0
[ "MIT" ]
170
2018-06-10T07:59:20.000Z
2022-03-22T16:19:33.000Z
/** * This header is generated by class-dump-z 0.2b. * * Source: /System/Library/PrivateFrameworks/PhotoLibrary.framework/PhotoLibrary */ #import <PhotoLibrary/PhotoLibrary-Structs.h> #import <PhotoLibrary/XXUnknownSuperclass.h> @class NSTimer, UIScrollView; @interface PLAutoScroller : XXUnknownSuperclass { UIScrollView *_targetScrollView; // 4 = 0x4 CGPoint _targetPoint; // 8 = 0x8 float _thresholdDistance; // 16 = 0x10 NSTimer *_autoscrollTimer; // 20 = 0x14 } @property(readonly, assign) float thresholdDistance; // G=0xd9869; @synthesize=_thresholdDistance @property(assign, nonatomic) CGPoint targetPoint; // G=0xd984d; S=0xd923d; @synthesize=_targetPoint // declared property getter: - (float)thresholdDistance; // 0xd9869 // declared property getter: - (CGPoint)targetPoint; // 0xd984d - (void)_stopAutoscrollTimer; // 0xd980d - (void)_updateAutoscrollTimer:(id)timer; // 0xd947d - (void)stopAndInvalidate; // 0xd946d // declared property setter: - (void)setTargetPoint:(CGPoint)point; // 0xd923d - (void)dealloc; // 0xd91dd - (id)initWithTargetScrollView:(id)targetScrollView thresholdDistance:(float)distance; // 0xd9165 - (id)init; // 0xd90e9 @end
39.1
99
0.759591
14409c35411a6e5f0177d9f078181b81096dbf3a
727
c
C
src/libstddjb/case_str.c
matya/skalibs
ffb631dff6b850648b7421f692301a7033a13d55
[ "0BSD" ]
null
null
null
src/libstddjb/case_str.c
matya/skalibs
ffb631dff6b850648b7421f692301a7033a13d55
[ "0BSD" ]
null
null
null
src/libstddjb/case_str.c
matya/skalibs
ffb631dff6b850648b7421f692301a7033a13d55
[ "0BSD" ]
null
null
null
/* ISC license. */ #include <skalibs/config.h> #include <skalibs/sysdeps.h> #if defined(SKALIBS_HASSTRCASESTR) && !defined(SKALIBS_FLAG_REPLACE_LIBC) #include <skalibs/nonposix.h> #include <string.h> #include <skalibs/bytestr.h> unsigned int case_str (char const *haystack, char const *needle) { register char *p = strcasestr(haystack, needle) ; return p ? p - haystack : str_len(haystack) ; } #else #include <skalibs/bytestr.h> unsigned int case_str (char const *haystack, char const *needle) { unsigned int nlen = str_len(needle) ; register char const *p = haystack ; if (!nlen) return 0 ; for (; *p ; p++) if (!case_diffb(p, nlen, needle)) return p - haystack ; return str_len(haystack) ; } #endif
22.030303
73
0.696011
37f75affbef02abb7ce68960f47e5a48a7d675b0
2,201
h
C
src/gui/treeitemarray.h
hackbinary/pdfedit
5efb58265d0b86c2786d7b218aa0d6f895b926d3
[ "CECILL-B" ]
13
2015-10-15T01:26:37.000Z
2019-11-18T21:50:46.000Z
src/gui/treeitemarray.h
mmoselhy/PDF-X
b72597bbb0c6c86d99e44cf18f7b46d5175a7bfa
[ "CECILL-B" ]
1
2020-03-28T23:06:53.000Z
2020-04-08T03:24:06.000Z
src/gui/treeitemarray.h
mmoselhy/PDF-X
b72597bbb0c6c86d99e44cf18f7b46d5175a7bfa
[ "CECILL-B" ]
14
2016-01-31T10:54:56.000Z
2020-08-31T11:08:42.000Z
/* * PDFedit - free program for PDF document manipulation. * Copyright (C) 2006-2009 PDFedit team: Michal Hocko, * Jozef Misutka, * Martin Petricek * Former team members: Miroslav Jahoda * * 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; version 2 of the License. * * 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 (in doc/LICENSE.GPL); if not, write to the * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * * Project is hosted on http://sourceforge.net/projects/pdfedit */ #ifndef __TREEITEMARRAY_H__ #define __TREEITEMARRAY_H__ #include "treeitem.h" class QString; namespace gui { using namespace pdfobjects; class TreeData; /** class holding one CArray object in tree \brief Tree item containing CArray */ class TreeItemArray : public TreeItem { public: TreeItemArray(TreeData *_data,Q_ListView *parent,boost::shared_ptr<IProperty> pdfObj,const QString name=QString::null,Q_ListViewItem *after=NULL,const QString &nameId=NULL); TreeItemArray(TreeData *_data,Q_ListViewItem *parent,boost::shared_ptr<IProperty> pdfObj,const QString name=QString::null,Q_ListViewItem *after=NULL,const QString &nameId=NULL); void remove(unsigned int idx); virtual ~TreeItemArray(); //From TreeItemAbstract interface virtual bool validChild(const QString &name,Q_ListViewItem *oldChild); virtual ChildType getChildType(const QString &name); virtual TreeItemAbstract* createChild(const QString &name,ChildType typ,Q_ListViewItem *after=NULL); virtual QStringList getChildNames(); virtual bool haveChild(); virtual QSCObject* getQSObject(BaseCore *_base); virtual QSCObject* getQSObject(); }; } // namespace gui #endif
37.305085
178
0.737846
88853a7779fb62dceb247033071409f1d5ea006b
552
c
C
libsrc/c128/clrwinvdc.c
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/c128/clrwinvdc.c
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/c128/clrwinvdc.c
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
/* Based on the SG C Tools 1.7 (C) 1993 Steve Goldsmith $Id: clrwinvdc.c,v 1.3 2016/06/16 21:13:07 dom Exp $ */ #include <c128/vdc.h> extern uchar vdcScrHorz; //extern ushort vdcDispMem; /* clear window given x1, y1, x2, y2 rectangle in current page */ void clrwinvdc(ushort X1, ushort Y1, ushort X2, ushort Y2, ushort Ch) { uchar XLen; ushort DispOfs; DispOfs = Y1*vdcScrHorz+vdcDispMem+X1; XLen = X2-X1+1; for(; Y1 <= Y2; Y1++) { fillmemvdc(DispOfs,XLen,Ch); DispOfs += vdcScrHorz; } }
17.25
70
0.619565
005b29b023a0946e8a69fccc2cc9b769fd79b607
1,306
c
C
lib/my/src/my_put_nbr.c
thomasarbona/raytracer
d477a8cd38659d7d95830c0911c79c30b3f7f354
[ "MIT" ]
1
2019-01-10T17:51:36.000Z
2019-01-10T17:51:36.000Z
lib/my/src/my_put_nbr.c
thomasarbona/raytracer
d477a8cd38659d7d95830c0911c79c30b3f7f354
[ "MIT" ]
null
null
null
lib/my/src/my_put_nbr.c
thomasarbona/raytracer
d477a8cd38659d7d95830c0911c79c30b3f7f354
[ "MIT" ]
null
null
null
/* ** my_put_nbr.c for my_put_nbr in /home/arbona/CPool/CPool_Day03 ** ** Made by Thomas Arbona ** Login <arbona@epitech.net> ** ** Started on Wed Oct 5 13:33:13 2016 Thomas Arbona ** Last update Thu Oct 13 18:24:22 2016 Thomas Arbona */ void my_putchar(char c); static int get_nb_length(int nb) { int count; count = 0; if (nb == 0) count = 1; while (nb > 0) { nb /= 10; count += 1; } return (count); } static int get_digit(int nb, int rank) { int div; int div_iter; int digit; div_iter = 0; div = 1; while (div_iter <= rank) { div *= 10; div_iter += 1; } digit = nb / div % 10; return (digit); } static void display_max() { my_putchar('-'); my_putchar('2'); my_putchar('1'); my_putchar('4'); my_putchar('7'); my_putchar('4'); my_putchar('8'); my_putchar('3'); my_putchar('6'); my_putchar('4'); my_putchar('8'); } int my_put_nbr(int nb) { int nb_length; int iterator; if (nb == -2147483648) { display_max(); return (0); } if (nb < 0) { my_putchar('-'); nb *= -1; } nb_length = get_nb_length(nb); iterator = nb_length - 2; while (iterator >= -1) { my_putchar(get_digit(nb, iterator) + 48); iterator -= 1; } return (0); }
15.547619
64
0.555896
e43d895da8704cc00c02c9bb5880bef4a5a5c4c0
3,217
c
C
src/extension.c
tierralibre/h3-pg
c4dec0b7275dd20b187ad7fd04e8e0a3d0c606de
[ "Apache-2.0" ]
105
2019-01-08T11:05:44.000Z
2022-03-31T13:08:03.000Z
src/extension.c
tierralibre/h3-pg
c4dec0b7275dd20b187ad7fd04e8e0a3d0c606de
[ "Apache-2.0" ]
43
2019-04-08T16:32:52.000Z
2022-02-18T07:34:32.000Z
src/extension.c
tierralibre/h3-pg
c4dec0b7275dd20b187ad7fd04e8e0a3d0c606de
[ "Apache-2.0" ]
16
2019-03-29T00:42:23.000Z
2022-02-07T15:35:37.000Z
/* * Copyright 2018-2020 Bytes & Brains * * 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 <math.h> // cos, sin, etc. #include <assert.h> #include <postgres.h> // Datum, etc. #include <fmgr.h> // PG_FUNCTION_ARGS, etc. #include <funcapi.h> // Definitions for functions which return sets #include <access/htup_details.h> // Needed to return HeapTuple #include <utils/guc.h> // for GetConfigOption* #include <utils/builtins.h> #include <h3api.h> // Main H3 include #include "extension.h" /* should only be in ONE file */ PG_MODULE_MAGIC; PG_FUNCTION_INFO_V1(h3_get_extension_version); /* Return version number for this extension (not main h3 lib) */ Datum h3_get_extension_version(PG_FUNCTION_ARGS) { PG_RETURN_TEXT_P(cstring_to_text(EXTVERSION)); } bool h3_guc_strict = false; void _PG_init(void) { DefineCustomBoolVariable("h3.strict", "Enable strict indexing (fail on invalid lng/lat).", NULL, &h3_guc_strict, false, PGC_USERSET, 0, NULL, NULL, NULL); } /* * Set-Returning-Function assume user fctx contains indices * will skip missing (all zeros) indices */ Datum srf_return_h3_indexes_from_user_fctx(PG_FUNCTION_ARGS) { FuncCallContext *funcctx = SRF_PERCALL_SETUP(); int call_cntr = funcctx->call_cntr; int max_calls = funcctx->max_calls; H3Index *indices = (H3Index *) funcctx->user_fctx; /* skip missing indices (all zeros) */ while (call_cntr < max_calls && !indices[call_cntr]) { funcctx->call_cntr = ++call_cntr; }; if (call_cntr < max_calls) { Datum result = H3IndexGetDatum(indices[call_cntr]); SRF_RETURN_NEXT(funcctx, result); } else { SRF_RETURN_DONE(funcctx); } } /* * Returns hex/distance tuples from user_fctx * will skip missing (all zeros) indices */ Datum srf_return_h3_index_distances_from_user_fctx(PG_FUNCTION_ARGS) { FuncCallContext *funcctx = SRF_PERCALL_SETUP(); int call_cntr = funcctx->call_cntr; int max_calls = funcctx->max_calls; hexDistanceTuple *user_fctx = funcctx->user_fctx; H3Index *indices = user_fctx->indices; int *distances = user_fctx->distances; /* skip missing indices (all zeros) */ while (!indices[call_cntr]) { funcctx->call_cntr = ++call_cntr; }; if (call_cntr < max_calls) { TupleDesc tuple_desc = funcctx->tuple_desc; Datum values[2]; bool nulls[2] = {false}; HeapTuple tuple; Datum result; values[0] = H3IndexGetDatum(indices[call_cntr]); values[1] = Int32GetDatum(distances[call_cntr]); tuple = heap_form_tuple(tuple_desc, values, nulls); result = HeapTupleGetDatum(tuple); SRF_RETURN_NEXT(funcctx, result); } else { SRF_RETURN_DONE(funcctx); } }
24.18797
75
0.709357
a5aab67f0805f14665afcc7f55120d5111e7cfdc
17,583
c
C
src/cli.c
bddwyx/esc32
f330ed13e0d98de9470eb8eedb735a5197768c69
[ "MIT" ]
null
null
null
src/cli.c
bddwyx/esc32
f330ed13e0d98de9470eb8eedb735a5197768c69
[ "MIT" ]
null
null
null
src/cli.c
bddwyx/esc32
f330ed13e0d98de9470eb8eedb735a5197768c69
[ "MIT" ]
null
null
null
/* This file is part of AutoQuad ESC32. AutoQuad ESC32 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. AutoQuad ESC32 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 AutoQuad ESC32. If not, see <http://www.gnu.org/licenses/>. Copyright © 2011, 2012, 2013 Bill Nesbitt */ #include "cli.h" #include "getbuildnum.h" #include "main.h" #include "serial.h" #include "run.h" #include "fet.h" #include "adc.h" #include "pwm.h" #include "config.h" #include "rcc.h" #include "timer.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> char version[16]; //当前软件版本 static char cliBuf[32]; //串口接收到的数据保存在此数组里面,根据cliBufIndex来索引 static int cliBufIndex; //当前串口缓存的数组index static char tempBuf[64];//临时寄存器 static int cliTelemetry;//自动打印数据模式,在systick中断中会调用cliCheck函数.然后可以自动打印当前的信息(串口方式) // this table must be sorted by command name //这个数组必须按照从小到大排列.因为后面用二分法来搜索 static const cliCommand_t cliCommandTable[] = { {"arm", "", cliFuncArm}, //切换为手动运行 {"beep", "<frequency> <duration>", cliFuncBeep}, //让电机beep {"binary", "", cliFuncBinary}, //串口切换为 binary控制模式. {"bootloader", "", cliFuncBoot}, //重启esc32 {"config", "[READ | WRITE | DEFAULT]", cliFuncConfig},//参数表的 读取 写入 恢复模式操作 {"disarm", "", cliFuncDisarm}, //停止手动运行模式 {"duty", "<percent>", cliFuncDuty}, //设置占空比(0~100%,值越高转速越快) {"gzs","",cliFuncGzs}, {"help", "", cliFuncHelp}, //显示支持的功能命令的帮助信息 {"input", "[PWM | UART | I2C | CAN]", cliFuncInput}, //设置输入控制模式 {"jzs","",cliFuncJzs}, //广播转速 {"mode", "[OPEN_LOOP | RPM | THRUST | SERVO]", cliFuncMode}, //设置运行模式 {"pos", "<degrees>", cliFuncPos}, //设置电机要转到什么角度(只在伺服控制模式下使用),传递进来的参数是电机的目标角度 {"pwm", "<microseconds>", cliFuncPwm}, //设置电机的PWM {"rpm", "<target>", cliFuncRpm}, //设置目标速度 {"set", "LIST | [<PARAMETER> <value>]", cliFuncSet},//设置参数表 {"start", "", cliFuncStart}, //电机开始运行 {"status", "", cliFuncStatus}, //显示状态 {"stop", "", cliFuncStop}, //电机停止运行 {"telemetry", "<Hz>", cliFuncTelemetry}, //自动显示电调状态(和控制无关) {"version", "", cliFuncVer} //显示版本 }; #define CLI_N_CMDS (sizeof cliCommandTable / sizeof cliCommandTable[0]) static const char *cliInputModes[] = { "PWM", "UART", "I2C", "CAN", "OW" }; static const char *cliStates[] = { "DISARMED", "STOPPED", "PRE-START", "STARTING", "RUNNING" }; static const char *cliRunModes[] = { "OPEN_LOOP", "RPM", "THRUST", "SERVO" }; static const char cliHome[] = {0x1b, 0x5b, 0x48, 0x00}; static const char cliClear[] = {0x1b, 0x5b, 0x32, 0x4a, 0x00}; static const char cliClearEOL[] = {0x1b, 0x5b, 0x4b, 0x00}; static const char cliClearEOS[] = {0x1b, 0x5b, 0x4a, 0x00}; static const char *stopError = "ESC must be stopped first\r\n"; static const char *runError = "ESC not running\r\n"; uint32_t FullRpm = 5000; //命令提示. void cliUsage(cliCommand_t *cmd) { serialPrint("usage: "); serialPrint(cmd->name); serialWrite(' '); serialPrint(cmd->params); serialPrint("\r\n"); } //设置控制模式(串口 can iic pwm ow) static void cliFuncChangeInput(uint8_t input) { if (inputMode != input) { inputMode = input; sprintf(tempBuf, "Input mode set to %s\r\n", cliInputModes[input]); serialPrint(tempBuf); } } //电机手动运行 static void cliFuncArm(void *cmd, char *cmdLine) { if (state > ESC_STATE_DISARMED) { serialPrint("ESC already armed\r\n"); } else { if (runMode != SERVO_MODE) cliFuncChangeInput(ESC_INPUT_UART); runArm(); serialPrint("ESC armed\r\n"); } } // 广播转速 gzs 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0xff static void cliFuncGzs(void *cmd, char *cmdLine){ uint16_t ReadIn[8]; uint8_t CheckDigit = 0; uint8_t TempCheck = 0; uint8_t *temp = cmdLine; int i; uint32_t ESC32_ID = p[CONFIG_NUM_PARAMS-1]; uint8_t *S_Temp = cmdLine+3*ESC32_ID; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else{ ReadIn[ESC32_ID] = ((*(S_Temp))<<8)+ (*(S_Temp+1)); CheckDigit = *(temp+16); for ( i=1;i<=15;i++) TempCheck = TempCheck + *(temp + i - 1); if(CheckDigit != TempCheck) { serialPrint("Gzs CheckDigit ERROR \r\n"); return; } if (runMode != CLOSED_LOOP_RPM) { runRpmPIDReset(); runMode = CLOSED_LOOP_RPM; } targetRpm = (ReadIn[ESC32_ID]/55535.0)*5000;//设置目标转速 sprintf(tempBuf, "ID %d RPM set to %f \r\n", ESC32_ID,targetRpm); serialPrint(tempBuf); } } //解析转速 jzs 0xff 0xffffff 0xff static void cliFuncJzs(void *cmd, char *cmdLine){ uint32_t ReadIn=0; uint8_t CheckDigit=0,ESC_ID=0; uint8_t *temp = cmdLine; uint8_t TempCheck = 0; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else{ ESC_ID = *temp; CheckDigit = *(temp+4); TempCheck = *(temp)+*(temp+1)+*(temp+2)+*(temp+3); ReadIn=((*(temp+1))<<16)+((*(temp+2))<<8)+(*(temp+3)); if(ESC_ID!= p[CONFIG_NUM_PARAMS-1]) { serialPrint("JZS ID ERROR \r\n"); return; } if(CheckDigit!=TempCheck) { sprintf(tempBuf, "JZS CheckDigit ERROR \r\n"); serialPrint(tempBuf); return; } if (runMode != CLOSED_LOOP_RPM) { runRpmPIDReset(); runMode = CLOSED_LOOP_RPM; } targetRpm = (ReadIn/16777215.0)*5000;//设置目标转速 sprintf(tempBuf, "RPM set to %f \r\n", targetRpm); serialPrint(tempBuf); } } //让电机beep static void cliFuncBeep(void *cmd, char *cmdLine) { uint16_t freq, dur; if (state > ESC_STATE_STOPPED) { serialPrint(stopError); } else { if (sscanf(cmdLine, "%hu %hu", &freq, &dur) != 2) { cliUsage((cliCommand_t *)cmd); } else if (freq < 10 || freq > 5000) { serialPrint("frequency out of range: 10 => 5000\r\n"); } else if (dur < 1 || dur > 1000) { serialPrint("duration out of range: 1 => 1000\r\n"); } else { fetBeep(freq, dur); } } } //设置目标转速 static void cliFuncRpm(void *cmd, char *cmdLine) { float target; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else { if (sscanf(cmdLine, "%f", &target) != 1) { cliUsage((cliCommand_t *)cmd); } else if (p[FF1TERM] == 0.0f) { serialPrint("Calibration parameters required\r\n"); } else if (target < 100.0f || target > 10000.0f) { serialPrint("RPM out of range: 100 => 10000\r\n"); } else { if (runMode != CLOSED_LOOP_RPM) { runRpmPIDReset(); runMode = CLOSED_LOOP_RPM; } targetRpm = target;//设置目标转速 sprintf(tempBuf, "RPM set to %6.0f\r\n", target); serialPrint(tempBuf); } } } static void cliFuncBinary(void *cmd, char *cmdLine) { if (state > ESC_STATE_STOPPED) { serialPrint(stopError); } else { serialPrint("Entering binary command mode...\r\n"); cliTelemetry = 0; commandMode = BINARY_MODE; } } static void cliFuncBoot(void *cmd, char *cmdLine) { if (state != ESC_STATE_DISARMED) { serialPrint("ESC armed, disarm first\r\n"); } else { serialPrint("Rebooting in boot loader mode...\r\n"); timerDelay(0xffff); rccReset(); } } static void cliFuncConfig(void *cmd, char *cmdLine) { char param[8]; if (state > ESC_STATE_STOPPED) { serialPrint(stopError); } else if (sscanf(cmdLine, "%8s", param) != 1) { cliUsage((cliCommand_t *)cmd); } else if (!strcasecmp(param, "default")) { configLoadDefault(); serialPrint("CONFIG: defaults loaded\r\n"); } else if (!strcasecmp(param, "read")) { configReadFlash(); serialPrint("CONFIG: read flash\r\n"); } else if (!strcasecmp(param, "write")) { if (configWriteFlash()) { serialPrint("CONFIG: wrote flash\r\n"); } else { serialPrint("CONFIG: write flash failed!\r\n"); } } else { cliUsage((cliCommand_t *)cmd); } } static void cliFuncDisarm(void *cmd, char *cmdLine) { runDisarm(REASON_CLI); cliFuncChangeInput(ESC_INPUT_UART); serialPrint("ESC disarmed\r\n"); } static void cliFuncDuty(void *cmd, char *cmdLine) { float duty; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else { if (sscanf(cmdLine, "%f", &duty) != 1) { cliUsage((cliCommand_t *)cmd); } else if (!runDuty(duty)) { //duty 不在0~100范围内 serialPrint("duty out of range: 0 => 100\r\n"); } else { sprintf(tempBuf, "Fet duty set to %.2f%%\r\n", (float)fetDutyCycle/fetPeriod*100.0f);//占空比(0~100) / 最大周期 * 100 serialPrint(tempBuf); } } } static void cliFuncHelp(void *cmd, char *cmdLine) { int i; serialPrint("Available commands:\r\n\n"); for (i = 0; i < CLI_N_CMDS; i++) { serialPrint(cliCommandTable[i].name); serialWrite(' '); serialPrint(cliCommandTable[i].params); serialPrint("\r\n"); } } //更改输入模式(pwm iic can uart) static void cliFuncInput(void *cmd, char *cmdLine) { char mode[sizeof cliInputModes[0]]; int i; if (sscanf(cmdLine, "%7s", mode) != 1) { cliUsage((cliCommand_t *)cmd); } else { for (i = 0; i < (sizeof cliInputModes / sizeof cliInputModes[0]); i++) { if (!strncasecmp(cliInputModes[i], mode, 3)) break; } if (i < (sizeof cliInputModes / sizeof cliInputModes[0])) { cliFuncDisarm(cmd, cmdLine); cliFuncChangeInput(i);//更改输入模式 } else cliUsage((cliCommand_t *)cmd);//没有找到支持的模式 } } static void cliFuncMode(void *cmd, char *cmdLine) { char mode[sizeof cliRunModes[0]]; int i; if (sscanf(cmdLine, "%10s", mode) != 1) { cliUsage((cliCommand_t *)cmd); } else { for (i = 0; i < (sizeof cliRunModes / sizeof cliRunModes[0]); i++) { if (!strncasecmp(cliRunModes[i], mode, strlen(cliRunModes[i]))) break; } if (i < (sizeof cliRunModes / sizeof cliRunModes[0])) { cliFuncDisarm(cmd, cmdLine); runMode = i; sprintf(tempBuf, "Run mode set to %s\r\n", cliRunModes[i]); serialPrint(tempBuf); } else cliUsage((cliCommand_t *)cmd); } } static void cliFuncPos(void *cmd, char *cmdLine) { float angle; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else if (runMode != SERVO_MODE) { serialPrint("Command only valid in servo mode\r\n"); } else { if (sscanf(cmdLine, "%f", &angle) != 1) { cliUsage((cliCommand_t *)cmd); } else { fetSetAngle(angle); sprintf(tempBuf, "Position set to %.1f\r\n", angle); serialPrint(tempBuf); } } } static void cliFuncPwm(void *cmd, char *cmdLine) { uint16_t pwm; if (state < ESC_STATE_RUNNING) { serialPrint(runError); } else { if (sscanf(cmdLine, "%hu", &pwm) != 1) { cliUsage((cliCommand_t *)cmd); } else if (pwm < pwmLoValue || pwm > pwmHiValue) { sprintf(tempBuf, "PWM out of range: %d => %d\r\n", pwmLoValue, pwmHiValue); serialPrint(tempBuf); } else { if (runMode != SERVO_MODE) runMode = OPEN_LOOP; runNewInput(pwm); sprintf(tempBuf, "PWM set to %d\r\n", pwm); serialPrint(tempBuf); } } } void cliPrintParam(int i) { const char *format = "%-20s = "; sprintf(tempBuf, format, configParameterStrings[i]); serialPrint(tempBuf); sprintf(tempBuf, configFormatStrings[i], p[i]); serialPrint(tempBuf); serialPrint("\r\n"); } static void cliFuncSet(void *cmd, char *cmdLine) { char param[32]; float value; int i; if (sscanf(cmdLine, "%32s", param) != 1) { cliUsage((cliCommand_t *)cmd); } else { if (!strcasecmp(param, "list")) { for (i = 1; i < CONFIG_NUM_PARAMS; i++) cliPrintParam(i); } else { i = configGetId(param); if (i < 0) { sprintf(tempBuf, "SET: no such parameter '%s'\r\n", param); serialPrint(tempBuf); } else { if (sscanf(cmdLine + strlen(param)+1, "%f", &value) == 1) { if (state > ESC_STATE_STOPPED) { sprintf(tempBuf, stopError); serialPrint(tempBuf); } else { configSetParamByID(i, value); cliPrintParam(i); } } else { cliPrintParam(i); } } } } } //电机启动 static void cliFuncStart(void *cmd, char *cmdLine) { if (state == ESC_STATE_DISARMED) { serialPrint("ESC disarmed, arm first\r\n"); } else if (state > ESC_STATE_STOPPED) { serialPrint("ESC already running\r\n"); } else { runStart(); serialPrint("ESC started\r\n"); } } static void cliFuncStatus(void *cmd, char *cmdLine) { const char *formatFloat = "%-12s%10.2f\r\n"; const char *formatInt = "%-12s%10d\r\n"; const char *formatString = "%-12s%10s\r\n"; float duty; duty = (float)fetActualDutyCycle/fetPeriod;// 实际占空比 / 周期 sprintf(tempBuf, formatString, "INPUT MODE", cliInputModes[inputMode]);//控制输入模式 serialPrint(tempBuf); sprintf(tempBuf, formatString, "RUN MODE", cliRunModes[runMode]); //运行模式 serialPrint(tempBuf); sprintf(tempBuf, formatString, "ESC STATE", cliStates[state]); //esc32当前状态 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "PERCENT IDLE", idlePercent); //空闲时间百分比 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "COMM PERIOD", (float)(crossingPeriod/TIMER_MULT)); serialPrint(tempBuf); sprintf(tempBuf, formatInt, "BAD DETECTS", fetTotalBadDetects); //fet检测到错误的次数 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "FET DUTY", duty*100.0f); //fet实际占空比 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "RPM", rpm); //电机运行时候的转速 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "AMPS AVG", avgAmps); //平均电流(单位安培) serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "AMPS MAX", maxAmps); //最大电流(单位安培) serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "BAT VOLTS", avgVolts); //电池电压 serialPrint(tempBuf); sprintf(tempBuf, formatFloat, "MOTOR VOLTS", avgVolts*duty); //电机电压 serialPrint(tempBuf); #ifdef ESC_DEBUG sprintf(tempBuf, formatInt, "DISARM CODE", disarmReason); serialPrint(tempBuf); #endif } static void cliFuncStop(void *cmd, char *cmdLine) { if (state < ESC_STATE_NOCOMM) { serialPrint(runError); } else { runStop(); cliFuncChangeInput(ESC_INPUT_UART); serialPrint("ESC stopping\r\n"); } } static void cliFuncTelemetry(void *cmd, char *cmdLine) { uint16_t freq; if (sscanf(cmdLine, "%hu", &freq) != 1) { cliUsage((cliCommand_t *)cmd); } else if (freq > 100) { serialPrint("Frequency out of range: 0 => 100\r\n"); } else { if (freq > 0) { cliTelemetry = 1000/freq; serialPrint(cliHome); serialPrint(cliClear); serialWrite('\n'); } else cliTelemetry = 0; } } //显示版本 static void cliFuncVer(void *cmd, char *cmdLine) { sprintf(tempBuf, "ESC32 ver %s\r\n", version); serialPrint(tempBuf); } //bsearch函数所使用的比较实现函数 static int cliCommandComp(const void *c1, const void *c2) { const cliCommand_t *cmd1 = c1, *cmd2 = c2; return strncasecmp(cmd1->name, cmd2->name, strlen(cmd2->name)); } //根据name参数.从cliCommandTable表中找到对应的数组信息 //如果没有找到.那么bsearch会返回空 static cliCommand_t *cliCommandGet(char *name) { cliCommand_t target = {name, NULL}; return bsearch(&target, cliCommandTable, CLI_N_CMDS, sizeof cliCommandTable[0], cliCommandComp); } //清空缓冲区 static void cliPrompt(void) { serialPrint("\r\n> "); memset(cliBuf, 0, sizeof(cliBuf)); cliBufIndex = 0; } void cliCheck(void) { cliCommand_t *cmd; if (cliTelemetry && !(runMilis % cliTelemetry)) { //自动输出电调状态 //serialPrint(cliHome); sprintf(tempBuf, "Telemetry @ %d Hz\r\n\n", 1000/cliTelemetry); serialPrint(tempBuf); cliFuncStatus(cmd, ""); serialPrint("\n> "); serialPrint(cliBuf); serialPrint(cliClearEOL); } while (serialAvailable()) //如果串口收到数据.那么进入循环 { char c = serialRead(); cliBuf[cliBufIndex++] = c; if (cliBufIndex == sizeof(cliBuf)) { cliBufIndex--; c = '\n'; } // EOL if (cliBufIndex && (c == '\n' || c == '\r')) // \r \n ...\r ...\n { if (cliBufIndex > 1) // ...\r ...\n { //收到一个有效的命令.开始比较命令正确性.并相应的执行 serialPrint("\r\n"); serialPrint(cliClearEOS); cliBuf[cliBufIndex] = 0; // ...0 cmd = cliCommandGet(cliBuf);//cliBuf来找到对应的数组 if (cmd) cmd->cmdFunc(cmd, cliBuf + strlen(cmd->name)); else serialPrint("Command not found"); if (commandMode != CLI_MODE) { cliBufIndex = 0; return; } } cliPrompt(); //清空缓冲区 } else { // ..... serialWrite(c); } } } //向串口打印一些信息 void cliInit(void) { serialPrint(cliHome); serialPrint(cliClear); sprintf(version, "%s.%d", VERSION, getBuildNumber());// 1.5.0.5528 cliFuncVer(0, 0); serialPrint("\r\nCLI ready.\r\n"); cliPrompt(); }
24.285912
148
0.606836
e2be9d6a65c351b5b2fbd1bcbb582158458aa1b2
1,528
h
C
tensorflow/core/platform/default/grpc_response_reader.h
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
481
2016-01-28T22:05:07.000Z
2022-03-07T23:29:10.000Z
tensorflow/core/platform/default/grpc_response_reader.h
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
37
2016-01-29T02:18:33.000Z
2020-03-24T17:36:05.000Z
tensorflow/core/platform/default/grpc_response_reader.h
DEVESHTARASIA/tensorflow
d3edb8c60ed4fd831d62833ed22f5c23486c561c
[ "Apache-2.0" ]
110
2016-01-29T14:00:39.000Z
2020-11-22T14:20:56.000Z
/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #ifndef THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_DEFAULT_GRPC_RESPONSE_READER_H_ #define THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_DEFAULT_GRPC_RESPONSE_READER_H_ #include "grpc++/grpc++.h" namespace tensorflow { template <class ResponseMessage, class RequestMessage> ::grpc::ClientAsyncResponseReader<ResponseMessage>* CreateClientAsyncResponseReader(::grpc::ChannelInterface* channel, ::grpc::CompletionQueue* cq, const ::grpc::RpcMethod& method, ::grpc::ClientContext* context, const RequestMessage& request) { return new ::grpc::ClientAsyncResponseReader<ResponseMessage>( channel, cq, method, context, request); } } // namespace tensorflow #endif // THIRD_PARTY_TENSORFLOW_CORE_PLATFORM_DEFAULT_GRPC_RESPONSE_READER_H_
41.297297
80
0.698298
5b31ae397b398575c23028d93e59e6a4382091ae
12,884
h
C
svntrunk/src/bgfe/obsolete_pk/blimpi/BGL_GlobalIntSPI.h
Bhaskers-Blu-Org1/BlueMatter
1ab2c41af870c19e2e1b1095edd1d5c85eeb9b5e
[ "BSD-2-Clause" ]
7
2020-02-25T15:46:18.000Z
2022-02-25T07:04:47.000Z
svntrunk/src/bgfe/obsolete_pk/blimpi/BGL_GlobalIntSPI.h
IBM/BlueMatter
5243c0ef119e599fc3e9b7c4213ecfe837de59f3
[ "BSD-2-Clause" ]
null
null
null
svntrunk/src/bgfe/obsolete_pk/blimpi/BGL_GlobalIntSPI.h
IBM/BlueMatter
5243c0ef119e599fc3e9b7c4213ecfe837de59f3
[ "BSD-2-Clause" ]
5
2019-06-06T16:30:21.000Z
2020-11-16T19:43:01.000Z
/* Copyright 2001, 2019 IBM Corporation * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the * following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the * following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the * following disclaimer in the documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE 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. */ // // File: blade/spi/BGL_GlobalIntSPI.h // // Purpose: Define Blade's Global Interrupt System Programming Interface. // // Program: Bluegene/L Advanced Diagnostics Environment (BLADE) // // Author: Matthias A. Blumrich (blumrich@us.ibm.com) // (c) IBM, 2003 // // Notes: This SPI is intended for system software development, // and in many cases, simplicity has been eschewed for performance // and explicit control over the global interrupts. // // History: 03/21/2003: MAB - Created. // // #ifndef _BGL_GLOB_INT_SPI_H // Prevent multiple inclusion #define _BGL_GLOB_INT_SPI_H __BEGIN_DECLS /*---------------------------------------------------------------------------* * Global Interrupt Low-Level Interface * *---------------------------------------------------------------------------*/ // Use these to construct channel vectors to specify multiple channels in one operation. #define _BGL_GI_CH0 (0x00000008) #define _BGL_GI_CH1 (0x00000004) #define _BGL_GI_CH2 (0x00000002) #define _BGL_GI_CH3 (0x00000001) // Information returned by status reads. Note that userEnables returns the uptree state // in diagnostic read mode. typedef struct T_BGL_GiStatus { unsigned mode:4; // Mode 0-3 (1=sticky, 0=direct) unsigned stickyInt:4; // Sticky mode interrupt 0-3 (1=active) unsigned stickyActive:4; // Sticky mode in progress 0-3 (1=true) unsigned stickyType:4; // Sticky mode type 0-3 (0=OR, 1=AND) unsigned readMode:1; // Read mode (0=normal, 1=diagnostic) unsigned p0addrErr:1; // Processor 0 address error (1=true) unsigned p1addrErr:1; // Processor 1 address error (1=true) unsigned parityErr:1; // Parity error (1=true) unsigned giRecvState:4; // Global interrupt recv state 0-3 (filtered "downtree" state) unsigned userEnables:4; // User-level enables 0-3 (1=enabled). // Actual "uptree" state when readMode=1. unsigned giSendState:4; // Global interrupt send state 0-3 ("uptree" state) } _BGL_GiStatus; ////////////////////////// // User-level Functions // The following set of functions can be called in user (unprivileged) mode. They always access // the hardware through the upper address image (0xB11000x0). // Configure specified channel(s) for sticky logical OR or AND mode. // All of the channels specified must allow user-level control or the call fails. int BGLGiEnableStickyOr( int channelVector ); int BGLGiEnableStickyAnd( int channelVector ); // Sticky mode. Activate uptree channel(s) in the previously-configured sticky mode (OR or AND). // All of the channels specified must allow user-level control or the call fails. This call sets // the uptree state. int BGLGiStartStickyInt( int channelVector ); // Sticky mode. Deactivate uptree channel(s) in the previously-configured sticky mode (OR or AND), // and clear the sticky mode interrupt(s). Note that the uptree channel will usually be deactivated // already as a result of the downtree interrupt returning. // All of the channels specified must allow user-level control or the call fails. int BGLGiClearStickyInt( int channelVector ); // Direct mode. Configure channel(s) for direct mode, and force the uptree state (0 or 1). // All of the channels specified must allow user-level control or the call fails. int BGLGiSetChannelState( int channelVector, // Channels to force to specified state int state ); // 0 if zero, 1 if non-zero // Return global interrupt hardware status. int BGLGiGetStatus( _BGL_GiStatus *stat ); ////////////////////////// // System-level Functions // The following set of functions can only be called in system (privileged) mode. They always access // the hardware through the lower address image (0xB01000x0). // Reset channel(s) to initial state. int BGLGiResetChannel( int channelVector ); // Set the read mode to normal or diagnostic. int BGLGiSetReadModeNormal(); int BGLGiSetReadModeDiagnostic(); // Enable and disable user-level (upper address image) access to the specified channel(s). int BGLGiEnableUserAccess( int channelVector ); int BGLGiDisableUserAccess( int channelVector ); // Configure specified channel(s) for sticky logical OR or AND mode. int BGLGiEnableStickyOrPrivileged( int channelVector ); int BGLGiEnableStickyAndPrivileged( int channelVector ); // Sticky mode. Activate uptree channel(s) in the previously-configured sticky mode (OR or AND). // This sets the uptree state. int BGLGiStartStickyIntPrivileged( int channelVector ); // Sticky mode. Deactivate uptree channel(s) in the previously-configured sticky mode (OR or AND), // and clear the sticky mode interrupt(s). Note that the uptree channel will usually be deactivated // already as a result of the downtree interrupt returning. int BGLGiClearStickyIntPrivileged( int channelVector ); // Direct mode. Configure channel(s) for direct mode, and force the uptree state (0 or 1). int BGLGiSetChannelStatePrivileged( int channelVector, // Channels to force to specified state int state ); // 0 if zero, 1 if non-zero // Reads status in the lower address range (0xB01000x0) int BGLGiGetStatusPrivileged( _BGL_GiStatus *stat ); /*---------------------------------------------------------------------------* * Global Interrupt High-Level Interface * *---------------------------------------------------------------------------*/ #define _BGL_GI_PENDING (0x00000000) // (actual value t.b.d.) #define _BGL_GI_COMPLETE (0x00000001) // (actual value t.b.d.) typedef Bit32 _BGL_GiHandle; // Barriers // The global interrupts can be used to create barriers. In this case, the sticky AND mode // is always used, so a single global interrupt suffices. When a barrier is created, an // interrupt service routine (ISR) can be specified. If so, then the ISR is called when // the barrier completes. In general, this feature will not be used. Rather, the barrier // will be a blocking call or a split transaction with periodic polling for completion. // // Note that the global interrupt is explicitly specified in order to avoid a global // operation when creating a barrier. That is, if the system were to choose a global interrupt // and return some sort of handle, then coordination between all nodes would be required. // Clearly, this can be implemented with this SPI, if desired. // Creates a barrier using sticky AND mode. Returns an error if the global interrupt is // already assigned. If barrierISR is NULL, then the barrier interrupt will be masked and // polling or blocking is required. int BGLGiCreateBarrier( _BGL_GiHandle barrier, // Global interrupt to use (2 and 3 are reserved for OS) void (*barrierISR()) ); // Optional ISR to call on completion. NULL if none. // Traditional blocking barrier call. Enables the barrier and returns when it has // completed. The barrier should not be created with an ISR! int BGLGiBarrier( _BGL_GiHandle barrier ); // Enters a barrier (sets uptree state), and returns immediately. This starts a split // transaction. int BGLGiEnableBarrier( _BGL_GiHandle barrier ); // Polls a barrier and returns _BGL_GI_COMPLETE if barrier has completed, _BGL_GI_PENDING if // not, or an error if the barrier has not been enabled. Note that the local hardware interrupt // is polled. int BGLGiPollBarrier( _BGL_GiHandle barrier ); // Clears the local hardware interrupt caused by a barrier completion. Since the local // interrupt flag is what the polling function looks at, subsequent polls after this call // will return _BGL_GI_PENDING. Note that this call may effect the BIC, to be decided. int BGLGiClearBarrier( _BGL_GiHandle barrier ); // Enables the associated ISR by un-masking the interrupt. Returns an error if there is no // ISR associated with the barrier, or if the barrier has not been created. Note that this // call may effect the BIC, to be decided. int BGLGiEnableBarrierISR( _BGL_GiHandle barrier ); // Disables the associated ISR by masking the interrupt. Returns an error if the barrier has // not been created. Note that this call may effect the BIC, to be decided. int BGLGiDisableBarrierISR( _BGL_GiHandle barrier ); // Frees a barrier so that its associated global interrupt can be re-used. Basically // dis-associates the global interrupt with any ISR and masks the local hardware interrupt. // Returns a warning if the barrier has been enabled and has not been cleared. int BGLGiGFreeBarrier( _BGL_GiHandle barrier ); // Notifications // The global interrupts can be used to create notifications, which are basically remote // interrupts. In this case, the sticky OR mode is always used, so a single global interrupt // suffices. When a notification is created, an interrupt service routine (ISR) can be // specified. If so, then the ISR is called when a notification arrives. Alternatively, the // notification can be polled for. // // Note that the global interrupt is explicitly specified in order to avoid a global // operation when creating a notification. That is, if the system were to choose a global // interrupt and return some sort of handle, then coordination between all nodes would be // required. Clearly, this can be implemented with this SPI, if desired. // Creates a notification using sticky OR mode. Returns a handle or -1 if no global interrupts // are available. If notificationISR is NULL, then the interrupt will be masked and polling // is required. _BGL_GiHandle BGLGiCreateNotification( _BGL_GiHandle notification, // Global interrupt to use (2 and 3 are reserved for OS) void (*notificationISR()) ); // Optional ISR to call on completion. NULL if none. // Activates a notification. int BGLGiSendNotification( _BGL_GiHandle notification ); // Polls a notification and returns _BGL_GI_COMPLETE if it has arrived, _BGL_GI_PENDING if // not, or an error if the notification has not been created. int BGLGiPollNotification( _BGL_GiHandle notification ); // Clears the local hardware interrupt caused by a notification arrival. Since the local // interrupt flag is what the polling function looks at, subsequent polls after this call // will return _BGL_GI_PENDING. Note that this call may effect the BIC, to be decided. int BGLGiClearNotification( _BGL_GiHandle notification ); // Blocks until the specified notification arrives. int BGLGiWaitForNotification( _BGL_GiHandle notification ); // Enables the associated ISR by un-masking the interrupt. Returns an error if there is no // ISR associated with the notification, or if the notification has not been created. int BGLGiEnableNotificationISR( _BGL_GiHandle notification ); // Disables the associated ISR by masking the interrupt. Returns an error if the notification // has not been created. int BGLGiDisableNotificationISR( _BGL_GiHandle notification ); // Frees a notification so that its associated global interrupt can be re-used. Basically // dis-associates the global interrupt with any ISR and masks the local hardware interrupt. int BGLGiGFreeNotification( _BGL_GiHandle notification ); __END_DECLS #endif // Add nothing below this line.
51.330677
118
0.716392