text
stringlengths
3.08k
10.5k
/* * This file is part of the coreboot project. * * Copyright (C) 2009 Samsung Electronics * * 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 i...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (the "License"). You may not use this file except in compliance * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * o...
/* * ioremap.c * * Support for mapping between dma_addr_t values a phys_addr_t values. * * Copyright (C) 2005-2009 Scientific-Atlanta, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Found...
/* * SPDX-FileCopyrightText: 2016 <NAME> * SPDX-FileCopyrightText: 2021-2022 Comcast Cable Communications Management, LLC * * SPDX-License-Identifier: MIT */ #include <stdbool.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <curl/curl.h> #include "frame.h" #include "in...
/* ************************************************************************ * Copyright 2013 Advanced Micro Devices, 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...
/* * Copyright (C) 2001-2003 <NAME> <<EMAIL>> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option)...
/* * Copyright 2015-2017, Intel Corporation * * 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 ...
#include "light.h" #include "osapi.h" #include "debug.h" #include "driver/uart.h" #include "user_interface.h" #include "running_state.h" uint16_t min(uint16_t val1, uint16_t val2) { return val1 < val2 ? val1 : val2; } void empty_read_buffer() { while(uart0_available()) { uart0_read(); } } int...
/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2021-10-17 <NAME> First version */ #include <rtthread.h> #include <lvgl.h> #include <drv_lcd.h> #define DBG_TAG "LVGL" #define DBG_LVL DBG_INFO...
/* lbase64.c - routines for dealing with base64 strings */ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * * Copyright 1998-2022 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permi...
// SPDX-License-Identifier: GPL-2.0-or-later /* NetWinder Floating Point Emulator (c) Rebel.COM, 1998,1999 Direct questions, comments to <NAME> <<EMAIL>> */ #include "fpa11.h" #include "softfloat.h" #include "fpopcode.h" union float64_components { float64 f64; unsigned int i[2]; }; float64 float64_ex...
#include <libavformat/avformat.h> #include <libavutil/opt.h> #include <libavutil/avstring.h> #define SEEK_TYPE_TIME 0 #define SEEK_TYPE_BYTE 1 #define SEEK_TYPE_FRAME 2 #define SEEK_TARGET_FROM 0 #define SEEK_TARGET_UP_TO 1 #define SEEK_TARGET_PRECISE 2 AVInputFormat* ffw_guess_input_format( const char* s...
/** * This is the main entry point into statsite. * We are responsible for parsing any commmand line * flags, reading the configuration, starting * the filter manager, and finally starting the * front ends. */ #include <sys/stat.h> #include <fcntl.h> #include <ctype.h> #include <errno.h> #include <pthread.h> #inc...
#include "pngwrite.h" int sp_png_get_block_stripe (const unsigned char **rows, int row, int num_rows, void *data) { SPPNGBD *bd = (SPPNGBD *) data; int r; for (r = 0; r < num_rows; r++) { rows[r] = bd->px + (row + r) * bd->rowstride; } return num_rows; } int sp_png_write_rgb_striped (cons...
/****************************************************************************** * Copyright (c) 2019 - 2021 Xilinx, Inc. All rights reserved. * SPDX-License-Identifier: MIT ******************************************************************************/ /****************************************************************...
/* Target-dependent code for OpenBSD/mips64. Copyright (C) 2004-2015 Free Software Foundation, Inc. This file is part of GDB. 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 v...
/* Copyright Statement: * * (C) 2005-2016 MediaTek Inc. All rights reserved. * * 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. ("MediaTek") and/or its ...
/* Configuration file for ARM GNU/Linux EABI targets. Copyright (C) 2004-2019 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the...
/*! * Copyright 2021 XGBoost contributors * * \brief A simple example of using prediction functions. */ #include <stddef.h> #include <stdlib.h> #include <string.h> #include <xgboost/c_api.h> #define safe_xgboost(err) \ if ((err) != 0) { ...
/* vim: set backspace=2 ts=4 softtabstop=4 sw=4 cinoptions=>4 expandtab autoindent smartindent: */ /* xkb-callbacks.c * Copyright (C) 2008 <NAME> <<EMAIL>> * * Parts of this program comes from the XfKC tool: * Copyright (C) 2006 <NAME> <<EMAIL>> * * A part of this file comes from the gnome keyboard capplet (contr...
/* * STK1160 driver * * Copyright (C) 2012 <NAME> * <elezegarcia--a.t--gmail.com> * * Based on Easycap driver by <NAME> * Copyright (C) 2010 <NAME> * <rmthomas--a.t--sciolus.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as...
/* * Copyright (c) 2002-2008 <NAME>, <NAME> * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copie...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define LINE_BUFFER_LENGTH 512 #define COMMAND_BUFFER_LENGTH 2048 #ifdef _WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0500 #include <windows.h> const char* COMMON_FILE_PATH = "./launcher/Windows/pyth...
/* * 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 use...
/* $NetBSD: mcclock_jensenio.c,v 1.1.2.1 2000/07/12 20:59:15 thorpej Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME>. * * Redistribution and use in source and binary forms, with or withou...
/********************************************************************** Copyright(c) 2011-2016 Intel Corporation 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 co...
#include <stdlib.h> #include <stdio.h> #include "ai.h" #include "game.h" #include "queue.h" direction_t bfs(game_t *game, int **sec, int startx, int starty, int endx, int endy, int *dist, direction_t *initDir) { if(startx == endx && starty == endy) { (*dist) = 0; return EAST; } int dx[4] = ...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> // veure la implementació de les "union" i // l'ús de big- i little-endian a ieee754.h #include <ieee754.h> static int verbose; // https://en.wikipedia.org/wiki/Fixed-point_arithmetic // // void printb(int bits, int num, char * const post...
/* * SMJPEG file parser * copyright (c) 2002 <NAME> * based on text by Arpi (SMJPEG-format.txt) and later on * http://www.lokigames.com/development/download/smjpeg/SMJPEG.txt * * This file is part of MPlayer. * * MPlayer is free software; you can redistribute it and/or modify * it under the terms of the GNU Ge...
/** * \author <NAME> * \date 2020 * * Détermine les composantes fortement connexes des graphes et exportation en .dot pour visualisation * */ #include <stdio.h> #include <stdlib.h> #include "importGraph.h" #include "inverseGraph.h" void dfsPostOrdre(Graphe* graph, int s, int* nonMarque, int* postOrdre, int* nu...
/* * Copyright (c) 2016 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 ...
/* * libid3tag - ID3 tag manipulation library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or *...
/* The binomial coefficients nCk can be arranged in triangular form, Pascal's * triangle, like this: * It can be seen that the first eight rows of Pascal's triangle contain twelve * distinct numbers: 1, 2, 3, 4, 5, 6, 7, 10, 15, 20, 21 and 35. * A positive integer n is called squarefree if no square of a prime di...
#ifdef _MSC_VER #undef fseeko #undef ftello #define fseeko _fseeki64 #define ftello _ftelli64 #else // To shut up the "implicit declaration of fseeko" warning. #define _POSIX_C_SOURCE 200112L #endif #include <errno.h> #include <inttypes.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> ...
/* MIT License Copyright (c) <NAME> 2020 Boat Data Hub 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, pu...
/*- * Copyright (c) 1998 <NAME> * 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 a...
/* * Copyright (c) 2020 Intel Corporation * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <sys/printk.h> #include <drivers/peci.h> #include <soc.h> #define TASK_STACK_SIZE 1024 #define PRIORITY 7 /* PECI Host address */ #define PECI_HOST_ADDR 0x30u /* PECI ...
/************************************************************************** * * Copyright (C) 2005 <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 Software without restriction, incl...
/* * Copyright (c) 2016 Open-RnD Sp. z o.o. * Copyright (c) 2017 RnDity Sp. z o.o. * * SPDX-License-Identifier: Apache-2.0 */ #include <watchdog.h> #include <soc.h> #include <errno.h> #include <assert.h> #include "iwdg_stm32.h" /* Minimal timeout in microseconds. */ #define IWDG_TIMEOUT_MIN 100 /* Maximal timeo...
/* * @author <NAME> <<EMAIL>> * @date 08.03.2015 * * A C driver for the sensor MCP9808. * */ #ifndef __MCP9808__ #define __MCP9808__ #include <stdint.h> #include "mcp9808.h" #include <string.h> #include <stdbool.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <stdio....
/* * iff.c * Yazmin * * Created by <NAME> on 30/11/07. * Copyright 2007 <NAME>. All rights reserved. * */ #include "iff.h" #include <memory.h> #include <stdlib.h> unsigned int IFFID(char c1, char c2, char c3, char c4) { return (c1 << 24) | (c2 << 16) | (c3 << 8) | c4; } unsigned int unpackLong(const voi...
/* * Copyright (c) 2021 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCL...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* xml_spheres.c :+: :+: :+: ...
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> #include <assert.h> #include <event.h> #include "domain_socket.h" #ifdef DEBUG #define _DEBUG(...) fprintf(stdout, __VA_ARGS__) #else #define _DEBUG(...) d...
/* $NetBSD: ip_id.c,v 1.12 2008/02/06 03:20:51 matt Exp $ */ /* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */ /* * Copyright 1998 <NAME> <<EMAIL>> * All rights reserved. * * <NAME> <<EMAIL>> came up with the idea of using * such a mathematical system to generate more random (yet non-repeating) * i...
/* BFD back-end for Motorola 88000 COFF "Binary Compatability Standard" files. Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Written by <NAME>. This file is part of BFD, the Binary File Descriptor library. This program is free software; you can redistribute it and/or modify it under the ...
/* MIT License * * Copyright (c) 2016-2020 INRIA, CMU and Microsoft Corporation * * 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 r...
/* * File: driver1.c * YOUR NAME ... YOU NEED TO IMPLEMENT THE main() + additional functions if needed * * .... */ #include <stdio.h> #include <stdlib.h> #include "mylinkedlist.h" /* * First one (say driver1.c) gets three command-line arguments: x y z. * It then asks user to enter x many integer...
/* Copyright (c) <NAME>, 2017. */ /* All rights reserved. */ /*********************** self documentation **********************/ /************************************************************************* SDCT - sliding discrete cosine transform (Type II) SDCT_init initialise a SDCT transformer handle...
// netacl // // Copyright (c) 2015, Los Alamos National Security, LLC // All rights reserved. // // Copyright (2015). Los Alamos National Security, LLC. This software was // produced under U.S. Government contract DE-AC52-06NA25396 for Los Alamos // National Laboratory (LANL), which is operated by Los Alamos National /...
/* * Copyright 2015-2018 Yubico AB * * 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 i...
#define HID_INTERNAL #include "hid.h" #include "hid_helpers.h" #include "debug.h" #include <assert.h> hid_return hid_write_identification(FILE* const out, HIDInterface const* const hidif) { if (!hid_is_opened(hidif)) { ERROR("cannot write identification of unopened HIDinterface."); return HID_RET_DEVIC...
/* * This file is part of the coreboot project. * * Copyright (C) 2011 The ChromiumOS Authors. All rights reserved. * Copyright (C) 2014 <NAME> * * 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 Fou...
/* A simple divert socket daemon to automaticaly block connections. You redirect a bounch of unused (by you) ports to the daemon listening on a divert socket and watch the magic happens. --pf.conf-- block in log quick from <bastards> # Or, if you want to be evil: #block in log quick from <bastards> probabili...
/********************************************************************** Copyright(c) 2011-2017 Intel Corporation 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 co...
// SPDX-License-Identifier: BSD-2-Clause /* Copyright 2016 <NAME> 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 ...
/* SPDX-License-Identifier: BSD-3-Clause */ /* * Copyright (c) 2019, NEC Laboratories Europe GmbH, NEC Corporation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * ...
/*Sidewinder game pad notes : - Write to 0x201 starts packet transfer (5*N or 15*N bits) - Currently alternates between Mode A and Mode B (is there any way of actually controlling which is used?) - Windows 9x drivers require Mode B when more than 1 pad connected ...
/* * Copyright (c) 2015 <NAME> * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT */ #pragma once #define UART0_BASE 0x40081000 #define UART1_BASE 0x40082000 #define UART2_BASE 0x400C1000 #define UART3_BASE 0x400...
/* * Copyright © 2015 Intel Corporation * * 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, pub...
//------------------------------------------------------------------------------ // GB_mex_rdiv2: compute C=A*B with the rdiv2 operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, <NAME>, (c) 2017-2018, All Rights Reserved. // http://suitesparse.com See ...
/** * TCP segment * to store the TCP segment */ #include "tcp_segment.h" #include "stdio.h" #include "stdlib.h" #include "string.h" /** * Create a new TCP segment * @param seq Sequence number * @param next_seq Next segment sequence number * @param len len of segment * @param data data of segment * @re...
/****************************************************************************** * wol : Wake On Lan * * ******************************************************************************/ #pragma comment(lib,"wsock32.lib") #include <stdio.h> #include <stdlib.h> #include <winsock.h> #define MACLEN 6 #define MPSIZE (6+16*M...
/* XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) Miscellaneous support functions Programmed and designed by Matti 'ccr' Hamalainen <<EMAIL>> (C) Copyright 1999-2007 Tecnic Software productions (TNSP) This program is free software; you can redistribute it and/or modify it under the ...
/* Copyright © <NAME>, 2020-2021, All rights reserved */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <stdint.h> #include <libconfig.h> #include <mysql.h> #include <libgen.h> #define CONFIG_FILE "/usr/local/etc/zappi.cfg" #define COLUMNS 2 char *comma = " "; void exit_on...
/* Copyright (c) 1985-2012, B-Core (UK) Ltd 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 foll...
/* * $Id: tuidemo.c,v 1.22 2008/07/14 12:35:23 wmcbrine Exp $ * * Author : <NAME> <<EMAIL>> * Date : 25-02-93 * * Purpose: This program demonstrates the use of the 'curses' library * for the creation of (simple) menu-operated programs. * In the PDCurses version, use is made of colors...
//* Aula 3 da 6 semana, insercao simples // mesmo projeto das priemrias aulas #include "lista.h" #include <stdio.h> #include <stdlib.h> void cria(lista *l) { l->tamanho = 0; l->elementos = malloc(sizeof(elem)*TAM); l->copia = malloc(sizeof(elem)*TAM); return; } void destroi(lista *l) { free(l->e...
// Reference: Beej's Guide to Network Programming #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <error.h> #define DEBUG 1 #define dbgprintf(...
/****************************************************************************** Copyright (c) 2012 Lantiq Deutschland GmbH For licensing information, see the file 'LICENSE' in the root folder of this software module. *************************************...
#include <stdlib.h> #include <SDL.h> #include <SDL_ttf.h> #include "merge.h" #include "gfx.h" /* Side length of a 'pixel' in pixels */ #define TTF_FONT_PATH "res/Anonymous Pro.ttf" #define TTF_FONT_PT 32 #define iterate(n, expression)\ do {\ int i;\ for (i = 0; i < n; ++i) { expression; }\ } w...
#include <stdlib.h> #include <stdio.h> #include <ctype.h> typedef struct { int coeff, power; } term; typedef struct { char *data; term val; } lexer; typedef struct node{ int next; term val; } node; typedef struct{ node *allocator; int count, headindex; } linked_list; void get_next(lexer...
/* * Purpose: Test binding strings and ints, attempt 2nd query with results pending. * Functions: dbbind dbcmd dbnextrow dbopen dbresults dbsqlexec */ #include "common.h" static void create_tables(DBPROCESS * dbproc, int rows_to_add) { int i; fprintf(stdout, "creating table\n"); sql_cmd(dbproc); dbsqlexec(...
// SPDX-License-Identifier: GPL-2.0-only /* * Helpers for matrix keyboard bindings * * Copyright (C) 2012 Google, Inc * * Author: * <NAME> <<EMAIL>> */ #include <linux/device.h> #include <linux/export.h> #include <linux/gfp.h> #include <linux/input.h> #include <linux/input/matrix_keypad.h> #include <linux/kerne...
/* * (C) 2010, 2012 <NAME> * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the...
// // main.c // OS X build checker // // Created by <NAME> on 15/08/2015. // Copyright (c) 2015 noOrg. All rights reserved. // <EMAIL> // #include <stdio.h> #include <string.h> #define kTableRows 51 // number of Apple OS X public known builds so far... #define kTableCols 2 // it's a 2 column simple table ...
# include <stdio.h> # include <stdlib.h> # include <xtables.h> # include <c_iraf.h> # include "splice.h" typedef struct { IRAFPointer tp; /* pointer to table descriptor */ IRAFPointer cp; /* column descriptor */ int nrows; /* number of rows in table */ int nelem; /* number of elements in array */ int npix; ...
#include <stdint.h> #include "gdt.h" #include "idt.h" #include "pic.h" #include "pit.h" #include "stdio.h" #include "memory.h" #include "memmap.h" #include "paging.h" #include "task.h" #include "keyboard.h" #include "disk.h" #include "floppy.h" #include "x86.h" #include "vga.h" #include "serial.h" #include "comstdio.h"...
/* $OpenBSD: if_urtwn.c,v 1.16 2011/02/10 17:26:40 jakemsr Exp $ */ /*- * Copyright (c) 2010 <NAME> <<EMAIL>> * Copyright (c) 2014 <NAME> <<EMAIL>> * Copyright (c) 2015-2016 <NAME> <<EMAIL>> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted,...
/****************************************************************************** * device/hub.h * by <NAME> * * A light weight implementation of the USB protocol stack fit for a simple * driver. * * device/hub.h contains definitions relating to the USB hub device. *******************************************************...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #ifndef IESSE_OS #define IESSE_OS #endif #ifdef IESSE_OS //#error "Unable to load IesseOS at the moment... joining emergency mode..." #undef IESSE_OS #define IESSE_OS #endif /*bool checkType(const char *str) { for (char const &c : str)...
/* * bytes_htons, bytes_htonl, gettimeofday_wrap from scamper * http://www.caida.org/tools/measurement/scamper/ * and re-released under a BSD license with permission from the author. * * timeval_subtract code from * http://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html * * All other code Copyr...
/*$ Copyright (c) 2014-2017, Azel 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 follow...
/* * Copyright 2010 by Spectrum Digital Incorporated. * All rights reserved. Property of Spectrum Digital Incorporated. */ /* * Definitions & Register * */ /* ------------------------------------------------------------------------ * * ...
#include "can_api.h" uint8_t CAN_init (uint8_t mode) { // Software reset; necessary for all CAN // stuff. CANGCON = _BV(SWRES); // CAN prescaler timing prescaler set to 0 CANTCON = 0x00; // Set Error passive state CANGSTA |= _BV(ERRP); // Set BAUD rate /* 500 kbps CANBT1 = 0x...
#include <math.h> //pist_lit.cpp #include <stdlib.h> #include <GLUT/glut.h> static GLfloat xRot = 0.0; static GLfloat yRot = 0.0; char thetachar[3]; float theta = 0.0, degtorads = 0.0174532925; void DisplayPiston ( void ); void MyInit ( ) ; void Bang(); void Int2Char(int ); void Bang( void) { glColor3f(1.0, 0.0,...
/* * This file is part of the coreboot project. * * Copyright (C) 2011 Advanced Micro Devices, Inc. * Copyright (C) 2014 Sage Electronic Engineering, LLC. * * 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 So...
#include <string.h> #include <stdlib.h> #include "unittest.h" void _test_init(Test_ctx *ctx, Test_opts *opts, const char *str) { ctx->opts = opts; ctx->name = str; ctx->file = __FILENAME__; ctx->group = NULL; ctx->desc = NULL; ctx->ran = 0; ctx->failed = 0; } void _test_set_group(Test_ctx...
/* BSD License Copyright (c) 2005, <NAME> 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 followin...
/* print.c Turn data structures into printable text. */ /* * Copyright (c) 1995, 1996 The Internet Software Consortium. * 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. Redist...
/* * Copyright (c) 2010-2012 Digi International Inc., * All rights not expressly granted are reserved. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. * * Digi...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "DISP.h" void Matricular(){ const char s[2] = ","; char *token; char linha[100],linha2[100],*sub; int semestre = 0,creditos=0,valido=0; //carregar o arquivo FILE *fo; fo = fopen("matricula.txt","r"); if(fo == NULL){ fo = fopen("matricula.txt"...
/* Copyright (c) 2012, 2021, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain software (including...
/* hashtable.c * Created on: Jun 12, 2018 * Author: Harsh */ /* Hash tables (fixed size) * 15-122 Principles of Imperative Computation, Fall 2010 * <NAME> */ #include <stdbool.h> #include <stdlib.h> #include <stddef.h> #include "xalloc.h" #include "contracts.h" #include "hashtable.h" /* Interface...
#include <./mon/monnetwork.h> #include <./mon/monitor.h> #include <./mon/montftp.h> #include <./mon/monbootp.h> #include <stdio.h> int mon_tftp_block; /* tftp block count */ int mon_tftp_bytes; /* tftp byte count */ int mon_tftp_retx; /* TFTP ACK retx count */ short mon_tftp_server_port; IPaddr mon_tftp...
/* * Copyright (c) 2018 IOTA Stiftung * https://github.com/iotaledger/entangled * * MAM is based on an original implementation & specification by apmi.bsu.by * [ITSec Lab] * * Refer to the LICENSE file for licensing information */ #include <memory.h> #include <stdio.h> #include <string.h> #include <unity/unit...
#include <stdarg.h> #include <stdio.h> #include <math.h> #include "lindef.h" #include "hpgl.h" double CurrentLinePatLen; LineType CurrentLineType; signed int CurrentLinePattern; LINESTYLE lt; void set_line_style(SCHAR index, ...){ SCHAR count; double factor,percentage; va_list ap; SCHAR val; ...
#include "utils.h" /* * given log(a) and log(b), return log(a + b) * */ double log_sum(double log_a, double log_b) { double v; if (log_a < log_b) { v = log_b+log(1 + exp(log_a-log_b)); } else { v = log_a+log(1 + exp(log_b-log_a)); } return(v); } /** * Proc to calculate the value o...
#include <stdio.h> #include <poll.h> #include <sys/select.h> #include <alsa/asoundlib.h> #include "alsa.h" #include "usb.h" #include "log.h" #include "dump.h" #define ALSA_BUFSIZE 4096 #define MAX_PFDS 20 static snd_seq_t *snd_handle = NULL; static int seq_port; static snd_midi_event_t *midi_event_parser = NULL; int...
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2016 RDK Management * * 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 ...