text
stringlengths
3.08k
10.5k
/* * Copyright 1996,2002,2005 <NAME>, <NAME>, <NAME>, * <NAME>, <NAME> * * This file is part of the DT3155 Device Driver. * * The DT3155 Device Driver 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 Foundati...
/**************************************************************************** * * Copyright 2018 Samsung Electronics 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...
// ################################################################################################# // # << NEORV32 - GPIO pin-change interrupt demo >> # // # ********************************************************************************************* # // # BSD 3-Clause...
/* $NetBSD: ext2fs_subr.c,v 1.31 2015/03/28 19:24:04 maxv Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditi...
/* * This file is part of the coreboot project. * * Copyright (C) 2007 Advanced Micro Devices, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * This program is distr...
#include "rmscalc.h" #include <assert.h> /* * we use a buffer to store the squared samples. the buffer is as big as to * save all the samples needed for one period of the signal at the lowest freq. */ struct rbuf { int32_t *buf; uint32_t head; uint32_t tail; uint32_t size; uint32_t tsize; }; #d...
/* CSC 425 Assignment 1 Authors: <NAME> and <NAME> Due Date: Wednesday, February 24th sproxy.c -- Connects to the telnet daemon and listens for the cproxy connection */ #include <stdio.h> #include <string.h> #include <stdbool.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/select.h> #include <net...
/* $Id: toclexer.c,v 1.2 2008/03/23 17:21:34 karl Exp $ Copyright (C) 2005, 2008 <NAME> <<EMAIL>> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License,...
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2015 <NAME> <<EMAIL>> */ #include <common.h> #include <clk.h> #include <dm.h> #include <log.h> #include <dm/device_compat.h> #include <dm/devres.h> #include <dm/ofnode.h> #include <generic-phy.h> #include <reset.h> #include "ohci.h" #if !defined(CONFIG_USB_OHC...
#include "libDCF.h" // Hidden terminals using CSMA/CA void B1simulation(); void B1_sim_run(node *A, node *C); const char *outputFileName = "B1simout.csv"; int main() { B1simulation(); return 0; } void B1simulation() { node A; node C; int lambdaA[] = {50, 100, 200, 300, 500, 100, 200, 400, 600,...
/* * Copyright 2018-2019 NXP * All rights reserved. * * * SPDX-License-Identifier: BSD-3-Clause */ #include "fsl_tempmon.h" /******************************************************************************* * Definitions ******************************************************************************/ /* Compon...
/* * Copyright (c) 2013-2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC) * 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 r...
/******************************************************************************* * Copyright 2011-2012, Cypress Semiconductor Corporation. All rights reserved. * You may use this file only in accordance with the license, terms, conditions, * disclaimers, and limitations in the end user license agreement accompanyin...
/* * Copyright (C) 2007 <NAME> <<EMAIL>>. * * 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 any later version. * * This program is distributed in th...
/*============================================================================ This C source file is part of the SoftPosit Posit Arithmetic Package by <NAME> (Cerlane). Copyright 2017 2018 A*STAR. All rights reserved. This C source file was based on SoftFloat IEEE Floating-Point Arithmetic Package, Release 3d, by ...
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
// // EdenError.c // // Copyright (c) 2004-2012 <NAME> (PRL) <EMAIL>. All rights reserved. // // Rev Date Who Changes // 1.0.0 2004-06-01 PRL Pulled together from other headers. // // // @@BEGIN_EDEN_LICENSE_HEADER@@ // // This file is part of The Eden Library. // // The Eden Library is free software: you can...
/* Written by: <NAME>. Login: pntdz31 (don't ask) Student #: 9840642 Subject: CSCI203 Assignment: 3 */ /* NOTE: Any negative value of an edge denotes that this edge is not in the spanning tree */ #define NOT_IN_SPANNING_TREE -1 #define MIN(x,y) ((x) < (y) ? (x) : (y)) #define ABS(x) (((x) < 0) ? (x) * -1 :...
/* mnspev.f -- translated by f2c (version 19961017). You must link the resulting object file with the libraries: -lf2c -lm (in that order) */ #include "f2c.h" /* Table of constant values */ static integer c__1 = 1; /* ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc */ /* c ...
/** * @file framebuffer.h * @brief Framebuffer wrapper object, providing support for software rendered graphics. * @author fincs * @copyright libnx Authors */ #pragma once #include "../nvidia/map.h" #include "native_window.h" /// Converts red/green/blue/alpha components to packed RGBA8 (i.e. \ref PIXEL_FORMAT_RGB...
/* * tree.c * * Tree building routines. * * These routines are originally from the Public Domain source "AR001". * * However, they have been modified for use in LZX. */ #include "encoder.h" /* Function prototypes */ static void downheap(t_encoder_context *context, short i); static void make_tr...
/*====================================================================== * * Connect to server with optional retry * *====================================================================*/ #include "iacp.h" #include "util.h" static VOID SetErrorLevel(int ErrorCode, int *ErrorLevel, int *LogLevel) { *ErrorLevel...
/* * SNMP Monitor * * Copyright (c) 2019 <NAME> <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause */ #include <err.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <glib.h> #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include "rrdb.h...
/** \file * \brief iupmatrix column resize * * See Copyright Notice in "iup.h" */ /**************************************************************************/ /* Interactive Column Resize Functions and WIDTH/HEIGHT change */ /**************************************************************************/ #...
/* * fg_input_devices.c * * Handles miscellaneous input devices via direct serial-port access. * Proper X11 XInput device support is not yet supported. * Also lacks Mac support. * * Written by <NAME> <<EMAIL>> 2005 * * Copyright (c) 2005 <NAME>. All Rights Reserved. * * Permission is hereby granted, free of ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <unistd.h> #include <time.h> #include <glib.h> #include <gio/gio.h> #include <ieee11073.h> #include <communication/plugin/plugin_bluez.h> #include <specializations/pulse_oximeter.h> #include <agent.h> static const intu8 AGENT_SYST...
/*++ /* NAME /* postconf_node 3 /* SUMMARY /* low-level parameter node support /* SYNOPSIS /* #include <postconf.h> /* /* PCF_PARAM_TABLE *PCF_PARAM_TABLE_CREATE(size) /* ssize_t size; /* /* PCF_PARAM_INFO **PCF_PARAM_TABLE_LIST(table) /* PCF_PARAM_TABLE *table; /* /* const char *PCF_PARAM_INFO_NAME(info) /* PCF_PARAM_...
/* * Copyright (c) 2018 ARM Limited. All rights reserved. * SPDX-License-Identifier: Apache-2.0 * 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...
/* * $Id: MOD_smoke.c 39342 2011-08-12 18:11:22Z blendix $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * 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 you...
#include<stdio.h> #include<stdlib.h> typedef struct Node CLL; struct Node { int data; CLL *next; }*head=NULL; int Read_No_Nodes(); void addEnd(struct Node *, int); void addBegin(struct Node *,int); void Traverse_CLL(struct Node *); void InsertAfterSpecific(struct Node *,int ,int ); int Read_Element_to_Insert...
#include <stdio.h> #include <stdint.h> #include <stdbool.h> #include <stdlib.h> #include <string.h> #include <unistd.h> // Main Config file #include "configuration.h" // Cache, time and memory utils #include "../utils/cache_utils.h" #include"../utils/memory_utils.h" #include "../utils/misc_utils.h" // Evset function...
/* * 15.7.c -- Write a program with the same behavior as described in exercise 6, * but use an unsigned long variable to hold the font information and use the * bitwise operators instead of bit members to manage the information. */ #include <stdio.h> #include <string.h> #include <limits.h> #define FONT_ID_MASK 0...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* run_info.c :+: :+: :+: ...
#include "priv.h" #define TOLOWER(x) ((x) | 0x20) static const char* argv0; static struct { char** array; int count; } args; struct format { const char* style; enum { FMT_DECIMAL, FMT_FLOAT, FMT_CHAR, FMT_STRING } type; }; /* Utilities */ static con...
// // Super basic bootloader // This has been written quickly for testing // #include <sys/asm.h> #include "stdfn.h" #include <elf.h> #include <string.h> #include <stdlib.h> #define STDFN_INC 1 struct FileHeader { char type; char name[20]; uint32_t length; } FileHeader; char led_state=1; char * led = (...
/* A quick hack to show memory usage of running process * * Tru64 v4 and v5 * * Demonstrates the use of /proc on Tru64 * * MJR 2002 */ #include<stdio.h> #include<stdlib.h> /* malloc */ #include<unistd.h> /* close */ #include<sys/types.h> #include<sys/signal.h> #include<sys/fault.h> #include<sys/sys...
// // <NAME> (kjn33) // IPprint.c // 2017-01-19 // Prints data about IP addresses and their associated organizations // #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #define EXIT_SUCCESS 0 #define EXIT_FAILURE 1 #define BYTES_PER_IP 4 #define CHARS_PER_IP 16 #def...
#include "euler_util.h" #include <string.h> #define GRID_LENGTH 20 #define GRID_HEIGHT (GRID_LENGTH) #define GRID_HG_LG (GRID_LENGTH + GRID_HEIGHT) #define MAX_CARRY 50 #define ALIGNTO 4U #define MAX_FACTOR_LEN 2 #define ALIGN_FACTOR(size) ((size + ALIGNTO - 1) & ~(ALIGNTO - 1)) #define FACTOR_LEN ALIGN_FACTOR(MAX...
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <pthread.h> #define MATSIZE 5000 int mat1[MATSIZE][MATSIZE]; int mat2[MATSIZE][MATSIZE]; typedef struct argstruct { int x_start; int x_end; int y_start; int y_end; int** res_mat; } args_t; int getX_start(int i) { return (i %...
/* =========================================================================== Copyright (C) 1999-2005 Id Software, Inc. Copyright (C) 2006 <NAME> <<EMAIL>> This file is part of XreaL source code. XreaL source code is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
/* * The MIT License (MIT) * * Copyright (c) 2014 <NAME> * * 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,...
/* Standard includes */ #include "stdlib.h" #include "stdio.h" #include <sys/asoundlib.h> #include <linux/asoundid.h> /* snd includes */ #include "snd.h" typedef struct { int portfd; snd_pcm_t *sound_handle; } descr_t, *descr_type; const char* snd_card_type_name (unsigned int card_type) { switch (card_t...
/* USER CODE BEGIN Header */ /* * MJM Post Build Test Code for GPIO * 2021 * */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ******************************************************************************...
//============================================================== //Persistent settings object for the CarelessWSPR project. //impl #include "CarelessWSPR_settings.h" #include "main.h" #include "stm32f1xx_hal.h" #include "cmsis_os.h" #include <string.h> static PersistentSettings g_settings; //our set...
/* Copyright 2018 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* Bip board-specific configuration */ #include "adc.h" #include "adc_chip.h" #include "charge_state.h" #include "common.h" #include "driver/ppc/s...
/* This file is part of the libopencm3 project. * * It was generated by the irq2nvic_h script. * * This part needs to get included in the compilation unit where * blocking_handler gets defined due to the way #pragma works. */ /** @defgroup CM3_nvic_isrdecls_SAM3X User interrupt service routines (ISR) defaults f...
/* * ZMap Copyright 2013 Regents of the University of Michigan * * 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 */ #include <stdint.h> #includ...
/* * Vortex OpenSplice * * This software and documentation are Copyright 2006 to TO_YEAR ADLINK * Technology Limited, its affiliated companies and licensors. All rights * reserved. * * Licensed under the ADLINK Software License Agreement Rev 2.7 2nd October * 2014 (the "License...
/*- * Copyright (c) 2013, 2014 <NAME>, University of Zagreb * * 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 conditio...
/* * Copyright 2012 Samsung Electronics Co., Ltd * * Licensed under the Flora License, Version 1.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.tizenopensource.org/license * * Unless required by appli...
/**************************************************************************//** * @file main.c * @version V0.10 * @brief * Configure SPI0 as I2S Slave mode and demonstrate how I2S works in Slave mode. * This sample code needs to work with SPII2S_Master. * * SPDX-License-Identifier: Apach...
/* * Copyright (C) 2012 <NAME> <<EMAIL>> * All Rights Reserved. * * 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,...
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include "php.h" #include "php_yy_prof.h" #include <mdbm.h> #include "include/yy_storage.h" const int YY_PROF_MDBM_PAGE_SIZE = 1024 * 16; const int YY_PROF_MDBM_INIT_SIZE = 1024 * 1024 * 16; typedef struct _yy_prof_storage_mdbm_iter { MDBM *db; MDBM_ITER iter;...
/** * \file * \brief "Barrelfish posse in full effect", by dynamite */ /* * Copyright (c) 2007, 2008, 2009, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Univ...
/* * Copyright (C) 2015 Infineon Technologies AG. All rights reserved. * * Infineon Technologies AG (Infineon) is supplying this software for use with * Infineon's microcontrollers. * This file can be freely distributed within development tools that are * supporting such microcontrollers. * * THIS SOFTWARE IS P...
/* * sync / sw_sync abstraction * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files ...
/* -------------------------------------------------------------------- *\ * Distributed Data Interface * ========================== * * Subroutines to control dynamic load-balancing. * * Author: <NAME> * 10 Jun 09 - RMO - update ddi_send_request args \* ---------------------------------------------------------...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyri...
//! @file //! //! Copyright (c) Memfault, Inc. //! See License.txt for details //! //! @brief #include "memfault-firmware-sdk/components/include/memfault/core/build_info.h" #include "memfault-firmware-sdk/components/include/memfault/core/device_info.h" #include "memfault-firmware-sdk/components/include/memfault/core/p...
/** * @brief Compiler program. * * @file main.c * @author <NAME>, <NAME> & <NAME> * @date 2018-03-09 */ #include <string.h> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <getopt.h> #include "debug.h" #include "main.h" #include "auxiliary.h" #include "symbol.h" #include "tree.h" #include "pr...
#include <stdlib.h> #include <string.h> #include "base64.h" static void init_conversion_tables(void); /* Global variables used in this source file only */ static unsigned char char_to_base64[128]; static char base64_to_char[64]; static int tables_initialised = 0; int EncodeBase64(const unsigned char* sSrc, unsig...
/* Copyright 2010-2013 SourceGear, LLC 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, softwar...
/* Shared library add-on to iptables to add IP range matching support. */ #include <stdio.h> #include <netdb.h> #include <string.h> #include <stdlib.h> #include <getopt.h> #include <iptables.h> #include <linux/netfilter_ipv4/ipt_iprange.h> /* Function which prints out usage message. */ static void help(void) { print...
/* * Q2 * by <NAME> 316961101 * Task 4 - Binary Trees * MTA */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define LEFT 0 #define RIGHT 1 #define SIZE 100 typedef int BOOL; #define FALSE 0 #define TRUE 1 typedef struct listNode { int data; struct listNode *next; } ListN...
/* -------------------------------------------------------------------- *\ * Distributed Data Interface * ========================== * * Subroutines associated with signal handling. * * Author: <NAME> * 13 May 10 - SS - accomodate Window's sleep differences \* --------------------------------------------------...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * File Name : freertos.c * Description : Code for freertos applications ****************************************************************************** * @attention * * <h2><cente...
//iwbt -- compute wet or icebult from air and dewpoint temperatures #include <stdio.h> #include <stdlib.h> #include <math.h> #include <errno.h> #include <omp.h> #include "envphys_c.h" #include "envphys.h" #define RH2O 461.5 /* Gas constant for water vapor (J/kg/K) */ #define EPS (MOL_H2O/MOL_AIR) /* Ratio of molecul...
/*************************************************************************** hardisk.c Generic MAME hard disk implementation, with differencing files **************************************************************************** Copyright <NAME> All rights reserved. Redistribution and use in sour...
/* Copyright (C) 2009-2019 Parallel Realities 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 t...
/* Copyright (c) 2019-2020 NetFoundry, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
/***************************************************************************//** * @file main_xg2x.c * @brief This project shows how to configure the EUART for using LDMA to write * and read to the EUART transmit/receive registers while remaining in EM2. This * example receives input from the serial terminal device...
#include <lua.h> #include <dma.h> #include <draw.h> #include <graph.h> #include <gs_psm.h> #include <inttypes.h> #include <malloc.h> #include <stdlib.h> #include <string.h> #include "log.h" #include "script.h" struct gs_state { framebuffer_t fb[2]; zbuffer_t zb; int ctx; }; static struct gs_state *st; static...
/*---------------------------------------------------------------------------*\ FILE........: golay23.c AUTHOR......: <NAME> & <NAME> DATE CREATED: 3 March 2013 To test: src$ gcc golay23.c -o golay23 -Wall -DGOLAY23_UNITTEST -DRUN_TIME_TABLES src$ ./golay23 To generate tables: src$ gcc gola...
/* This file contains file metadata retrieval and manipulation routines. * * The entry points into this file are: * get_mode return a file's mode * do_stat perform the STAT file system call * do_chmod perform the CHMOD file system call * do_utime perform the UTIME file system call * * Created: * ...
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "profiles.h" perfil* importarLista(perfil *v,int *c){ int f_len, posiAtual; FILE *f = fopen("arquivos-txt/perfis.txt","r"); if(f == NULL){ printf("ERROR: não foi possivel abrir aquivo"); exit(1); } posiAtual = ftell(f); //Teste para saber se ...
#include <stdio.h> #include <stdlib.h> #include "hashmap.h" #include <math.h> #define TRUE (1) #define FALSE (0) #define FAILED (-1) const int prime_table[] = { 3, 7, 11, 17, 23, 29, 37, 47, 59, 71, 89, 107, 131, 163, 197, 239, 293, 353, 431, 521, 631, 761, 919, 1103...
/* * hash_table.c * Created by <NAME> on 25/04/14. */ #include "hash_table.h" #include <string.h> #include <stdlib.h> #include <stdio.h> #define range_s 0 #define range_t 1 #define A (sqrt(5)-1)/2 // for keys that are floats #define hash_float(k,M) (((k-range_s)/(range_t-range_s))*M) // for keys that are integ...
/* GLib testing framework examples and tests * Copyright (C) 2008 Imendio AB * Authors: <NAME> * * This work is provided "as is"; redistribution and modification * in whole or in part, in any medium, physical or electronic is * permitted without restriction. * * This work is distributed in the hope that it will...
#include "audio.h" #include "cortexm4_dsp.h" #include <em_ldma.h> #include <em_usart.h> #include <em_gpio.h> #include <em_acmp.h> #include <em_cmu.h> // Data from bluetooth is received asynchronously and goes through ring // buffer to I2S bus. Different clients can mix audio to buffer until // it is transmitted out. #...
#include "genetic_algorithm.h" // calcs a subject fitness // fitness = cost^2 void calc_fitness(solution_t* solution){ solution->fitness = pow(solution->cost, 2); } // compare function used in qsort int cmp_func(const void* a, const void* b){ solution_t* item_a = *(solution_t**)a; solution_t* item_b = *(solution...
#define _GNU_SOURCE #include <dlfcn.h> #include <unistd.h> #include <fcntl.h> #include <signal.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdint.h> #include <assert.h> #include <stdbool.h> #include <ffi.h> #include <inttypes.h> #include "builtins.h" #include "variables.h" #include "arrayfu...
/**************************************************************************** * @author: Jordan396 <https://github.com/Jordan396/trivial-twitter-v2> * * * * This file was heavily adapted from the source code in: * * "TC...
/* * dbskkd-cdb.c * SKK dictionary Server * with <NAME>'s cdb database */ /* * MIT License (MIT) * Copyright © 2016 <NAME> <<EMAIL>> * * 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 Softwar...
/* * Copyright 2018 The Opentls Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.opentls.org/source/licens...
//Assuming that the code above is saved in a file name w1mdb.c, compile it using the following command: //gcc -Wall -lsqlite3 -o w1mdb w1mdb.c //file taken from: // http://bradsrpi.blogspot.com/search?q=1-wire+sensor+sqlite3 /* C Program to Read Multiple DS18B20 1-Wire Temperature Sensors & Save Data to a Sqlite Dat...
/* Copyright 2018 Canaan Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
#define _DEFAULT_SOURCE #include <string.h> #include "greatest/greatest.h" #include "theft/theft.h" #include "match.h" static void *string_alloc_cb(struct theft *t, theft_hash seed, void *env) { (void)env; int limit = 128; size_t sz = (size_t)(seed % limit) + 1; char *str = malloc(sz + 1); if (str == NULL) { ...
#include <stdlib.h> #include <euphemus.h> #include "euphemus_int.h" struct initial_parse_frame { struct eu_stack_frame base; struct eu_parse *ep; }; static enum eu_result initial_parse_resume(struct eu_stack_frame *frame, void *v_ep) { struct eu_parse *ep = v_ep; (void)frame; if (ep->input != ep->input...
/* * This file contains code parts based on the Mesa library's implementation of * matrix operations. These parts are marked as such by a comment. * * Included the Mesa license: * Mesa 3-D graphics library * * Copyright (C) 1999-2005 <NAME> All Rights Reserved. * * Permission is hereby granted, free of cha...
#include "um_debug.h" /* Copyright 2020 NetFoundry, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to...
/* * event.c * * Created on: 2016/7/26 * Author: lc */ #include <string.h> #include <eat_interface.h> #include <eat_gps.h> #include "log.h" #include "msg.h" #include "fsm.h" #include "mem.h" #include "uart.h" #include "modem.h" #include "utils.h" #include "timer.h" #include "client.h" #include "socket.h" #...
#include "xvmaininc.h" #include "defines.h" #include "rtlintproto.h" #include "declares.h" #include "externs.h" #include "ftnbridge.h" /*$$*/ /* That symbol marks things in the template which */ /* change for different routines */ /************************************************************************/ /* C-Cal...
// 2014-04-02 - http://www.problemotd.com/problem/muspi-merol/ #include <stdlib.h> #include <stdio.h> #include <time.h> #include <string.h> #define MIN_WORD_LENGHT 1 #define MAX_WORD_LENGTH 10 #define MIN_SENTENCE_WORDS 3 #define MAX_SENTENCE_WORDS 14 #define MAX_SENTENCE_LENGTH 80 #define MIN_PARAGRAPH_SENTENCES 3 #d...
/* SPDX-License-Identifier: MIT License Copyright (c) 2021 Nordix Foundation */ #include "util.h" #include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <netinet/ether.h> #include <arpa/inet.h> /* htons */ void die(char const* fmt, ...) { va_list ap; va_sta...
#include <stdio.h> #define MAX (15) #define MAX_LEN (40) #define push(X) do {\ if (answer[(X)].valid == FALSE) {\ (queue[push_queue][queue_index++]=(X));\ answer[(X)].valid = TRUE; \ } } while(0); #define TRUE (1) #define FALSE (0) #define INVALID (-1) struct TABLE { char buffer[(MAX + 1) * (MAX_LEN + 1)]; in...
/****************************************************************************** * @file vcom.c * @author MCD Application Team * @version V1.2.0 * @date 10-July-2018 * @brief manages virtual com port ****************************************************************************** * @attentio...
#include <lcm/lcm.h> #include <bot_core/bot_core.h> #include <bot_vis/bot_vis.h> #include <lcmtypes/bot_lcmgl_data_t.h> #include "lcmgl_decode.h" #include "lcmgl_bot_renderer.h" typedef struct { GPtrArray *backbuffer; GPtrArray *frontbuffer; int enabled; } lcmgl_channel_t; typedef struct _BotLcmglRender...
/**************************************************************************** ** *A soluble_orbits.c ANUPQ source <NAME> ** *Y Copyright 1995-2001, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany *Y Copyright 1995-2001, School of Mathematical Sciences, ANU, Australia ** */ #in...
/** * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
#define DOT_BASE 0x80 #define WRITE_OFF 0x0 #define READ_OFF 0x0 #define WEIGHT_OFF 0x2 #define INPUT_OFF 0x3 #define LENGTH 0x5 #define MEM_BASE 0xC0001000 #define FPGA_MEM_BASE MEM_BASE - 0xC0000000 #define MEM_SIZE 1024 * 1024 * 20 #define DOT 0xFF202000 #define DOT_SIZE 0x4 * 0xF #include "mappi...