text
stringlengths
3.08k
10.5k
/* * Copyright 2015 Red Hat, Inc. * * 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 of the licence, or (at your option) any later version. * * This library is d...
#include "gc.h" int swcmp(const void *a1, const void *a2) { C1 *p1, *p2; p1 = (C1*)a1; p2 = (C1*)a2; if(p1->val < p2->val) return -1; return p1->val > p2->val; } void doswit(Node *n) { Case *c; C1 *q, *iq, *iqh, *iql; long def, nc, i, j, isv, nh; Prog *hsb; Node *vr[2]; int dup; def = 0; nc = 0; isv...
// --------------------------------------------------------------------------- // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // --------------------------------------------------------------------------- /** * @file * @brief * This file contains the definitions that dynamically test CDI funct...
/*************************************************************************** * PHAST: PHylogenetic Analysis with Space/Time models * Copyright (c) 2002-2005 University of California, 2006-2010 Cornell * University. All rights reserved. * * This source code is distributed under a BSD-style license. See the * fi...
/* chacha-ref.c version 20080118 <NAME> Public domain. Modified by plutoo. */ #include <string.h> #include "types.h" #include "result.h" #include "services/fatal.h" #include "kernel/mutex.h" #include "kernel/svc.h" #include "kernel/random.h" #define ROTL32(x, n) (((x) << (n)) | ((x) >> (32-(n)))) #define U3...
/* datagen.c - compressible data generator test tool Copyright (C) <NAME> 2012-2016 GPL v2 License 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 Lic...
const uint16_t music_note_periods[] = { 3822, 3608, 3405, 3214, 3034, 2863, 2703, 2551, 2408, 2273, 2145, 2025, }; volatile uint8_t music_playing = 0; int16_t music_detune = 0; uint16_t music_offs_a = 0*4*16; uint16_t music_offs_c = 0*4*16; uint16_t music_offs_d = 0*4*16; uint8_t music_time_wait = 0; uint8_t music_v...
/*- * Copyright (c) 1999,2000 * <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 ...
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2015 MediaTek Inc. * Author: <NAME> <<EMAIL>> */ #include <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> #include <drm/drm_fourcc.h> #include <drm/drm_plane_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include "mtk_drm_crtc.h" #include "m...
#include "title.h" #include "font.h" #include "game.h" #include "input.h" #include "states.h" #include "video.h" #include "objects.h" int titleTime; int textIndex; int textTimer; size_t textStep[TEXT_LINES]; int showIntro = 1; int fadeOut; int fadeOutTimer; int titleTextFadeOut; int titleTextFadeOutTimer; object miss...
/* * Filename: fisher.c * * Copyright (c) 2010, <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, or * (at your opti...
/*- * Copyright (c) 1991 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 conditions * are met: * 1. Redistributions of source code must retain the above copyright ...
/* * Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana * University Research and Technology * Corporation. All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Resea...
/* epochal - parses timestamps in the input data via strptime(3), and * emits that data in epoch form (or with format as formatted by * strftime(3)) to standard out */ #include <sys/types.h> #include <err.h> #include <getopt.h> #include <locale.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include...
/* * Copyright 2018-19 Board of Trustees of Stanford University * * 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, ...
/* * Copyright © 2018, VideoLAN and dav1d authors * Copyright © 2018, <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 cop...
#include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <arpa/inet.h> static void die(char const* fmt, ...)__attribute__ ((__noreturn__)); static void die(char const* fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); exit(EXIT_FAILURE); } static void help(void)_...
/*------------------------------------------------------------------------ * Copyright 2007-2009 (c) <NAME> <<EMAIL>> * * This file is part of the ZBar Bar Code Reader. * * The ZBar Bar Code Reader is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser Public License as...
#include <system.h> #include <idt.h> #include <string.h> #include <pic.h> #include <isr.h> idt_entry_t idt_entries[NUM_IDT_ENTRIES]; idt_ptr_t idt_ptr; void idt_init() { memset(idt_entries, 0, sizeof(idt_entries)); idt_ptr.base = (uint32_t)idt_entries; idt_ptr.limit = sizeof(idt_entries) - 1; pic_init...
/* * SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: MIT * * 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 wi...
/* * Copyright (c) 2007,2017 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * co...
/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <...
#include "format-pcd.h" #include "emb-file.h" #include "emb-logging.h" #include "helpers-binary.h" #include "helpers-misc.h" static double pcdDecode(unsigned char a1, unsigned char a2, unsigned char a3) { int res = a1 + (a2 << 8) + (a3 << 16); if(res > 0x7FFFFF) { return (-((~(res) & 0x7FFFFF) - 1)...
/* * This file is part of the coreboot project. * * Copyright (C) 2011 <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; version 2 of the License. * * This program is d...
/* $OpenBSD: if_lc_isa.c,v 1.8 2009/08/10 22:08:04 deraadt Exp $ */ /* $NetBSD: if_lc_isa.c,v 1.10 2001/06/13 10:46:03 wiz Exp $ */ /*- * Copyright (c) 1994, 1995, 1997 <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted prov...
/* * Copyright (c) 2018 <NAME> * https://github.com/iotaledger/entangled * * Refer to the LICENSE file for licensing information */ #include <stdio.h> #include <string.h> #include "common/defs.h" #include "common/kerl/bigint.h" #include "common/kerl/converter.h" #define INT_LEN 12 #define BYTE_LEN 48 #define BY...
/* sample-pci-device.c - sample code for a Simics PCI device Copyright 2001-2007 Virtutech AB The contents herein are Source Code which are a subset of Licensed Software pursuant to the terms of the Virtutech Simics Software License Agreement (the "Agreement"), and are being distributed under the Agreem...
#include <errno.h> #include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "interpreter.h" #include "stack.h" const char CRANEFLAK_VERSION[] = "1.0.0"; void print_help_string(char* prog) { fprintf(stderr, "Usage: %s [switches] [--] [programfile] [arguments]\n" ...
/* * Copyright (c) 2006-2018, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2018-05-08 zhuangwei the first version */ #include <rtthread.h> #include <rtdevice.h> #include <rthw.h> #include "drv_uart.h" #include "ls1c_pin.h" #incl...
/* GNU/Linux/PowerPC64 specific low level interface, for the remote server for GDB. Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2005 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 Gen...
#include <stdint.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <Engine/Config.h> #include <System/Log.h> #include <System/Memory.h> #include <System/AtomicLock.h> #include <Render/Render.h> #define MMOD L"MemoryManager" #define MAGIC 0x53544954 // TITS, in little endian format #define DEFA...
#include "helpers.h" // https://stackoverflow.com/questions/12698836/counting-words-in-a-string-c-programming int lineWords(const char sentence[ ]) { // #words of a line (idDoc) int counted = 0; // result const char* it = sentence; int inword = 0; do switch(*it) { case '\0': case ' ':...
#include <stdarg.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> //#include <curl/curl.h> #include "common.h" struct memstruct{ char *memory; size_t size; }; /* libcurl in C is much different than in PHP, and doesn't by default output the response. So, we ...
#include <mysql.h> #include <mex.h> #include <math.h> char *hostname, *command, *password, *database, *username; int port; mxArray *cell_array_ptr; #define CMOindex(r, c, rows) ( r + c * num_rows ) typedef enum { HOSTNAME, PORT, USERNAME, PASSWORD, COMMAND, DATABASE } connection_details; //#...
/* * XFree86 driver for the Voodoo 2 using native X support and no * Glide2. This is done for two reasons, firstly Glide2 is not portable * to other than x86_32 which is becoming an issue, and secondly to get * accelerations that Glide does not expose. The Voodoo 2 hardware has * bit blit (screen->screen, cpu->...
// Copyright 2013, <NAME>. // Copyright 2013, <NAME>. // SPDX-License-Identifier: BSL-1.0 /* * OpenHMD - Free and Open Source API and drivers for immersive technology. */ /* Deepoon Driver - Packet Decoding and Utilities */ #include <stdio.h> #include "deepoon.h" #define SKIP_CMD (buffer++) #define READ8 *(buffer...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <cmain.h> #include <string.h> #include <vfs.h> #include <vdevice.h> #include <sys/mmio.h> #define KCNTL 0x00 #define KSTAT 0x04 #define KDATA 0x08 #define KCLK 0x0C #define KISTA 0x10 #define KEYBOARD_BASE (_mmio_base+0x6000) static uint32_t _mmio_...
#include "dma.h" #include "SPI_EEProm.h" #include "Maze.h" #include "main.h" #include "configure.h" #include "Logging.h" #include "Reflectance.h" #include "Timer32.h" typedef struct { uint8_t command[4]; uint16_t data[128]; } spi_buffer_t; // Available spi_buffer_t spi_buffer[2]; static uint16_t *buffer_ptr; stati...
/** * @brief AHCI Block Device Driver * @file modules/ahci.c * * @warning This is a stub driver. * * @copyright * This file is part of ToaruOS and is released under the terms * of the NCSA / University of Illinois License - see LICENSE.md * Copyright (C) 2021 <NAME> */ #include <kernel/syscall.h> #include <ke...
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ *...
/* * fSDictate.c */ #include "Include.h" /* protos */ static void SaveData(void); static void SentenceUpdate(void); static void Validate(void); /* globals */ static UInt16 sentenceCnt; /* * fSDictateInit */ Boolean fSDictateInit(void) { DmOpenRef db=dbAnswer.db; Char buffer[GroupNameLength+1]; sentenceCnt=XR...
#include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include <Windows.h> #define STEP_ROT_X 0.157079633 #define STEP_ROT_Y 0.078539816 #define STEP_THETA 0.130899694 #define STEP_ALPHA 0.065449847 #elif de...
/** * @file Intersection_mask.c * @author <NAME> * @version 1.0 * * @section LICENSE * * 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 op...
#pragma once #include <string.h> #include <iostream> #include <istream> #include <fstream> #include <limits.h> #include <iomanip> #include <float.h> #include <algorithm> #ifdef flagMSC #include <windows.h> #endif #undef NO_DATA #define PRIM_TEST_MODULE //#define SLOW_CONSISTENCY_CHECK // Very hackish duplicate ...
#include <stdio.h> #include <math.h> double f(double x, double v){ return v; } double g(double x, double v, double alpha){ return alpha*(1. - pow(x, 2))*v - x; } double F(double x, double xn, double v, double vn, double delT){ return xn - x - (delT/2.)*(f(x, v) + f(xn, vn)); } double G(double x, d...
/* * Copyright (c) 2020, Cascoda 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 con...
#include <assert.h> #include <errno.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> enum Verbosity { Quiet, Verbose, Debug }; enum FileMode { Read, Write }; struct pet_opts_t { char * input_fn; /* input filename */ char * output_fn; /* output ...
/************************************************************************ * NASA Docket No. GSC-18,719-1, and identified as “core Flight System: Bootes” * * Copyright (c) 2020 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. * All Rights Reserved....
/* udp-helper.c * * This utility is useful for putting together quick, blocking UDP send and receive processes on Linux. * * Basic uses: * * UDPHelper comms; * udp_helper(comms, listen_post, target_pot, respond_to_sender, ip_address); // Construct a UDPHelper and open the socket. * udp_receive(comms); // Block ...
/* * Copyright (c) 2016-2017, Wind River Systems, Inc. * * 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 t...
/* $OpenBSD: cache.c,v 1.2 2001/08/20 20:23:53 jason Exp $ */ /* $NetBSD: cache.c,v 1.5 2000/12/06 01:47:50 mrg Exp $ */ /* * Copyright (c) 1996 * The President and Fellows of Harvard College. All rights reserved. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * *...
#ifndef _CRT_SECURE_NO_WARNINGS // Fixes Compile Errors for Visual Studio 2005 or newer #define _CRT_SECURE_NO_WARNINGS #endif #include <stdlib.h> // this isn't meant to compile standalone; link with test_c_compilation.c as well #include "stb_rect_pack.h" #define STB_TRUETYPE_IMPLEMENTATION #include "stb_truetype.h...
/* This contains all of the linear algebraic functions used in the ray tracer. */ /*Returns a float that is the vector dot product of two vectors, v1 and v2*/ float dotProduct(vector *v1, vector *v2){ return v1->x * v2->x + v1->y * v2->y + v1->z * v2->z; } /*Returns the determinant of a 2x2 matrix given by four ...
// SPDX-License-Identifier: GPL-2.0-only // Copyright Axis Communications AB #include <linux/err.h> #include <linux/i2c.h> #include <linux/module.h> #include <linux/of_device.h> #include <linux/regmap.h> #include <linux/regulator/of_regulator.h> #include <linux/regulator/machine.h> #include <linux/regulator/driver.h> ...
/* * Copyright (c) 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: * * 1. Redistributions of source code must retain the above copyright notice, * this list of cond...
/*--------------------------------------------------------------------------------------------- * Copyright (c) <NAME>. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *----------------------------------------------------------------------------------...
/* * Copyright (C) 2009-2021 <NAME> * * 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 copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI...
/* * 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. Redistrib...
/******************************************************************** * Copyright (c) 2014, <NAME> <<EMAIL>> * * * * Permission to use, copy, modify, and/or distribute this software * * for any purpose with or without fee is hereby granted, provide...
/* * Copyright 2016-2017 <NAME> * * 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 ...
/* (c) Copyright 2012-2013 DirectFB integrated media GmbH (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) (c) Copyright 2000-2004 Convergence (integrated media) GmbH All rights reserved. Written by <NAME> <<EMAIL>>, <NAME> <<EMAIL>>, <...
#include "characterlcd.h" u8 _initialized = 0; u8 _rawID = 0; u8 _rawType = 0; u8 _rawData = 0; u8 _lineData[4][20]; u8 _lineUpdate[4]; u8 _customCharData[8][8]; u8 _customCharUpdate[8]; void Delay(u16 delay) { while (delay--); } void CharacterLCD_Init() { // LCD pins CLCD_LCDRS_DDR = 1; CLCD_LCDE_DDR = 1...
#include <infiniband/verbs.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include "test.h" static int client_simple_write(struct rdma_conn *conn); int client() { struct rdma_conn conn; memset(&conn, 0, sizeof(struct rdma_conn)); conn.port = config.cl...
#include "kiss_fftr.h" #include "_kiss_fft_guts.h" #include <sys/times.h> #include <time.h> #include <unistd.h> static double cputime(void) { struct tms t; times(&t); return (double) (t.tms_utime + t.tms_stime) / sysconf(_SC_CLK_TCK); } static kiss_fft_scalar rand_scalar(void) { #ifdef USE_SIMD return...
// is BMS gaunami duomenys unsigned int cell[19]; //celes 1-16, minV, maxV, deltaV float battery_voltage, battery_current, speed; unsigned long uptime, time_left, soc; unsigned int distance_left; int temp_onboard, temp_ext_1, temp_ext_2, motor_temp, battery_status, motor_temp_max; boolean bms_link_active; byte speed_mo...
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*============================================================ ** ** Source: test3.c ** ** Purpose: Tests for CreateEvent. Create an unnamed event, create **...
#include <ir/ir.h> #include <target/util.h> static const char* REG_NAMES_VIM[] = { "s:a", "s:b", "s:c", "s:d", "s:bp", "s:sp", "s:pc" }; static void init_state_vim(Data* data) { reg_names = REG_NAMES_VIM; for (int i = 0; i < 7; i++) { emit_line("let %s = 0", reg_names[i]); } emit_line("let s:mem = repea...
/* * Copyright 2014 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" ...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> #include <math.h> #include <float.h> #include "worker.h" /* * Read an image from a file and create a corresponding * image struct */ Image* read_image(char *filename) {...
/* * arcus-c-client : Arcus C client * Copyright 2010-2014 NAVER Corp. * * 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 requ...
// Draw a 512x512 chessboard // By <NAME> (z5232949) // By ... (z0000000) // Written on 2018-08-?? // Tutor (dayHH-lab) // Remember to pipe the output of this program into a file // $ ./chessboard > chessboard.bmp // $ eog chessboard.bmp & #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> ...
#include "akUtils.h" #include "akAppKit.h" #include "EGL/egl.h" #include "GLES/gl.h" #include <math.h> #define WIN_W 400 #define WIN_H 400 // vertex data for triangle static const GLbyte verts [] = { 0, 8, 0, 7, -4, 0, -7, -4, 0, }; // Structure for program context info typedef struct ProgramInfo_Re...
#include <assert.h> #include <stdlib.h> #include <string.h> #include "vcdiff.h" #include "vcdiff_window.h" #include "vcdiff_cache.h" #include "vcdiff_io.h" vcdiff_window * vcdiff_new_window( size_t data_section_size, size_t instr_section_size, size_t addr_section_size) { vcdiff_window *win = (vcdiff_...
#define _POSIX_C_SOURCE 200809L #include "bml.h" #include "../macros.h" #include "../typed.h" #include <complex.h> #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <math.h> #include <string.h> #include <unistd.h> // print content of file in stdout void T...
/* BSD 2-Clause License */ /* Copyright (c) 2020, <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...
#include <stdio.h> #include "lift.h" #include "lift_io.h" #define HEIGHT 2+NUM_FLOOR*4+1 #define WIDTH 5+NUM_LIFT*8 static char door[4][4][6] = { { /* OPEN = 0 */ "*****", "* *", "* *", "*****" }, { /* CLOSED = 1 */ "*****", "* | *", "* | *", "*****" }, { /* OPENING = 2 */ "*****", "*<...
/* No copyright is claimed in the United States under Title 17, U.S. Code. All Other 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 limitat...
/* * 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...
/**************************************************************************//** * @file main.c * @version V3.00 * @brief Use PDMA channel 2 to transfer data from memory to memory. * * SPDX-License-Identifier: Apache-2.0 * @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved. *****************...
/* * Copyright (c) 2009, NSF Cloud and Autonomic Computing Center, Rutgers 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: * * - Redistributions of source code must retain the above cop...
// Copyright 2019 <EMAIL> // Licensed under the MIT license (http://opensource.org/licenses/MIT) #include "stats.h" #include "core/settings.h" #include <libevdev/libevdev.h> #include <stdio.h> #include "event_mapper.h" #include "debug.h" #include "stats_parser.h" #define STATS_UPDATE_COUNT 1000 struct device_sta...
#include "base64codec.h" static const char base64_enc_map[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const char base64_dec_map[]={ // 0 1 2 3 4 5 6 7 8 9 A B C D E F -1 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1 ,-1 , -1 ,127,127,127,127,127,-1 ,-1 , //...
/* This is a demo c programm to create a queue and moderate it. List Platform: - GCC Version: (Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin16.7.0) - Online Complier (https://www.onlinegdb.com/online_c_compiler) Author: Tim */ #include <stdio.h> #include <stdlib.h> typedef struct node {...
/** * Copyright 2013, GitHub, Inc * Copyright 2009-2013, <NAME>, <NAME>, * <NAME>, <NAME>, Google Inc. and <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 2 * of...
/******************************************************************************* INVERT.C Author: <NAME> Date: 13-APR-90 Copyright (c) 1992-3 MusculoGraphics, Inc. All rights reserved. Portions of this source code are copyrighted by MusculoGraphics, Inc. Description: This file ontains routines...
#include "stdio.h" #include "stdlib.h" #include "stdint.h" #include "svdpi.h" #include "softfloat.h" #include "genCases.h" #define MAX_ERR_COUNT 10 uint32_t recorded_stim_idx[MAX_ERR_COUNT]; uint64_t recorded_op[MAX_ERR_COUNT]; uint32_t recorded_is_odd[MAX_ERR_COUNT]; uint64_t recorded_dut_res[MAX_ERR_COUNT]; uint64...
/* Please put all global constant and functions here */ #include "p3_globals.h" Process processes[P1_MAXPROC]; int numPages = 0; int numFrames = 0; int *pagers_pids; int num_pagers = 0; P1_Semaphore frame_sem; Frame *frames_list; P1_Semaphore pager_sem; P1_Semaphore disk_sem; P1_Semaphore disk_list_sem; int *disk_li...
/* chronyd/chronyc - Programs for keeping computer clocks accurate. ********************************************************************** * Copyright (C) <NAME> 1997-2003 * Copyright (C) <NAME> 2009-2011 * * This program is free software; you can redistribute it and/or modify * it under the terms of versio...
#include <stdio.h> #include <math.h> #include <mkl.h> #include <mkl_lapacke.h> #include "libqpsolver.h" #include "matrix.h" void test_solve_linear_system(void) { printf("solve AX=B:\n"); /* solve Ax = b */ matrix_t A, B, X; matrix_construct(&A, 3, 3, ELEMENTS(3, 5, 2, 2, 1, 3,...
/* checkLayout - help check layout by displaying where contigs * go against glued and finished versions of same sequence. */ #include "common.h" #include "portable.h" #include "linefile.h" #include "dnautil.h" #include "dnaseq.h" #include "fa.h" #include "patSpace.h" #include "fuzzyFind.h" #include "supStitch.h" #incl...
#include <stdio.h> #include <windows.h> #include <stdlib.h> unsigned long long size, filesize, dirsize, filenumber, filedir, dirnumber, minsize; char s[] = "kMGTPE"; char temp[3000]; char *dir; int i, access, level, limit, dironly; float n; const char* format(unsigned long long number) { int i, j; ...
/* * This file is part of udisks-glue. * * © 2010-2011 <NAME> * * Refer to the LICENSE file for licensing information. * */ #include <dbus/dbus-glib.h> #include <assert.h> #include <confuse.h> #include <glib.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include "dbus_constants.h" #include "fi...
/*Name : <NAME> AU1841145 Problem Statement: To implement Client-Server Chat application and Calculator. */ /* Server Side */ #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <ctype.h> #in...
/* * Copyright (c) 2010 <NAME>. All rights reserved. * Copyright (C) 2017 THL A29 Limited, a Tencent company. * 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 sour...
/* * ISC License * * Copyright (C) 1991-2018 by * <NAME> * <NAME> * Delft University of Technology * * 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 c...
#include "../../includes/minishell.h" /** * The function treats heredocs by checking for errors and initializing * appropritae arrays of the cmd struct. Returns 0 on success, 1 otherwise. **/ static int treat_heredoc(t_cmd *cmd, int *index) { char *token; char *err; *index = *index + 1; token = g_mini.tokens-...
/* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1997--2017 The R Core Team * Copyright (C) 1995, 1996 <NAME> and <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 S...
/* * utilities.c * * Created on: Aug 30, 2017 * Author: julian */ #include "SSChelper.h" #include "ov_macros.h" #include "ov_path.h" #include "ov_memstack.h" #include "ov_result.h" #include "ov_logfile.h" #include "fb_namedef.h" #include "ov_call_macros_10.h" static void extractBehindSeperator(const OV_...
#include "defs.h" #ifdef HAVE_LINUX_FUTEX_H # include <linux/futex.h> #endif #ifndef FUTEX_WAIT # define FUTEX_WAIT 0 #endif #ifndef FUTEX_WAKE # define FUTEX_WAKE 1 #endif #ifndef FUTEX_FD # define FUTEX_FD 2 #endif #ifndef FUTEX_REQUEUE # define FUTEX_REQUEUE 3 #endif #ifndef FUTEX_CMP_REQUEUE # define FUTEX_CMP_RE...
/* * Copyright 2016 Google Inc. 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 b...