text
stringlengths
3.08k
10.5k
/* * (C) Copyright 2013 Altera Corporation <www.altera.com> * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <asm/arch/clock_manager.h> #include <asm/arch/system_manager.h> #include <dm.h> #include <dwmmc.h> #include <errno.h> #include <fdtdec.h> #include <linux/libfdt.h> #include <linux/err.h...
#include "hevent.h" #include "hsocket.h" #include "hatomic.h" #include "hlog.h" uint64_t hloop_next_event_id() { static hatomic_t s_id = HATOMIC_VAR_INIT(0); return ++s_id; } uint32_t hio_next_id() { static hatomic_t s_id = HATOMIC_VAR_INIT(0); return ++s_id; } uint32_t hio_id (hio_t* io) { retur...
// OpenDirCache.c ///////////// // includes #include "OpenDirCache.h" #include "DirDataReader.h" #include "SRFSConstants.h" #include "Util.h" #include <string.h> //////////////////// // private defines #define ODC_CACHE_NAME "OpenDirCache" /////////////////////// // private prototypes static Cache *odc_select_...
/* P O L Y _ M U L T I P L Y . C * BRL-CAD * * Copyright (c) 2004-2019 United States Government as represented by * the U.S. Army Research Laboratory. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2...
#include <string.h> #include "io.h" #include "pci.h" #include "log.h" // Maximum functions (devs*functions) per bus, and // maximum number of busses #define MAX_FPB (8*32) #define MAX_BUS 1 static struct { int configspace; uint8 bus,dev,fn,index; } state; static int devs = 0; static pcidev_t *dev[8*32]; stati...
/* ngx_log_redis_module.c * for Redis) */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> #include <ngx_http.h> #include <ngx_buf.h> #include "credis.h" REDIS redis = NULL; typedef struct { ngx_str_t xlog_redis; } ngx_log_redis_loc_conf_t; static ngx_int_t ngx_xlog_redis_filter_init(ngx_co...
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build android // +build android #include <android/log.h> #include <dlfcn.h> #include <errno.h> #include <fcntl.h> #include <stdint.h> #include <string.h> ...
//----- Include Files --------------------------------------------------------- #include <avr/io.h> // include I/O definitions (port names, pin names, etc) #include <avr/interrupt.h> #include "adc.h" #include "tick2.h" #include "i2c.h" #include "robbus.h" #define INDEX_TIMESTAMP 0 #define INDEX_STATUS 1 #d...
#include "util.h" FILE *createOutputFile(const char *filename) { FILE *file = fopen(filename, "w"); if (file) { fputs("time,continuous_real_out,discrete_real_out,int_out,bool_out\n", file); } return file; } double nextInputEventTime(double time) { if (time <= 0.5) { return 0.5;...
/* * Copyright (C) 2008-2012 Free Software Foundation, Inc. * * Author: <NAME>, <NAME> * * This file is part of GnuTLS. * * GnuTLS 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 t...
#include <mach-o/loader.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <string.h> #define DT_KEY_LEN 0x20 struct Boot_Video { unsigned long v_baseAddr; /* Base address of video memory */ unsigned long v_display; /* Display Code (if Applicable */ unsigned long v_rowBytes; /* Number of bytes ...
#include "isout_encode.h" #include "isshe_common.h" #include "isout_connection.h" #include "isshe_aes_cfg128.h" int isout_opts_to_string(uint8_t *buf, isout_conn_opts_s *opts, uint64_t flag) { int i = 0; // 这两个放前面!HMAC生成依赖这两个的随机性 i += isout_opt_append(buf + i, ISOUT_OPT_COUNT, sizeof(opts->count), o...
/* * Copyright (c) 2018 <NAME>, LLC * Copyright (c) 2018 Linaro Ltd. * * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr.h> #include <device.h> #include <drivers/sensor.h> #include <sys/printk.h> #include <drivers/sensor/ccs811.h> #include <stdio.h> static bool app_fw_2; static const char *now_str(void)...
/************************************************************************ * LEGALESE: "Copyright (c) 2015, Dell Inc. All rights reserved." * * This source code is confidential, proprietary, and contains trade * secrets that are the sole property of Dell Inc. * Copy and/or distribution of this source code or disassemb...
#include "x10_receive.h" static uint32_t getUs(void); static void x10_bit_received(int bit); static void x10_init_received(void); static void readBuffer(void); static void sendMessage(uint8_t addr, uint8_t data); extern osMessageQId touchscreenLamp1Status; extern osMessageQId touchscreenLamp2Status; extern ...
/* * The MIT License (MIT) * * Copyright (c) 2020 <NAME> (http://fquinner.github.io) * * 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...
#include "wait_for_exec.h" bool prepare_bin_for_exec(const char * exec_bin_path, const char * extra_arg) { FILE * bin_fp; char shebang_buff[SMALL_BUF_SIZE]; unsigned int extra_arg_len; int rc; if (extra_arg) { extra_arg_len = strlen(extra_arg); if (extra_arg_len > SMALL_BUF_SI...
/*- * Public Domain 2014-2015 MongoDB, Inc. * Public Domain 2008-2014 WiredTiger, Inc. * * This is free and unencumbered software released into the public domain. * * Anyone is free to copy, modify, publish, use, compile, sell, or * distribute this software, either in source code form or as a compiled * binary,...
/* * Copyright (C) <NAME> */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_stream.h> #include "ngx_ts_stream.h" #include "ngx_ts_hls.h" #include "ngx_ts_dash.h" typedef struct { ngx_ts_hls_conf_t *hls; ngx_ts_dash_conf_t *dash; } ngx_stream_ts_srv_conf_t; typedef struct { ngx_ts_s...
/* * This file is part of muFORTH: http://muforth.nimblemachines.com/ * * Copyright (c) 2002-2009 <NAME>. All rights reserved, and all wrongs * reversed. (See the file COPYRIGHT for details.) */ /* Nuts and bolts of threaded-code compiler & execution engine */ #include "muforth.h" /* * ITC code pointers, so we...
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in t...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolar...
/* # _____ ___ ____ ___ ____ # ____| | ____| | | |____| # | ___| | ___| ____| | \ PSPDEV Open Source Project. #----------------------------------------------------------------------- # (c) 2005 <NAME> <<EMAIL>> # Licenced under Academic Free License version 2.0 # Review pspsdk ...
#include <assert.h> #include <stdlib.h> #include <SDL2/SDL.h> #include "gui.h" static SDL_Renderer *renderer; static SDL_Texture *texture; static SDL_AudioDeviceID audio_dev; static int lcd_width, lcd_height; /* Called by SDL when it needs more samples. */ void audio_callback(void *userdata, uint8_t *stream, int l...
/* ################################################################### ** Filename : main.c ** Project : AudioBoot ** Processor : MKL02Z32VFM4 ** Version : Driver 01.01 ** Compiler : GNU C Compiler ** Date/Time : 2016-11-12, 18:36, # CodeGen: 0 ** Abstract : ** ...
/* * Copyright (c) 2019 <<EMAIL>> * * The socket client simple implementation */ #include <arpa/inet.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/select.h> #include <sys/socket.h> #include <sys/types.h> #include <time.h> #include <unistd.h> #include "proto.h" #de...
/********** My Custom Libraries ***********/ /********************************************/ #define IR_RECEIVE_PIN 39 // analog pin #define DECODE_NEC // Includes Apple and Onkyo //#define DEBUG // to see if attachInterrupt is used //#define TRACE // to see the state of the ISR state mach...
/* nbdkit * Copyright (C) 2019-2020 Red Hat Inc. * * 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 f...
/* Mixmaster version 3.1 -- (C) 1999 - 2016 Anonymizer Inc. and others. Mixmaster may be redistributed and modified under certain conditions. This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the file COPYRIGHT for details. Randomness $Id...
// ChameleonMacros.h /* 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 ...
/* * Copyright (c) 2014, Mentor Graphics Corporation * Copyright (c) 2018, Xilinx Inc. * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <metal/io.h> #include <openamp/rsc_table_parser.h> static int handle_dummy_rsc(struct remoteproc *rproc, void *rsc); /* Resources handler */ static...
/* * Manipulate records using a linked list. */ #include <stdio.h> #include <stdlib.h> /* the structure of a client record */ typedef struct client_struct { int acc_num; char last_name[15]; char first_name[10]; double balance; } Client; /* the structure of a linked list node */ typede...
#include <errno.h> #include <libpq-fe.h> #include <poll.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <signal.h> #include <sys/wait.h> #define BUFSZ 512 static PGconn *connection = NULL; static char *channel = NULL; void clean_and_exi...
/*- * Copyright (c) 1998 <NAME>, <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 cond...
#include <stdlib.h> #include <string.h> #include "buffer.h" /* a simple FIFO byte buffer */ void olio_buffer_pool_init_param(olio_buffer_pool * pool, uint16_t free_block_max, uint16_t block_size) { pool->free_block_max = free_block_max; pool->block_size = block_size; pool->use_count = 0; pool->free_...
/* * Copyright 2017 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include "fsl_spi.h" #include "board.h" #include "fsl_debug_console.h" #include "pin_mux.h" #include <stdbool.h> /******************************************************************************* * Definitions **********...
/* Kalign - a multiple sequence alignment program Copyright 2006, 2019 <NAME> This file is part of kalign. Kalign 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 ...
/* * Copyright © 2012 Intel Corporation * Copyright © 2013 Collabora, Ltd. * * 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 rig...
// 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
/* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in ...
#include "NameSpace.h" #include <string.h> #include <stdlib.h> #include <errno.h> #include <time.h> #include <math.h> // #define QUICK_SORT_CUTOFF_POINT 10 // the number of items in a collection, lower than which, // qsort will switch to insertion sort static long lpow(long num, long power) { if (num == 0L) { ...
/* MIT License Copyright (c) 2019 iProgramInCpp 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, publi...
/* * Copyright (c) 2008, Novell Inc. * * This program is licensed under the BSD license, read LICENSE.BSD * for further information */ #include <stdio.h> #include <string.h> #include "pool.h" #include "util.h" #include "dirpool.h" #define DIR_BLOCK 127 /* directories are stored as components, * components are...
/******************************************************************************* * Copyright (C) 2014 - 2020 Xilinx, Inc. All rights reserved. * SPDX-License-Identifier: MIT *******************************************************************************/ /**************************************************************...
// Inferno libmach/bootexec.h // http://code.google.com/p/inferno-os/source/browse/utils/libmach/bootexec.h // // Copyright © 1994-1999 Lucent Technologies Inc. // Power PC support Copyright © 1995-2004 <NAME> (<EMAIL>). // Portions Copyright © 1997-1999 Vita Nuova Limited. // Portions Copyright © 2000-2007 Vita Nuova ...
/* * Copyright (c) 2015-2016, Freescale Semiconductor, Inc. * Copyright 2016-2017 NXP * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ /** * @file mag3110_oneshot.c * @brief The mag3110_oneshot.c file implements the ISSDK MAG3110 sensor driver * example demonstration with polling mod...
#include <stdio.h> #include <stdbool.h> typedef unsigned long uint32_t; typedef uint32_t font_t; #define FONT_ID_OFFSET 0 #define FONT_SIZE_OFFSET 8 #define FONT_ALIGN_OFFSET 16 #define FONT_BOLD_OFFSET 18 #define FONT_ITALIC_OFFSET 19 #define FONT_UNDERLINE_OFFSET 20 #de...
#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...
#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <sys/mount.h> #include <sys/stat.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <alloca.h> #include <inttypes.h> #include "do_mounts.h" #include "kinit.h" #include "fstype.h" #include "zlib.h" /* Create the d...
/** * FreeRDP: A Remote Desktop Protocol Implementation * pcap File Format Utils * * Copyright 2011 <NAME> <<EMAIL>> * * 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://w...
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for * * details. If they are missing then this copy is in violation of * * the copyright conditions. */ /* ** lib_scroll.c ** ** The routine wscrl(win, n). ** positive n scroll the window up (ie. move lines d...
/*************************************************************************** vidhrdw.c Functions to emulate the video hardware of the machine. ***************************************************************************/ #include "driver.h" #include "vidhrdw/generic.h" #define VIDEO_RAM_SIZE 0x40...
/* * libwebsockets - small server side websockets and web server implementation * * Copyright (C) 2010-2018 <NAME> <<EMAIL>> * * 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: *...
/* * Copyright (c) 2000 <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 following disclaim...
/* * PL/Proxy - easy access to partitioned database. * * Copyright (c) 2006 <NAME>, Skype Technologies OÜ * Copyright (c) 2007 <NAME>, Skype Technologies OÜ * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyri...
#include <stdio.h> #include <ctype.h> #include <stdlib.h> // Struct for representing a complex number typedef struct { int real; int imaginary; } complex; // Global variable to store last read complex number complex last_complex_number = { .real = 0, .imaginary = 0 }; // Global variable to store whet...
/* * Copyright (c) 2020 <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 DISCLAIMS AL...
/* * linux/kernel/ptrace.c * * (C) Copyright 1999 <NAME> * * Common interfaces for "ptrace()" which we do not want * to continually duplicate across every architecture. */ #include <linux/sched.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/highmem.h> #include <linux/smp_lock.h> #include <as...
// Copyright 2012 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 code must retain the above copyright notice, this // list of conditio...
/* * Copyright (c) 2016, SICS, Swedish ICT AB. * 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 ...
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
/* * Copyright (c) 2013-2016, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this...
/*Se debe realizar el motor de un juego que denominaremos "Delivery". Este juego simulará la actividad de un local de comidas en el cual ingresan los pedidos por teléfono y los empleados tienen que preparar y entregar lo indicado. En esta primer etapa se deberá trabajar sobre cuatro tipos de hilos: encargado que da cur...
/* *------------------------------------------------------------------ * Copyright (c) 2018 Cisco and/or its affiliates. * 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://w...
// SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <pthread.h> #include <sched.h> #include <sys/socket.h> #include <test_progs.h> #include "bpf/libbpf_internal.h" #include "test_perf_branches.skel.h" static void check_good_sample(struct test_perf_branches *skel) { int written_global = skel->bss->written...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <cmain.h> #include <string.h> #include <fcntl.h> #include <dev/fbinfo.h> #include <syscall.h> #include <dev/device.h> #include <shm.h> #include <vfs.h> #include <ext2fs.h> #include <vprintf.h> #include <sysinfo.h> #include <sconf.h> #include <sd.h> #in...
/* * Copyright (c) 2020, Sensirion AG * 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 conditio...
#pragma once #include "point.h" #include "vector.h" #include <stdbool.h> #include <stdlib.h> #include <stdint.h> #if 0 // 1080p // Source png is 60 x 52, scaling up by 1.75 #define HEX_WIDTH 105 #define HEX_HEIGHT 91 #else // 720p #define HEX_WIDTH 60 #define HEX_HEIGHT 52 #endif // Bitmask to select specific hex ne...
/* * mkimg.c * * A program to make an image java class file given an s-record file. * * Compile with: cc mkimg.c srec.c -o mkimg * * The contents of this file are subject to the Mozilla Public License * Version 1.0 (the "License"); you may not use this file except in * compliance with the License. You ma...
/* * This file is part of the Visual Computing Library (VCL) release under the * MIT license. * * 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 r...
#ifdef WIN32 #define UNICODE #define _UNICODE #endif #include <assert.h> #include <ctype.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <locale.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <sys/time.h> #include <time.h> #i...
/* * Copyright 2017, <NAME> Institute for Automation * of Complex Power Systems, * RWTH Aachen University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
/** Interface to the SIM/USIM access library. See 3GPP TS 33.102 for descriptions of authentication values and other abbreviation-based language. File: sshsim.h @copyright Copyright (c) 2007 SFNT Finland oy, all rights reserved. */ #include "sshoperation.h" typedef struct SshSimRec SshS...
/* pmdgpu.cu */ /***********************************************************************/ /* */ /* This is the main function which is initialized by the OS. Its */ /* purposes are solely to launch each of the n threads that execute */ /* the...
/* * Copyright (c) 2013-2017 <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, including without limitation the * rights to use, copy, modify, merg...
/* * t402code.c * * Created: 01/10/2019 15:22:39 * Author : Wilenzo */ #define F_CPU 10000000UL // 20 MHz clock speed / 2 prescaler #include <avr/io.h> #include <util/delay_basic.h> #include <avr/interrupt.h> #include <avr/sleep.h> //Pins #define UAMP 1 #define BUTN 2 #define AOUT 3 #define NMIC 6 #define ...
/* * ratio.c * Exact rational numbers. * * Copyright (C) 2003-2014 <NAME>. * * This software is distributed under the zlib license. * Please see the accompanying LICENSE file. */ #include "ratio.h" #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #ifdef OPNG_LLONG_T_DEFINED typ...
/** @file * Copyright (c) 2020-2021 Arm Limited or its affiliates. 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:...
/* $Id$ */ /* alltoall.c - test the behaviour of the cluster under high communication load */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include "smi.h" /* parameters specifying the test size */ #define SEGSIZE (1024*1024) #define BLOCKSIZE (128*1024) #define LOOPS 200 #define NO_SYNC ...
/* * suspend.c: Demo program showing how to suspend a domain * * Copyright (C) 2006-2013 Red Hat, Inc. * Copyright (C) 2006 <NAME> * * 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...
#include <stdio.h> #include <string.h> #include "utils.h" #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "0.0.1a-r2" #endif #include "kstring.h" int main_adapter(int argc, char *argv[]); int main_linker(int argc, char *argv[]); int main_stag(int argc, char *argv[]); int main_tag(int argc, char *argv[]); int main_lm...
#include "proc.h" #include "global.h" #include "def.h" #include "proc.h" #include "const.h" #include "memlayout.h" struct proc * allocproc(void) { struct proc *p; char *sp; for (p = ptable; p < ptable + NPROC; p++) if (p->state == UNUSED) break; if (p == ptable + NPROC) r...
#include <stdio.h> #include "diff_idctfstBlk.h" #include "diff_dctfstBlk.h" #include "decodeZeros.h" #include "huffmanUncompress.h" #include "jpeghdr.h" #include "quanttables.h" int getBytes(char* filename, uint8_t *dataIn) { FILE *fdIn; if (!(fdIn = fopen(filename, "r")) ){ printf("Can't open %s for reading\...
#include <u.h> #include <libc.h> #include <bio.h> #include "conv.h" #include "kuten.h" #include "jis.h" #include "hdr.h" /* a state machine for interpreting shift-jis. don't blame me -- rob made me do it */ void jisproc(int c, Rune **r, long ninput) { static enum { state0, state1, state2, state3, state4 } state = s...
/* Common logic for the SRH ping utilities * Author: <NAME> * * Copyright 2017 */ #include <stdio.h> #include <unistd.h> #include <ctype.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <arpa/inet.h> #include "ping_common.h" #include "sr_api.h" int parse_connection_options(int argc, ...
/* * MIT License * * Copyright (c) 2020 Newracom, Inc. * * 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, m...
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <fcntl.h> #include <errno.h> #include <signal.h> #include "mdnsd.h" #include "sdtxt.h" // conflict! void con(char *name, int type, void *arg) { printf("conflicting name detected %s for type %d\n",name,type); exit(1); } // quit in...
///////////////// //example25.5.c ///////////////// #include <stdio.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_odeiv.h> #include <math.h> typedef struct{ double *a; //y=a[0]x[0]+a[1]x[1]+...a[ka]y[ka]+b[0]u[0]+b[1]u[1]+...+b[kb]u[kb] // double *a; //y[t+1]=a[0]y[t]+a[1]y[t-1]+...a...
#include <stdio.h> #include <stdlib.h> #include <regex.h> #include <assert.h> #include <string.h> #include <stdbool.h> #define NUMBER_OF_RULES 594 typedef struct rule_item { char* bag_color; int count; } rule_item; typedef struct rule { char* bag_color; int rule_items_count; rule_item* rule_items...
/* This work is licensed under a Creative Commons CCZero 1.0 Universal License. * See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */ /** * This client requests all the available servers from the discovery server (see server_lds.c) * and then calls GetEndpoints on the returned list of serv...
#include <stdio.h> #include <assert.h> #include "sgscript.h" #include "sgs_dbgserver.h" #include "sgs_prof.h" #define EPFX "SGSVM Error: " #define EPRINT( x ) printf( EPFX x "\n" ) void readme() { puts( "syntax:" ); puts( " sgsvm [files|options]" ); puts( " sgsvm [options] -p <file>[, <arguments>]" ); puts( ...
/* * Copyright (c) 1983 Regents of the University of California, * All rights reserved. Redistribution permitted subject to * the terms of the Berkeley Software License Agreement. */ #include "externs.h" void restore() { char *home; char home1[100]; register int n; int tmp; register FILE *fp; home = getenv...
/* ops.c Part of the swftools package. Copyright (c) 2006 <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 (at your option) a...
#include "ial.h" //++++++++++++++++++++++ SYMBOL TABLE ++++++++++++++++++++++| int TSymbol_Hash(char* key) { int retval = 1; int keylen = strlen(key); for (int i=0;i < keylen;i++) retval += key[i]; return (retval % HTSIZE); } table_symbol* TSymbol_Init() { table_symbol* ptr; ptr = mem_alloc(...
/* MIT License Copyright (c) 2021 <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, including without limitation the rights to use, copy, modify, merge, publis...
/*! \file group.c * * Author: <NAME> (https://javiermontenegro.github.io/) * Details: program file for methods implementation. */ #include "group.h" #include "client.h" /******************************/ /* Server Control Messages */ /******************************/ void parse_namechange() { char orig_na...
/* { dg-do run } */ /* { dg-options "-O2 -fsplit-loops -fdump-tree-lsplit-details" } */ /* { dg-require-effective-target int32plus } */ #ifdef __cplusplus extern "C" int printf (const char *, ...); extern "C" void abort (void); #else extern int printf (const char *, ...); extern void abort (void); #endif /* Define TR...
/** * @file * @brief * * @date Mar 13, 2018 * @author <NAME> */ #include <util/log.h> #include <assert.h> #include <kernel/printk.h> #include <kernel/irq.h> #include <asm/ptrace.h> #include <asm/trap_def.h> #include <asm/cpu_regs_types.h> #include <drivers/interrupt/lapic/regs.h> extern void e2k_interrupt_h...
#include <string.h> #include "common_defs.h" #include "hss_internal.h" #include "hss_reserve.h" #include "endian.h" /* * Initialize the reservation count to the given value */ void hss_set_reserve_count(struct hss_working_key *w, sequence_t count) { w->reserve_count = count; } /* * Set the autoreserve count *...
#include "rktio.h" #include "rktio_private.h" #include <stdlib.h> /* A hash key must be non-negative, and each value must be non-NULL */ struct rktio_hash_t { struct bucket_t *buckets; intptr_t size, count; }; typedef struct bucket_t { /* `v` is non-NULL => bucket is filled */ /* `v` is NULL and `key` is -1 ...