code
stringlengths
4
991k
repo_name
stringlengths
6
116
path
stringlengths
4
249
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
4
991k
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
# 98Fmplayer (beta) PC-98 FM driver emulation (very early version) ![gtk screenshot](/img/screenshot_gtk.png?raw=true) ![gtk toneviewer screenshot](/img/screenshot_gtk.toneview.png?raw=true) ![gtk config screenshot](/img/screenshot_gtk.config.png?raw=true) ![w2k screenshot](/img/screenshotw2k.png?raw=true) *If you are just annoyed by some specific bugs in PMDWin, [patched PMDWin](https://github.com/takamichih/pmdwinbuild) might have less bugs and more features than this.* ## Current status: * Supported formats: PMD, FMP(PLAY6) * PMD: FM, SSG, Rhythm, ADPCM, PPZ8(partially) supported; PPS, P86 not supported yet * FMP: FM, SSG, Rhythm, ADPCM, PPZ8, PDZF supported * This is just a byproduct of reverse-engineering formats, and its emulation is much worse than PMDWin, WinFMP * FM always generated in 55467Hz (closest integer to 7987200 / 144), SSG always generated in 249600Hz and downsampled with sinc filter (Never linear interpolates harmonics-rich signal like square wave) * FM generation bit-perfect with actual OPNA/OPN3 chip under limited conditions including stereo output when 4 <= ALG (Envelope is not bit-perfect yet, attack is bit-perfect only when AR >= 21) * SSGEG, Hardware LFO not supported * PPZ8: support nearest neighbor, linear and sinc interpolation * ADPCM: inaccurate (actual YM2608 seems to decode ADPCM at lower samplerate/resolution than any YM2608 emulator around, but I still couldn't get my YM2608 work with the DRAM) ## Installation/Usage (not very usable yet) ### gtk Uses gtk3, pulseaudio/jack/alsa ``` $ cd gtk $ autoreconf -i $ ./configure $ make $ ./98fmplayer ``` Reads drum sample from `$HOME/.local/share/98fmplayer/ym2608_adpcm_rom.bin` (same format as MAME). ### win32 Releases: https://github.com/takamichih/fmplayer/releases/ Uses MinGW-w64 to compile. ``` $ cd win32/x86 $ make ``` Reads drum sample from the directory in which `98fmplayer.exe` is placed. Uses DirectSound (WinMM if there is no DirectSound) to output sound. This works on Windows 2000, so it is theoretically possible to run this on a real PC-98. (But it was too heavy for my PC-9821V12 which only has P5 Pentium 120MHz, or on PC-9821Ra300 with P6 Mendocino Celeron 300MHz)
takamichih/fmplayer
README.md
Markdown
bsd-2-clause
2,196
[ 30522, 1001, 5818, 16715, 13068, 2121, 1006, 8247, 1007, 7473, 1011, 5818, 4718, 4062, 7861, 9513, 1006, 2200, 2220, 2544, 1007, 999, 1031, 14181, 2243, 12117, 12326, 1033, 1006, 1013, 10047, 2290, 1013, 12117, 12326, 1035, 14181, 2243, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (c) 2008 Atmel 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 conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* $Id: iom32u4.h 2225 2011-03-02 16:27:26Z arcanum $ */ /* avr/iom32u4.h - definitions for ATmega32U4. */ /* This file should only be included from <avr/io.h>, never directly. */ #ifndef _AVR_IO_H_ # error "Include <avr/io.h> instead of this file." #endif #ifndef _AVR_IOXXX_H_ # define _AVR_IOXXX_H_ "iom32u4.h" #else # error "Attempt to include more than one <avr/ioXXX.h> file." #endif #ifndef _AVR_IOM32U4_H_ #define _AVR_IOM32U4_H_ 1 /* Registers and associated bit numbers */ #define PINB _SFR_IO8(0x03) #define PINB0 0 #define PINB1 1 #define PINB2 2 #define PINB3 3 #define PINB4 4 #define PINB5 5 #define PINB6 6 #define PINB7 7 #define DDRB _SFR_IO8(0x04) #define DDB0 0 #define DDB1 1 #define DDB2 2 #define DDB3 3 #define DDB4 4 #define DDB5 5 #define DDB6 6 #define DDB7 7 #define PORTB _SFR_IO8(0x05) #define PORTB0 0 #define PORTB1 1 #define PORTB2 2 #define PORTB3 3 #define PORTB4 4 #define PORTB5 5 #define PORTB6 6 #define PORTB7 7 #define PINC _SFR_IO8(0x06) #define PINC6 6 #define PINC7 7 #define DDRC _SFR_IO8(0x07) #define DDC6 6 #define DDC7 7 #define PORTC _SFR_IO8(0x08) #define PORTC6 6 #define PORTC7 7 #define PIND _SFR_IO8(0x09) #define PIND0 0 #define PIND1 1 #define PIND2 2 #define PIND3 3 #define PIND4 4 #define PIND5 5 #define PIND6 6 #define PIND7 7 #define DDRD _SFR_IO8(0x0A) #define DDD0 0 #define DDD1 1 #define DDD2 2 #define DDD3 3 #define DDD4 4 #define DDD5 5 #define DDD6 6 #define DDD7 7 #define PORTD _SFR_IO8(0x0B) #define PORTD0 0 #define PORTD1 1 #define PORTD2 2 #define PORTD3 3 #define PORTD4 4 #define PORTD5 5 #define PORTD6 6 #define PORTD7 7 #define PINE _SFR_IO8(0x0C) #define PINE2 2 #define PINE6 6 #define DDRE _SFR_IO8(0x0D) #define DDE2 2 #define DDE6 6 #define PORTE _SFR_IO8(0x0E) #define PORTE2 2 #define PORTE6 6 #define PINF _SFR_IO8(0x0F) #define PINF0 0 #define PINF1 1 #define PINF4 4 #define PINF5 5 #define PINF6 6 #define PINF7 7 #define DDRF _SFR_IO8(0x10) #define DDF0 0 #define DDF1 1 #define DDF4 4 #define DDF5 5 #define DDF6 6 #define DDF7 7 #define PORTF _SFR_IO8(0x11) #define PORTF0 0 #define PORTF1 1 #define PORTF4 4 #define PORTF5 5 #define PORTF6 6 #define PORTF7 7 #define TIFR0 _SFR_IO8(0x15) #define TOV0 0 #define OCF0A 1 #define OCF0B 2 #define TIFR1 _SFR_IO8(0x16) #define TOV1 0 #define OCF1A 1 #define OCF1B 2 #define OCF1C 3 #define ICF1 5 #define TIFR3 _SFR_IO8(0x18) #define TOV3 0 #define OCF3A 1 #define OCF3B 2 #define OCF3C 3 #define ICF3 5 #define TIFR4 _SFR_IO8(0x19) #define TOV4 2 #define OCF4B 5 #define OCF4A 6 #define OCF4D 7 #define TIFR5 _SFR_IO8(0x1A) #define PCIFR _SFR_IO8(0x1B) #define PCIF0 0 #define EIFR _SFR_IO8(0x1C) #define INTF0 0 #define INTF1 1 #define INTF2 2 #define INTF3 3 #define INTF4 4 #define INTF5 5 #define INTF6 6 #define INTF7 7 #define EIMSK _SFR_IO8(0x1D) #define INT0 0 #define INT1 1 #define INT2 2 #define INT3 3 #define INT4 4 #define INT5 5 #define INT6 6 #define INT7 7 #define GPIOR0 _SFR_IO8(0x1E) #define GPIOR00 0 #define GPIOR01 1 #define GPIOR02 2 #define GPIOR03 3 #define GPIOR04 4 #define GPIOR05 5 #define GPIOR06 6 #define GPIOR07 7 #define EECR _SFR_IO8(0x1F) #define EERE 0 #define EEPE 1 #define EEMPE 2 #define EERIE 3 #define EEPM0 4 #define EEPM1 5 #define EEDR _SFR_IO8(0x20) #define EEDR0 0 #define EEDR1 1 #define EEDR2 2 #define EEDR3 3 #define EEDR4 4 #define EEDR5 5 #define EEDR6 6 #define EEDR7 7 #define EEAR _SFR_IO16(0x21) #define EEARL _SFR_IO8(0x21) #define EEAR0 0 #define EEAR1 1 #define EEAR2 2 #define EEAR3 3 #define EEAR4 4 #define EEAR5 5 #define EEAR6 6 #define EEAR7 7 #define EEARH _SFR_IO8(0x22) #define EEAR8 0 #define EEAR9 1 #define EEAR10 2 #define EEAR11 3 #define GTCCR _SFR_IO8(0x23) #define PSRSYNC 0 #define PSRASY 1 #define TSM 7 #define TCCR0A _SFR_IO8(0x24) #define WGM00 0 #define WGM01 1 #define COM0B0 4 #define COM0B1 5 #define COM0A0 6 #define COM0A1 7 #define TCCR0B _SFR_IO8(0x25) #define CS00 0 #define CS01 1 #define CS02 2 #define WGM02 3 #define FOC0B 6 #define FOC0A 7 #define TCNT0 _SFR_IO8(0x26) #define TCNT0_0 0 #define TCNT0_1 1 #define TCNT0_2 2 #define TCNT0_3 3 #define TCNT0_4 4 #define TCNT0_5 5 #define TCNT0_6 6 #define TCNT0_7 7 #define OCR0A _SFR_IO8(0x27) #define OCR0A_0 0 #define OCR0A_1 1 #define OCR0A_2 2 #define OCR0A_3 3 #define OCR0A_4 4 #define OCR0A_5 5 #define OCR0A_6 6 #define OCR0A_7 7 #define OCR0B _SFR_IO8(0x28) #define OCR0B_0 0 #define OCR0B_1 1 #define OCR0B_2 2 #define OCR0B_3 3 #define OCR0B_4 4 #define OCR0B_5 5 #define OCR0B_6 6 #define OCR0B_7 7 #define PLLCSR _SFR_IO8(0x29) #define PLOCK 0 #define PLLE 1 #define PINDIV 4 #define GPIOR1 _SFR_IO8(0x2A) #define GPIOR10 0 #define GPIOR11 1 #define GPIOR12 2 #define GPIOR13 3 #define GPIOR14 4 #define GPIOR15 5 #define GPIOR16 6 #define GPIOR17 7 #define GPIOR2 _SFR_IO8(0x2B) #define GPIOR20 0 #define GPIOR21 1 #define GPIOR22 2 #define GPIOR23 3 #define GPIOR24 4 #define GPIOR25 5 #define GPIOR26 6 #define GPIOR27 7 #define SPCR _SFR_IO8(0x2C) #define SPR0 0 #define SPR1 1 #define CPHA 2 #define CPOL 3 #define MSTR 4 #define DORD 5 #define SPE 6 #define SPIE 7 #define SPSR _SFR_IO8(0x2D) #define SPI2X 0 #define WCOL 6 #define SPIF 7 #define SPDR _SFR_IO8(0x2E) #define SPDR0 0 #define SPDR1 1 #define SPDR2 2 #define SPDR3 3 #define SPDR4 4 #define SPDR5 5 #define SPDR6 6 #define SPDR7 7 #define ACSR _SFR_IO8(0x30) #define ACIS0 0 #define ACIS1 1 #define ACIC 2 #define ACIE 3 #define ACI 4 #define ACO 5 #define ACBG 6 #define ACD 7 #define OCDR _SFR_IO8(0x31) #define OCDR0 0 #define OCDR1 1 #define OCDR2 2 #define OCDR3 3 #define OCDR4 4 #define OCDR5 5 #define OCDR6 6 #define OCDR7 7 #define PLLFRQ _SFR_IO8(0x32) #define PDIV0 0 #define PDIV1 1 #define PDIV2 2 #define PDIV3 3 #define PLLTM0 4 #define PLLTM1 5 #define PLLUSB 6 #define PINMUX 7 #define SMCR _SFR_IO8(0x33) #define SE 0 #define SM0 1 #define SM1 2 #define SM2 3 #define MCUSR _SFR_IO8(0x34) #define PORF 0 #define EXTRF 1 #define BORF 2 #define WDRF 3 #define JTRF 4 #define MCUCR _SFR_IO8(0x35) #define IVCE 0 #define IVSEL 1 #define PUD 4 #define JTD 7 #define SPMCSR _SFR_IO8(0x37) #define SPMEN 0 #define PGERS 1 #define PGWRT 2 #define BLBSET 3 #define RWWSRE 4 #define SIGRD 5 #define RWWSB 6 #define SPMIE 7 #define RAMPZ _SFR_IO8(0x3B) #define RAMPZ0 0 #define EIND _SFR_IO8(0x3C) #define EIND0 0 #define WDTCSR _SFR_MEM8(0x60) #define WDP0 0 #define WDP1 1 #define WDP2 2 #define WDE 3 #define WDCE 4 #define WDP3 5 #define WDIE 6 #define WDIF 7 #define CLKPR _SFR_MEM8(0x61) #define CLKPS0 0 #define CLKPS1 1 #define CLKPS2 2 #define CLKPS3 3 #define CLKPCE 7 /* Reserved [0x62..0x63] */ #define PRR0 _SFR_MEM8(0x64) #define PRADC 0 #define PRUSART0 1 #define PRSPI 2 #define PRTIM1 3 #define PRTIM0 5 #define PRTIM2 6 #define PRTWI 7 #define __AVR_HAVE_PRR0 ((1<<PRADC)|(1<<PRUSART0)|(1<<PRSPI)|(1<<PRTIM1)|(1<<PRTIM0)|(1<<PRTIM2)|(1<<PRTWI)) #define __AVR_HAVE_PRR0_PRADC #define __AVR_HAVE_PRR0_PRUSART0 #define __AVR_HAVE_PRR0_PRSPI #define __AVR_HAVE_PRR0_PRTIM1 #define __AVR_HAVE_PRR0_PRTIM0 #define __AVR_HAVE_PRR0_PRTIM2 #define __AVR_HAVE_PRR0_PRTWI #define PRR1 _SFR_MEM8(0x65) #define PRUSART1 0 #define PRTIM3 3 #define PRUSB 7 #define __AVR_HAVE_PRR1 ((1<<PRUSART1)|(1<<PRTIM3)|(1<<PRUSB)) #define __AVR_HAVE_PRR1_PRUSART1 #define __AVR_HAVE_PRR1_PRTIM3 #define __AVR_HAVE_PRR1_PRUSB #define OSCCAL _SFR_MEM8(0x66) #define CAL0 0 #define CAL1 1 #define CAL2 2 #define CAL3 3 #define CAL4 4 #define CAL5 5 #define CAL6 6 #define CAL7 7 #define RCCTRL _SFR_MEM8(0x67) #define RCFREQ 0 #define PCICR _SFR_MEM8(0x68) #define PCIE0 0 #define EICRA _SFR_MEM8(0x69) #define ISC00 0 #define ISC01 1 #define ISC10 2 #define ISC11 3 #define ISC20 4 #define ISC21 5 #define ISC30 6 #define ISC31 7 #define EICRB _SFR_MEM8(0x6A) #define ISC40 0 #define ISC41 1 #define ISC50 2 #define ISC51 3 #define ISC60 4 #define ISC61 5 #define ISC70 6 #define ISC71 7 #define PCMSK0 _SFR_MEM8(0x6B) #define PCINT0 0 #define PCINT1 1 #define PCINT2 2 #define PCINT3 3 #define PCINT4 4 #define PCINT5 5 #define PCINT6 6 #define PCINT7 7 /* Reserved [0x6C..0x6D] */ #define TIMSK0 _SFR_MEM8(0x6E) #define TOIE0 0 #define OCIE0A 1 #define OCIE0B 2 #define TIMSK1 _SFR_MEM8(0x6F) #define TOIE1 0 #define OCIE1A 1 #define OCIE1B 2 #define OCIE1C 3 #define ICIE1 5 /* Reserved [0x70] */ #define TIMSK3 _SFR_MEM8(0x71) #define TOIE3 0 #define OCIE3A 1 #define OCIE3B 2 #define OCIE3C 3 #define ICIE3 5 #define TIMSK4 _SFR_MEM8(0x72) #define TOIE4 2 #define OCIE4B 5 #define OCIE4A 6 #define OCIE4D 7 /* Reserved [0x73..0x77] */ #ifndef __ASSEMBLER__ #define ADC _SFR_MEM16(0x78) #endif #define ADCW _SFR_MEM16(0x78) #define ADCL _SFR_MEM8(0x78) #define ADCL0 0 #define ADCL1 1 #define ADCL2 2 #define ADCL3 3 #define ADCL4 4 #define ADCL5 5 #define ADCL6 6 #define ADCL7 7 #define ADCH _SFR_MEM8(0x79) #define ADCH0 0 #define ADCH1 1 #define ADCH2 2 #define ADCH3 3 #define ADCH4 4 #define ADCH5 5 #define ADCH6 6 #define ADCH7 7 #define ADCSRA _SFR_MEM8(0x7A) #define ADPS0 0 #define ADPS1 1 #define ADPS2 2 #define ADIE 3 #define ADIF 4 #define ADATE 5 #define ADSC 6 #define ADEN 7 #define ADCSRB _SFR_MEM8(0x7B) #define ADTS0 0 #define ADTS1 1 #define ADTS2 2 #define ADTS3 3 #define MUX5 5 #define ACME 6 #define ADHSM 7 #define ADMUX _SFR_MEM8(0x7C) #define MUX0 0 #define MUX1 1 #define MUX2 2 #define MUX3 3 #define MUX4 4 #define ADLAR 5 #define REFS0 6 #define REFS1 7 #define DIDR2 _SFR_MEM8(0x7D) #define ADC8D 0 #define ADC9D 1 #define ADC10D 2 #define ADC11D 3 #define ADC12D 4 #define ADC13D 5 #define DIDR0 _SFR_MEM8(0x7E) #define ADC0D 0 #define ADC1D 1 #define ADC2D 2 #define ADC3D 3 #define ADC4D 4 #define ADC5D 5 #define ADC6D 6 #define ADC7D 7 #define DIDR1 _SFR_MEM8(0x7F) #define AIN0D 0 #define AIN1D 1 #define TCCR1A _SFR_MEM8(0x80) #define WGM10 0 #define WGM11 1 #define COM1C0 2 #define COM1C1 3 #define COM1B0 4 #define COM1B1 5 #define COM1A0 6 #define COM1A1 7 #define TCCR1B _SFR_MEM8(0x81) #define CS10 0 #define CS11 1 #define CS12 2 #define WGM12 3 #define WGM13 4 #define ICES1 6 #define ICNC1 7 #define TCCR1C _SFR_MEM8(0x82) #define FOC1C 5 #define FOC1B 6 #define FOC1A 7 /* Reserved [0x83] */ #define TCNT1 _SFR_MEM16(0x84) #define TCNT1L _SFR_MEM8(0x84) #define TCNT1L0 0 #define TCNT1L1 1 #define TCNT1L2 2 #define TCNT1L3 3 #define TCNT1L4 4 #define TCNT1L5 5 #define TCNT1L6 6 #define TCNT1L7 7 #define TCNT1H _SFR_MEM8(0x85) #define TCNT1H0 0 #define TCNT1H1 1 #define TCNT1H2 2 #define TCNT1H3 3 #define TCNT1H4 4 #define TCNT1H5 5 #define TCNT1H6 6 #define TCNT1H7 7 #define ICR1 _SFR_MEM16(0x86) #define ICR1L _SFR_MEM8(0x86) #define ICR1L0 0 #define ICR1L1 1 #define ICR1L2 2 #define ICR1L3 3 #define ICR1L4 4 #define ICR1L5 5 #define ICR1L6 6 #define ICR1L7 7 #define ICR1H _SFR_MEM8(0x87) #define ICR1H0 0 #define ICR1H1 1 #define ICR1H2 2 #define ICR1H3 3 #define ICR1H4 4 #define ICR1H5 5 #define ICR1H6 6 #define ICR1H7 7 #define OCR1A _SFR_MEM16(0x88) #define OCR1AL _SFR_MEM8(0x88) #define OCR1AL0 0 #define OCR1AL1 1 #define OCR1AL2 2 #define OCR1AL3 3 #define OCR1AL4 4 #define OCR1AL5 5 #define OCR1AL6 6 #define OCR1AL7 7 #define OCR1AH _SFR_MEM8(0x89) #define OCR1AH0 0 #define OCR1AH1 1 #define OCR1AH2 2 #define OCR1AH3 3 #define OCR1AH4 4 #define OCR1AH5 5 #define OCR1AH6 6 #define OCR1AH7 7 #define OCR1B _SFR_MEM16(0x8A) #define OCR1BL _SFR_MEM8(0x8A) #define OCR1BL0 0 #define OCR1BL1 1 #define OCR1BL2 2 #define OCR1BL3 3 #define OCR1BL4 4 #define OCR1BL5 5 #define OCR1BL6 6 #define OCR1BL7 7 #define OCR1BH _SFR_MEM8(0x8B) #define OCR1BH0 0 #define OCR1BH1 1 #define OCR1BH2 2 #define OCR1BH3 3 #define OCR1BH4 4 #define OCR1BH5 5 #define OCR1BH6 6 #define OCR1BH7 7 #define OCR1C _SFR_MEM16(0x8C) #define OCR1CL _SFR_MEM8(0x8C) #define OCR1CL0 0 #define OCR1CL1 1 #define OCR1CL2 2 #define OCR1CL3 3 #define OCR1CL4 4 #define OCR1CL5 5 #define OCR1CL6 6 #define OCR1CL7 7 #define OCR1CH _SFR_MEM8(0x8D) #define OCR1CH0 0 #define OCR1CH1 1 #define OCR1CH2 2 #define OCR1CH3 3 #define OCR1CH4 4 #define OCR1CH5 5 #define OCR1CH6 6 #define OCR1CH7 7 /* Reserved [0x8E..0x8F] */ #define TCCR3A _SFR_MEM8(0x90) #define WGM30 0 #define WGM31 1 #define COM3C0 2 #define COM3C1 3 #define COM3B0 4 #define COM3B1 5 #define COM3A0 6 #define COM3A1 7 #define TCCR3B _SFR_MEM8(0x91) #define CS30 0 #define CS31 1 #define CS32 2 #define WGM32 3 #define WGM33 4 #define ICES3 6 #define ICNC3 7 #define TCCR3C _SFR_MEM8(0x92) #define FOC3C 5 #define FOC3B 6 #define FOC3A 7 /* Reserved [0x93] */ #define TCNT3 _SFR_MEM16(0x94) #define TCNT3L _SFR_MEM8(0x94) #define TCNT3L0 0 #define TCNT3L1 1 #define TCNT3L2 2 #define TCNT3L3 3 #define TCNT3L4 4 #define TCNT3L5 5 #define TCNT3L6 6 #define TCNT3L7 7 #define TCNT3H _SFR_MEM8(0x95) #define TCNT3H0 0 #define TCNT3H1 1 #define TCNT3H2 2 #define TCNT3H3 3 #define TCNT3H4 4 #define TCNT3H5 5 #define TCNT3H6 6 #define TCNT3H7 7 #define ICR3 _SFR_MEM16(0x96) #define ICR3L _SFR_MEM8(0x96) #define ICR3L0 0 #define ICR3L1 1 #define ICR3L2 2 #define ICR3L3 3 #define ICR3L4 4 #define ICR3L5 5 #define ICR3L6 6 #define ICR3L7 7 #define ICR3H _SFR_MEM8(0x97) #define ICR3H0 0 #define ICR3H1 1 #define ICR3H2 2 #define ICR3H3 3 #define ICR3H4 4 #define ICR3H5 5 #define ICR3H6 6 #define ICR3H7 7 #define OCR3A _SFR_MEM16(0x98) #define OCR3AL _SFR_MEM8(0x98) #define OCR3AL0 0 #define OCR3AL1 1 #define OCR3AL2 2 #define OCR3AL3 3 #define OCR3AL4 4 #define OCR3AL5 5 #define OCR3AL6 6 #define OCR3AL7 7 #define OCR3AH _SFR_MEM8(0x99) #define OCR3AH0 0 #define OCR3AH1 1 #define OCR3AH2 2 #define OCR3AH3 3 #define OCR3AH4 4 #define OCR3AH5 5 #define OCR3AH6 6 #define OCR3AH7 7 #define OCR3B _SFR_MEM16(0x9A) #define OCR3BL _SFR_MEM8(0x9A) #define OCR3BL0 0 #define OCR3BL1 1 #define OCR3BL2 2 #define OCR3BL3 3 #define OCR3BL4 4 #define OCR3BL5 5 #define OCR3BL6 6 #define OCR3BL7 7 #define OCR3BH _SFR_MEM8(0x9B) #define OCR3BH0 0 #define OCR3BH1 1 #define OCR3BH2 2 #define OCR3BH3 3 #define OCR3BH4 4 #define OCR3BH5 5 #define OCR3BH6 6 #define OCR3BH7 7 #define OCR3C _SFR_MEM16(0x9C) #define OCR3CL _SFR_MEM8(0x9C) #define OCR3CL0 0 #define OCR3CL1 1 #define OCR3CL2 2 #define OCR3CL3 3 #define OCR3CL4 4 #define OCR3CL5 5 #define OCR3CL6 6 #define OCR3CL7 7 #define OCR3CH _SFR_MEM8(0x9D) #define OCR3CH0 0 #define OCR3CH1 1 #define OCR3CH2 2 #define OCR3CH3 3 #define OCR3CH4 4 #define OCR3CH5 5 #define OCR3CH6 6 #define OCR3CH7 7 /* Reserved [0x9E..0xB7] */ #define TWBR _SFR_MEM8(0xB8) #define TWBR0 0 #define TWBR1 1 #define TWBR2 2 #define TWBR3 3 #define TWBR4 4 #define TWBR5 5 #define TWBR6 6 #define TWBR7 7 #define TWSR _SFR_MEM8(0xB9) #define TWPS0 0 #define TWPS1 1 #define TWS3 3 #define TWS4 4 #define TWS5 5 #define TWS6 6 #define TWS7 7 #define TWAR _SFR_MEM8(0xBA) #define TWGCE 0 #define TWA0 1 #define TWA1 2 #define TWA2 3 #define TWA3 4 #define TWA4 5 #define TWA5 6 #define TWA6 7 #define TWDR _SFR_MEM8(0xBB) #define TWD0 0 #define TWD1 1 #define TWD2 2 #define TWD3 3 #define TWD4 4 #define TWD5 5 #define TWD6 6 #define TWD7 7 #define TWCR _SFR_MEM8(0xBC) #define TWIE 0 #define TWEN 2 #define TWWC 3 #define TWSTO 4 #define TWSTA 5 #define TWEA 6 #define TWINT 7 #define TWAMR _SFR_MEM8(0xBD) #define TWAM0 1 #define TWAM1 2 #define TWAM2 3 #define TWAM3 4 #define TWAM4 5 #define TWAM5 6 #define TWAM6 7 #define TCNT4 _SFR_MEM16(0xBE) #define TCNT4L _SFR_MEM8(0xBE) #define TC40 0 #define TC41 1 #define TC42 2 #define TC43 3 #define TC44 4 #define TC45 5 #define TC46 6 #define TC47 7 #define TCNT4H _SFR_MEM8(0xBF) /* Alias for naming consistency. */ #define TC4H _SFR_MEM8(0xBF) /* Per XML device file. */ #define TC48 0 #define TC49 1 #define TC410 2 #define TCCR4A _SFR_MEM8(0xC0) #define PWM4B 0 #define PWM4A 1 #define FOC4B 2 #define FOC4A 3 #define COM4B0 4 #define COM4B1 5 #define COM4A0 6 #define COM4A1 7 #define TCCR4B _SFR_MEM8(0xC1) #define CS40 0 #define CS41 1 #define CS42 2 #define CS43 3 #define DTPS40 4 #define DTPS41 5 #define PSR4 6 #define PWM4X 7 #define TCCR4C _SFR_MEM8(0xC2) #define PWM4D 0 #define FOC4D 1 #define COM4D0 2 #define COM4D1 3 #define COM4B0S 4 #define COM4B1S 5 #define COM4A0S 6 #define COM4A1S 7 #define TCCR4D _SFR_MEM8(0xC3) #define WGM40 0 #define WGM41 1 #define FPF4 2 #define FPAC4 3 #define FPES4 4 #define FPNC4 5 #define FPEN4 6 #define FPIE4 7 #define TCCR4E _SFR_MEM8(0xC4) #define OC4OE0 0 #define OC4OE1 1 #define OC4OE2 2 #define OC4OE3 3 #define OC4OE4 4 #define OC4OE5 5 #define ENHC4 6 #define TLOCK4 7 #define CLKSEL0 _SFR_MEM8(0xC5) #define CLKS 0 #define EXTE 2 #define RCE 3 #define EXSUT0 4 #define EXSUT1 5 #define RCSUT0 6 #define RCSUT1 7 #define CLKSEL1 _SFR_MEM8(0xC6) #define EXCKSEL0 0 #define EXCKSEL1 1 #define EXCKSEL2 2 #define EXCKSEL3 3 #define RCCKSEL0 4 #define RCCKSEL1 5 #define RCCKSEL2 6 #define RCCKSEL3 7 #define CLKSTA _SFR_MEM8(0xC7) #define EXTON 0 #define RCON 1 #define UCSR1A _SFR_MEM8(0xC8) #define MPCM1 0 #define U2X1 1 #define UPE1 2 #define DOR1 3 #define FE1 4 #define UDRE1 5 #define TXC1 6 #define RXC1 7 #define UCSR1B _SFR_MEM8(0xC9) #define TXB81 0 #define RXB81 1 #define UCSZ12 2 #define TXEN1 3 #define RXEN1 4 #define UDRIE1 5 #define TXCIE1 6 #define RXCIE1 7 #define UCSR1C _SFR_MEM8(0xCA) #define UCPOL1 0 #define UCSZ10 1 #define UCSZ11 2 #define USBS1 3 #define UPM10 4 #define UPM11 5 #define UMSEL10 6 #define UMSEL11 7 #define UCSR1D _SFR_MEM8(0xCB) #define RTSEN 0 #define CTSEN 1 #define UBRR1 _SFR_MEM16(0xCC) #define UBRR1L _SFR_MEM8(0xCC) #define UBRR1H _SFR_MEM8(0xCD) #define UDR1 _SFR_MEM8(0xCE) #define UDR1_0 0 #define UDR1_1 1 #define UDR1_2 2 #define UDR1_3 3 #define UDR1_4 4 #define UDR1_5 5 #define UDR1_6 6 #define UDR1_7 7 #define OCR4A _SFR_MEM8(0xCF) #define OCR4A0 0 #define OCR4A1 1 #define OCR4A2 2 #define OCR4A3 3 #define OCR4A4 4 #define OCR4A5 5 #define OCR4A6 6 #define OCR4A7 7 #define OCR4B _SFR_MEM8(0xD0) #define OCR4B0 0 #define OCR4B1 1 #define OCR4B2 2 #define OCR4B3 3 #define OCR4B4 4 #define OCR4B5 5 #define OCR4B6 6 #define OCR4B7 7 #define OCR4C _SFR_MEM8(0xD1) #define OCR4C0 0 #define OCR4C1 1 #define OCR4C2 2 #define OCR4C3 3 #define OCR4C4 4 #define OCR4C5 5 #define OCR4C6 6 #define OCR4C7 7 #define OCR4D _SFR_MEM8(0xD2) #define OCR4D0 0 #define OCR4D1 1 #define OCR4D2 2 #define OCR4D3 3 #define OCR4D4 4 #define OCR4D5 5 #define OCR4D6 6 #define OCR4D7 7 /* Reserved [0xD3] */ #define DT4 _SFR_MEM8(0xD4) #define DT4L0 0 #define DT4L1 1 #define DT4L2 2 #define DT4L3 3 #define DT4L4 4 #define DT4L5 5 #define DT4L6 6 #define DT4L7 7 /* Reserved [0xD5..0xD6] */ #define UHWCON _SFR_MEM8(0xD7) #define UVREGE 0 #define USBCON _SFR_MEM8(0xD8) #define VBUSTE 0 #define OTGPADE 4 #define FRZCLK 5 #define USBE 7 #define USBSTA _SFR_MEM8(0xD9) #define VBUS 0 #define SPEED 3 #define USBINT _SFR_MEM8(0xDA) #define VBUSTI 0 /* Reserved [0xDB..0xDF] */ #define UDCON _SFR_MEM8(0xE0) #define DETACH 0 #define RMWKUP 1 #define LSM 2 #define RSTCPU 3 #define UDINT _SFR_MEM8(0xE1) #define SUSPI 0 #define SOFI 2 #define EORSTI 3 #define WAKEUPI 4 #define EORSMI 5 #define UPRSMI 6 #define UDIEN _SFR_MEM8(0xE2) #define SUSPE 0 #define SOFE 2 #define EORSTE 3 #define WAKEUPE 4 #define EORSME 5 #define UPRSME 6 #define UDADDR _SFR_MEM8(0xE3) #define UADD0 0 #define UADD1 1 #define UADD2 2 #define UADD3 3 #define UADD4 4 #define UADD5 5 #define UADD6 6 #define ADDEN 7 #define UDFNUM _SFR_MEM16(0xE4) #define UDFNUML _SFR_MEM8(0xE4) #define FNUM0 0 #define FNUM1 1 #define FNUM2 2 #define FNUM3 3 #define FNUM4 4 #define FNUM5 5 #define FNUM6 6 #define FNUM7 7 #define UDFNUMH _SFR_MEM8(0xE5) #define FNUM8 0 #define FNUM9 1 #define FNUM10 2 #define UDMFN _SFR_MEM8(0xE6) #define FNCERR 4 /* Reserved [0xE7] */ #define UEINTX _SFR_MEM8(0xE8) #define TXINI 0 #define STALLEDI 1 #define RXOUTI 2 #define RXSTPI 3 #define NAKOUTI 4 #define RWAL 5 #define NAKINI 6 #define FIFOCON 7 #define UENUM _SFR_MEM8(0xE9) #define UENUM_0 0 #define UENUM_1 1 #define UENUM_2 2 #define UERST _SFR_MEM8(0xEA) #define EPRST0 0 #define EPRST1 1 #define EPRST2 2 #define EPRST3 3 #define EPRST4 4 #define EPRST5 5 #define EPRST6 6 #define UECONX _SFR_MEM8(0xEB) #define EPEN 0 #define RSTDT 3 #define STALLRQC 4 #define STALLRQ 5 #define UECFG0X _SFR_MEM8(0xEC) #define EPDIR 0 #define EPTYPE0 6 #define EPTYPE1 7 #define UECFG1X _SFR_MEM8(0xED) #define ALLOC 1 #define EPBK0 2 #define EPBK1 3 #define EPSIZE0 4 #define EPSIZE1 5 #define EPSIZE2 6 #define UESTA0X _SFR_MEM8(0xEE) #define NBUSYBK0 0 #define NBUSYBK1 1 #define DTSEQ0 2 #define DTSEQ1 3 #define UNDERFI 5 #define OVERFI 6 #define CFGOK 7 #define UESTA1X _SFR_MEM8(0xEF) #define CURRBK0 0 #define CURRBK1 1 #define CTRLDIR 2 #define UEIENX _SFR_MEM8(0xF0) #define TXINE 0 #define STALLEDE 1 #define RXOUTE 2 #define RXSTPE 3 #define NAKOUTE 4 #define NAKINE 6 #define FLERRE 7 #define UEDATX _SFR_MEM8(0xF1) #define DAT0 0 #define DAT1 1 #define DAT2 2 #define DAT3 3 #define DAT4 4 #define DAT5 5 #define DAT6 6 #define DAT7 7 #define UEBCX _SFR_MEM16(0xF2) #define UEBCLX _SFR_MEM8(0xF2) #define BYCT0 0 #define BYCT1 1 #define BYCT2 2 #define BYCT3 3 #define BYCT4 4 #define BYCT5 5 #define BYCT6 6 #define BYCT7 7 #define UEBCHX _SFR_MEM8(0xF3) #define UEINT _SFR_MEM8(0xF4) #define EPINT0 0 #define EPINT1 1 #define EPINT2 2 #define EPINT3 3 #define EPINT4 4 #define EPINT5 5 #define EPINT6 6 /* Interrupt Vectors */ /* Interrupt Vector 0 is the reset vector. */ #define INT0_vect_num 1 #define INT0_vect _VECTOR(1) /* External Interrupt Request 0 */ #define INT1_vect_num 2 #define INT1_vect _VECTOR(2) /* External Interrupt Request 1 */ #define INT2_vect_num 3 #define INT2_vect _VECTOR(3) /* External Interrupt Request 2 */ #define INT3_vect_num 4 #define INT3_vect _VECTOR(4) /* External Interrupt Request 3 */ #define INT6_vect_num 7 #define INT6_vect _VECTOR(7) /* External Interrupt Request 6 */ #define PCINT0_vect_num 9 #define PCINT0_vect _VECTOR(9) /* Pin Change Interrupt Request 0 */ #define USB_GEN_vect_num 10 #define USB_GEN_vect _VECTOR(10) /* USB General Interrupt Request */ #define USB_COM_vect_num 11 #define USB_COM_vect _VECTOR(11) /* USB Endpoint/Pipe Interrupt Communication Request */ #define WDT_vect_num 12 #define WDT_vect _VECTOR(12) /* Watchdog Time-out Interrupt */ #define TIMER1_CAPT_vect_num 16 #define TIMER1_CAPT_vect _VECTOR(16) /* Timer/Counter1 Capture Event */ #define TIMER1_COMPA_vect_num 17 #define TIMER1_COMPA_vect _VECTOR(17) /* Timer/Counter1 Compare Match A */ #define TIMER1_COMPB_vect_num 18 #define TIMER1_COMPB_vect _VECTOR(18) /* Timer/Counter1 Compare Match B */ #define TIMER1_COMPC_vect_num 19 #define TIMER1_COMPC_vect _VECTOR(19) /* Timer/Counter1 Compare Match C */ #define TIMER1_OVF_vect_num 20 #define TIMER1_OVF_vect _VECTOR(20) /* Timer/Counter1 Overflow */ #define TIMER0_COMPA_vect_num 21 #define TIMER0_COMPA_vect _VECTOR(21) /* Timer/Counter0 Compare Match A */ #define TIMER0_COMPB_vect_num 22 #define TIMER0_COMPB_vect _VECTOR(22) /* Timer/Counter0 Compare Match B */ #define TIMER0_OVF_vect_num 23 #define TIMER0_OVF_vect _VECTOR(23) /* Timer/Counter0 Overflow */ #define SPI_STC_vect_num 24 #define SPI_STC_vect _VECTOR(24) /* SPI Serial Transfer Complete */ #define USART1_RX_vect_num 25 #define USART1_RX_vect _VECTOR(25) /* USART1, Rx Complete */ #define USART1_UDRE_vect_num 26 #define USART1_UDRE_vect _VECTOR(26) /* USART1 Data register Empty */ #define USART1_TX_vect_num 27 #define USART1_TX_vect _VECTOR(27) /* USART1, Tx Complete */ #define ANALOG_COMP_vect_num 28 #define ANALOG_COMP_vect _VECTOR(28) /* Analog Comparator */ #define ADC_vect_num 29 #define ADC_vect _VECTOR(29) /* ADC Conversion Complete */ #define EE_READY_vect_num 30 #define EE_READY_vect _VECTOR(30) /* EEPROM Ready */ #define TIMER3_CAPT_vect_num 31 #define TIMER3_CAPT_vect _VECTOR(31) /* Timer/Counter3 Capture Event */ #define TIMER3_COMPA_vect_num 32 #define TIMER3_COMPA_vect _VECTOR(32) /* Timer/Counter3 Compare Match A */ #define TIMER3_COMPB_vect_num 33 #define TIMER3_COMPB_vect _VECTOR(33) /* Timer/Counter3 Compare Match B */ #define TIMER3_COMPC_vect_num 34 #define TIMER3_COMPC_vect _VECTOR(34) /* Timer/Counter3 Compare Match C */ #define TIMER3_OVF_vect_num 35 #define TIMER3_OVF_vect _VECTOR(35) /* Timer/Counter3 Overflow */ #define TWI_vect_num 36 #define TWI_vect _VECTOR(36) /* 2-wire Serial Interface */ #define SPM_READY_vect_num 37 #define SPM_READY_vect _VECTOR(37) /* Store Program Memory Read */ #define TIMER4_COMPA_vect_num 38 #define TIMER4_COMPA_vect _VECTOR(38) /* Timer/Counter4 Compare Match A */ #define TIMER4_COMPB_vect_num 39 #define TIMER4_COMPB_vect _VECTOR(39) /* Timer/Counter4 Compare Match B */ #define TIMER4_COMPD_vect_num 40 #define TIMER4_COMPD_vect _VECTOR(40) /* Timer/Counter4 Compare Match D */ #define TIMER4_OVF_vect_num 41 #define TIMER4_OVF_vect _VECTOR(41) /* Timer/Counter4 Overflow */ #define TIMER4_FPF_vect_num 42 #define TIMER4_FPF_vect _VECTOR(42) /* Timer/Counter4 Fault Protection Interrupt */ #define _VECTORS_SIZE (43 * 4) /* Constants */ #define SPM_PAGESIZE (128) #define RAMSTART (0x100) #define RAMSIZE (0xA00) #define RAMEND (RAMSTART + RAMSIZE - 1) /* Last On-Chip SRAM Location */ #define XRAMSTART (0x2200) #define XRAMSIZE (0x10000) #define XRAMEND (XRAMSIZE - 1) #define E2END (0x3FF) #define E2PAGESIZE (4) #define FLASHEND (0x7FFF) /* Fuses */ #define FUSE_MEMORY_SIZE 3 /* Low Fuse Byte */ #define FUSE_CKSEL0 (unsigned char)~_BV(0) /* Select Clock Source */ #define FUSE_CKSEL1 (unsigned char)~_BV(1) /* Select Clock Source */ #define FUSE_CKSEL2 (unsigned char)~_BV(2) /* Select Clock Source */ #define FUSE_CKSEL3 (unsigned char)~_BV(3) /* Select Clock Source */ #define FUSE_SUT0 (unsigned char)~_BV(4) /* Select start-up time */ #define FUSE_SUT1 (unsigned char)~_BV(5) /* Select start-up time */ #define FUSE_CKOUT (unsigned char)~_BV(6) /* Oscillator options */ #define FUSE_CKDIV8 (unsigned char)~_BV(7) /* Divide clock by 8 */ #define LFUSE_DEFAULT (FUSE_CKSEL1 & FUSE_CKSEL2 & FUSE_CKSEL3 & FUSE_SUT1 & FUSE_CKDIV8) /* High Fuse Byte */ #define FUSE_BOOTRST (unsigned char)~_BV(0) /* Select Reset Vector */ #define FUSE_BOOTSZ0 (unsigned char)~_BV(1) /* Select Boot Size */ #define FUSE_BOOTSZ1 (unsigned char)~_BV(2) /* Select Boot Size */ #define FUSE_EESAVE (unsigned char)~_BV(3) /* EEPROM memory is preserved through chip erase */ #define FUSE_WDTON (unsigned char)~_BV(4) /* Watchdog timer always on */ #define FUSE_SPIEN (unsigned char)~_BV(5) /* Enable Serial programming and Data Downloading */ #define FUSE_JTAGEN (unsigned char)~_BV(6) /* Enable JTAG */ #define FUSE_OCDEN (unsigned char)~_BV(7) /* Enable OCD */ #define HFUSE_DEFAULT (FUSE_BOOTSZ0 & FUSE_SPIEN) /* Extended Fuse Byte */ #define FUSE_BODLEVEL0 (unsigned char)~_BV(0) /* Brown-out Detector trigger level */ #define FUSE_BODLEVEL1 (unsigned char)~_BV(1) /* Brown-out Detector trigger level */ #define FUSE_BODLEVEL2 (unsigned char)~_BV(2) /* Brown-out Detector trigger level */ #define FUSE_HWBE (unsigned char)~_BV(3) /* Hardware Boot Enable */ #define EFUSE_DEFAULT (0xFF) /* Lock Bits */ #define __LOCK_BITS_EXIST #define __BOOT_LOCK_BITS_0_EXIST #define __BOOT_LOCK_BITS_1_EXIST /* Signature */ #define SIGNATURE_0 0x1E #define SIGNATURE_1 0x95 #define SIGNATURE_2 0x87 #define SLEEP_MODE_IDLE (0x00<<1) #define SLEEP_MODE_ADC (0x01<<1) #define SLEEP_MODE_PWR_DOWN (0x02<<1) #define SLEEP_MODE_PWR_SAVE (0x03<<1) #define SLEEP_MODE_STANDBY (0x06<<1) #define SLEEP_MODE_EXT_STANDBY (0x07<<1) #endif /* _AVR_IOM32U4_H_ */
ExploreEmbedded/Tit-Windows
tools/avr/include/avr/iom32u4.h
C
bsd-3-clause
29,597
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2263, 27218, 2884, 3840, 2035, 2916, 9235, 1012, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 14080, 1010, 2024, 7936, 3024, 2008, 1996, 2206, 3785, 2024, 2777, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.bradmcevoy.http.values; /** * A type of value which will be written into a CDATA section by its * ValueWriter * * @author brad */ public class CData { private final String data; public CData( String data ) { this.data = data; } public String getData() { return data; } }
jessec/webdav-mongodb-server
src/main/java/com/bradmcevoy/http/values/CData.java
Java
agpl-3.0
327
[ 30522, 7427, 4012, 1012, 8226, 12458, 6777, 6977, 1012, 8299, 1012, 5300, 1025, 1013, 1008, 1008, 1008, 1037, 2828, 1997, 3643, 2029, 2097, 2022, 2517, 2046, 1037, 3729, 6790, 2930, 2011, 2049, 1008, 3643, 15994, 1008, 1008, 1030, 3166, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * This file is part of EchoPet. * * EchoPet 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. * * EchoPet is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with EchoPet. If not, see <http://www.gnu.org/licenses/>. */ package com.dsh105.echopet.compat.nms.v1_14_R1.entity.type; import com.dsh105.echopet.compat.api.entity.EntityPetType; import com.dsh105.echopet.compat.api.entity.EntitySize; import com.dsh105.echopet.compat.api.entity.IPet; import com.dsh105.echopet.compat.api.entity.PetType; import com.dsh105.echopet.compat.api.entity.SizeCategory; import com.dsh105.echopet.compat.api.entity.type.nms.IEntityEvokerPet; import net.minecraft.server.v1_14_R1.DataWatcher; import net.minecraft.server.v1_14_R1.DataWatcherObject; import net.minecraft.server.v1_14_R1.DataWatcherRegistry; import net.minecraft.server.v1_14_R1.EntityInsentient; import net.minecraft.server.v1_14_R1.EntityTypes; import net.minecraft.server.v1_14_R1.World; /** * @since Nov 19, 2016 */ @EntitySize(width = 0.6F, height = 1.95F) @EntityPetType(petType = PetType.EVOKER) public class EntityEvokerPet extends EntityIllagerAbstractPet implements IEntityEvokerPet{ // EntityIllagerWizard private static final DataWatcherObject<Byte> c = DataWatcher.a(EntityEvokerPet.class, DataWatcherRegistry.a);// some sorta spell shit public EntityEvokerPet(EntityTypes<? extends EntityInsentient> type, World world){ super(type, world); } public EntityEvokerPet(EntityTypes<? extends EntityInsentient> type, World world, IPet pet){ super(type, world, pet); } public EntityEvokerPet(World world){ this(EntityTypes.EVOKER, world); } public EntityEvokerPet(World world, IPet pet){ this(EntityTypes.EVOKER, world, pet); } @Override protected void initDatawatcher(){ super.initDatawatcher(); this.datawatcher.register(c, (byte) 0); } @Override public SizeCategory getSizeCategory(){ return SizeCategory.REGULAR; } }
Borlea/EchoPet
modules/v1_14_R1/src/com/dsh105/echopet/compat/nms/v1_14_R1/entity/type/EntityEvokerPet.java
Java
gpl-3.0
2,379
[ 30522, 1013, 1008, 1008, 2023, 5371, 2003, 2112, 1997, 9052, 22327, 1012, 1008, 1008, 9052, 22327, 2003, 2489, 4007, 1024, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 1008, 2009, 2104, 1996, 3408, 1997, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
## [2.1.4](https://github.com/oclif/plugin-help/compare/v2.1.3...v2.1.4) (2018-11-12) ### Bug Fixes * Expose command help method ([#33](https://github.com/oclif/plugin-help/issues/33)) ([0c0a0d9](https://github.com/oclif/plugin-help/commit/0c0a0d9)) ## [2.1.3](https://github.com/oclif/plugin-help/compare/v2.1.2...v2.1.3) (2018-10-13) ### Bug Fixes * remove greenkeeper badge ([63640c7](https://github.com/oclif/plugin-help/commit/63640c7)) ## [2.1.2](https://github.com/oclif/plugin-help/compare/v2.1.1...v2.1.2) (2018-09-13) ### Bug Fixes * move strip-ansi into dependencies ([17863f9](https://github.com/oclif/plugin-help/commit/17863f9)) ## [2.1.1](https://github.com/oclif/plugin-help/compare/v2.1.0...v2.1.1) (2018-09-01) ### Bug Fixes * show docs for allowNo on boolean flags ([208a27a](https://github.com/oclif/plugin-help/commit/208a27a)) <a name="2.1.0"></a> # [2.1.0](https://github.com/oclif/plugin-help/compare/v2.0.5...v2.1.0) (2018-08-17) ### Features * typescript 3 ([53c4d0f](https://github.com/oclif/plugin-help/commit/53c4d0f)) <a name="2.0.5"></a> ## [2.0.5](https://github.com/oclif/plugin-help/compare/v2.0.4...v2.0.5) (2018-06-06) ### Bug Fixes * show argument options in help ([#26](https://github.com/oclif/plugin-help/issues/26)) ([0c8d1bf](https://github.com/oclif/plugin-help/commit/0c8d1bf)) <a name="2.0.4"></a> ## [2.0.4](https://github.com/oclif/plugin-help/compare/v2.0.3...v2.0.4) (2018-05-31) ### Bug Fixes * trim descriptions ([d26baaa](https://github.com/oclif/plugin-help/commit/d26baaa)) <a name="2.0.3"></a> ## [2.0.3](https://github.com/oclif/plugin-help/compare/v2.0.2...v2.0.3) (2018-05-31) ### Bug Fixes * read from `example` or `examples` ([d08f33b](https://github.com/oclif/plugin-help/commit/d08f33b)) <a name="2.0.2"></a> ## [2.0.2](https://github.com/oclif/plugin-help/compare/v2.0.1...v2.0.2) (2018-05-30) ### Bug Fixes * allow setting COLUMNS env var ([961fea0](https://github.com/oclif/plugin-help/commit/961fea0)) <a name="2.0.1"></a> ## [2.0.1](https://github.com/oclif/plugin-help/compare/v2.0.0...v2.0.1) (2018-05-30) ### Bug Fixes * single line to separate examples ([da1c488](https://github.com/oclif/plugin-help/commit/da1c488)) <a name="2.0.0"></a> # [2.0.0](https://github.com/oclif/plugin-help/compare/v1.2.11...v2.0.0) (2018-05-28) ### Features * removed commands command ([cfcac30](https://github.com/oclif/plugin-help/commit/cfcac30)) ### BREAKING CHANGES * `commands` command is no longer in this plugin it will be moved into @oclif/plugin-commands <a name="1.2.11"></a> ## [1.2.11](https://github.com/oclif/plugin-help/compare/v1.2.10...v1.2.11) (2018-05-14) ### Bug Fixes * use gray for ConEmu ([d0a469d](https://github.com/oclif/plugin-help/commit/d0a469d)) <a name="1.2.10"></a> ## [1.2.10](https://github.com/oclif/plugin-help/compare/v1.2.9...v1.2.10) (2018-05-03) ### Bug Fixes * updated semantic-release ([e3ff4aa](https://github.com/oclif/plugin-help/commit/e3ff4aa)) <a name="1.2.9"></a> ## [1.2.9](https://github.com/oclif/plugin-help/compare/v1.2.8...v1.2.9) (2018-05-03) ### Bug Fixes * manifest ([711b996](https://github.com/oclif/plugin-help/commit/711b996)) <a name="1.2.8"></a> ## [1.2.8](https://github.com/oclif/plugin-help/compare/v1.2.7...v1.2.8) (2018-05-03) ### Bug Fixes * updated command ([6a725d4](https://github.com/oclif/plugin-help/commit/6a725d4)) <a name="1.2.7"></a> ## [1.2.7](https://github.com/oclif/plugin-help/compare/v1.2.6...v1.2.7) (2018-05-01) ### Bug Fixes * updated command ([2909558](https://github.com/oclif/plugin-help/commit/2909558)) <a name="1.2.6"></a> ## [1.2.6](https://github.com/oclif/plugin-help/compare/v1.2.5...v1.2.6) (2018-05-01) ### Bug Fixes * updated command and chalk ([136aaa3](https://github.com/oclif/plugin-help/commit/136aaa3)) <a name="1.2.5"></a> ## [1.2.5](https://github.com/oclif/plugin-help/compare/v1.2.4...v1.2.5) (2018-04-20) ### Bug Fixes * show topic list without extra newline ([89d0bc5](https://github.com/oclif/plugin-help/commit/89d0bc5)) <a name="1.2.4"></a> ## [1.2.4](https://github.com/oclif/plugin-help/compare/v1.2.3...v1.2.4) (2018-04-10) ### Bug Fixes * updated command ([5837908](https://github.com/oclif/plugin-help/commit/5837908)) <a name="1.2.3"></a> ## [1.2.3](https://github.com/oclif/plugin-help/compare/v1.2.2...v1.2.3) (2018-04-07) ### Bug Fixes * show extra line between examples ([d05ec75](https://github.com/oclif/plugin-help/commit/d05ec75)) <a name="1.2.2"></a> ## [1.2.2](https://github.com/oclif/plugin-help/compare/v1.2.1...v1.2.2) (2018-03-28) ### Bug Fixes * updated [@oclif](https://github.com/oclif)/command ([01e4d9b](https://github.com/oclif/plugin-help/commit/01e4d9b)) <a name="1.2.1"></a> ## [1.2.1](https://github.com/oclif/plugin-help/compare/v1.2.0...v1.2.1) (2018-03-24) ### Bug Fixes * move help into its own section ([8099431](https://github.com/oclif/plugin-help/commit/8099431)) <a name="1.2.0"></a> # [1.2.0](https://github.com/oclif/plugin-help/compare/v1.1.8...v1.2.0) (2018-03-24) ### Bug Fixes * use new semantic-release ([8bdc8fc](https://github.com/oclif/plugin-help/commit/8bdc8fc)) ### Features * show version on root help ([988de52](https://github.com/oclif/plugin-help/commit/988de52)) <a name="1.1.8"></a> ## [1.1.8](https://github.com/oclif/plugin-help/compare/a4a769687bd7a19f535773c5ab39064b6b35ac0b...v1.1.8) (2018-03-24) ### Bug Fixes * updated command ([5e3b8f5](https://github.com/oclif/plugin-help/commit/5e3b8f5)) <a name="1.1.7"></a> ## [1.1.7](https://github.com/oclif/plugin-help/compare/cb5f9bea2c14d88afd94843026b09d245f584864...v1.1.7) (2018-03-23) ### Bug Fixes * updated deps ([a4a7696](https://github.com/oclif/plugin-help/commit/a4a7696)) <a name="1.1.6"></a> ## [1.1.6](https://github.com/oclif/plugin-help/compare/967d74a74c77f4a8ac7a389b91b92dfaa9caaff1...v1.1.6) (2018-02-28) ### Bug Fixes * updated deps ([cb5f9be](https://github.com/oclif/plugin-help/commit/cb5f9be)) <a name="1.1.5"></a> ## [1.1.5](https://github.com/oclif/plugin-help/compare/829e75edaf307223a1693b16d10e2216e0f5f9ba...v1.1.5) (2018-02-17) ### Bug Fixes * fix help command ([c60c0cb](https://github.com/oclif/plugin-help/commit/c60c0cb)) * fixed tests ([967d74a](https://github.com/oclif/plugin-help/commit/967d74a)) <a name="1.1.4"></a> ## [1.1.4](https://github.com/oclif/plugin-help/compare/7a9b7508cb0d44c8e1ab2c8ba081d30bbd99e230...v1.1.4) (2018-02-17) ### Bug Fixes * only show topics 1 level deep ([829e75e](https://github.com/oclif/plugin-help/commit/829e75e)) * only show topics 1 level deep ([5af8a0b](https://github.com/oclif/plugin-help/commit/5af8a0b)) <a name="1.1.3"></a> ## [1.1.3](https://github.com/oclif/plugin-help/compare/81c089f2b549984de4e8e25f1d941698b7f63cb3...v1.1.3) (2018-02-17) ### Bug Fixes * hide hidden topics ([7a9b750](https://github.com/oclif/plugin-help/commit/7a9b750)) <a name="1.1.2"></a> ## [1.1.2](https://github.com/oclif/plugin-help/compare/165a53c8d7f6705b20fa56553e6d78cb689d882e...v1.1.2) (2018-02-17) ### Bug Fixes * use topics only ([81c089f](https://github.com/oclif/plugin-help/commit/81c089f)) <a name="1.1.1"></a> ## [1.1.1](https://github.com/oclif/plugin-help/compare/67d1cba010649852ecbd1b6870e91e06df35aa28...v1.1.1) (2018-02-17) ### Bug Fixes * sort commands/topics ([165a53c](https://github.com/oclif/plugin-help/commit/165a53c)) <a name="1.1.0"></a> # [1.1.0](https://github.com/oclif/plugin-help/compare/de750328be54793875516f99a40cc5dd8a7bc8cf...v1.1.0) (2018-02-17) ### Features * add topics ([67d1cba](https://github.com/oclif/plugin-help/commit/67d1cba)) <a name="1.0.5"></a> ## [1.0.5](https://github.com/oclif/plugin-help/compare/66cd4cdfba29f6e6c81f45742a5528038375830f...v1.0.5) (2018-02-17) ### Bug Fixes * read options if flagValue is undefined ([abe43d8](https://github.com/oclif/plugin-help/commit/abe43d8)) * updated deps ([de75032](https://github.com/oclif/plugin-help/commit/de75032)) <a name="1.0.4"></a> ## [1.0.4](https://github.com/oclif/plugin-help/compare/a382ee982a225d48d7650f1ced7fd97ea90e1ebf...v1.0.4) (2018-02-17) ### Bug Fixes * trim usage ([06de470](https://github.com/oclif/plugin-help/commit/06de470)) * updated deps ([66cd4cd](https://github.com/oclif/plugin-help/commit/66cd4cd)) <a name="1.0.3"></a> ## [1.0.3](https://github.com/oclif/plugin-help/compare/7e709205248664666654cf0750c3209c43327298...v1.0.3) (2018-02-15) ### Bug Fixes * updated command ([a382ee9](https://github.com/oclif/plugin-help/commit/a382ee9)) <a name="1.0.2"></a> ## [1.0.2](https://github.com/oclif/plugin-help/compare/651763997bf220f980aa43b522d8f2d1bdaf1275...v1.0.2) (2018-02-15) ### Bug Fixes * hide OPTIONS for now ([7e70920](https://github.com/oclif/plugin-help/commit/7e70920)) <a name="1.0.1"></a> ## [1.0.1](https://github.com/oclif/plugin-help/compare/v1.0.0...v1.0.1) (2018-02-13) ### Bug Fixes * updated command ([6517639](https://github.com/oclif/plugin-help/commit/6517639)) <a name="0.7.4"></a> ## [0.7.4](https://github.com/oclif/plugin-help/compare/v0.7.3...v0.7.4) (2018-02-13) ### Bug Fixes * oclif rename ([fb1bbe9](https://github.com/oclif/plugin-help/commit/fb1bbe9)) <a name="0.7.2"></a> ## [0.7.2](https://github.com/anycli/plugin-help/compare/123c328fa036f3e17d21544fb2fa6fe76ac9407a...v0.7.2) (2018-02-07) ### Bug Fixes * async ([95e455e](https://github.com/anycli/plugin-help/commit/95e455e)) <a name="0.7.1"></a> ## [0.7.1](https://github.com/oclif/plugin-help/compare/d33c3d84347133558382fbd9ee9a13af27418fd6...v0.7.1) (2018-02-07) ### Bug Fixes * async ([123c328](https://github.com/oclif/plugin-help/commit/123c328)) <a name="0.7.0"></a> # [0.7.0](https://github.com/oclif/plugin-help/compare/476ec1dc0601bd75e8062759cb6e29aec1ce698b...v0.7.0) (2018-02-07) ### Bug Fixes * fixed tests ([d33c3d8](https://github.com/oclif/plugin-help/commit/d33c3d8)) ### Features * add examples ([6fd821c](https://github.com/oclif/plugin-help/commit/6fd821c)) <a name="0.6.9"></a> ## [0.6.9](https://github.com/oclif/plugin-help/compare/61a26af71387aae48988ff161a186c7728ad3e30...v0.6.9) (2018-02-07) ### Bug Fixes * updated config ([476ec1d](https://github.com/oclif/plugin-help/commit/476ec1d)) <a name="0.6.8"></a> ## [0.6.8](https://github.com/oclif/plugin-help/compare/692a7e663f79a676e8de8c136bef6662f2ed29b3...v0.6.8) (2018-02-06) ### Bug Fixes * fixed topic list ([61a26af](https://github.com/oclif/plugin-help/commit/61a26af)) * fixed topic list ([b42fde4](https://github.com/oclif/plugin-help/commit/b42fde4)) <a name="0.6.7"></a> ## [0.6.7](https://github.com/oclif/plugin-help/compare/v0.6.6...v0.6.7) (2018-02-06) ### Bug Fixes * simplify ([692a7e6](https://github.com/oclif/plugin-help/commit/692a7e6)) <a name="0.6.5"></a> ## [0.6.5](https://github.com/oclif/plugin-help/compare/3259b8742a5164bfdd6d5db516ef7ba59e1fba0b...v0.6.5) (2018-02-06) ### Bug Fixes * updated command ([6ee12a9](https://github.com/oclif/plugin-help/commit/6ee12a9)) <a name="0.6.4"></a> ## [0.6.4](https://github.com/oclif/plugin-help/compare/b53cc909d0a29135360c95e110facee45602a764...v0.6.4) (2018-02-06) ### Bug Fixes * use [@oclif](https://github.com/oclif)/errors ([3259b87](https://github.com/oclif/plugin-help/commit/3259b87)) <a name="0.6.3"></a> ## [0.6.3](https://github.com/oclif/plugin-help/compare/8d2a146505f02ccc0854601a28223ae3d2acbf2c...v0.6.3) (2018-02-05) ### Bug Fixes * require lodash.template ([b53cc90](https://github.com/oclif/plugin-help/commit/b53cc90)) <a name="0.6.2"></a> ## [0.6.2](https://github.com/oclif/plugin-help/compare/32b9b620962c54b8102dc878f70104dd4084c62f...v0.6.2) (2018-02-05) ### Bug Fixes * reduce dependencies ([8d2a146](https://github.com/oclif/plugin-help/commit/8d2a146)) <a name="0.6.1"></a> ## [0.6.1](https://github.com/oclif/plugin-help/compare/4cc24aa7608b55071b4b9bd3aece77a671eb84c5...v0.6.1) (2018-02-05) ### Bug Fixes * make dependencies optional ([32b9b62](https://github.com/oclif/plugin-help/commit/32b9b62)) <a name="0.6.0"></a> # [0.6.0](https://github.com/oclif/plugin-help/compare/4f48c42033e51edbad3d8b721f3bc8ef625b5101...v0.6.0) (2018-02-03) ### Bug Fixes * tweaks to make help render better ([4cc24aa](https://github.com/oclif/plugin-help/commit/4cc24aa)) ### Features * generalize help coordination inot showHelp() ([fa37288](https://github.com/oclif/plugin-help/commit/fa37288)) <a name="0.5.1"></a> ## [0.5.1](https://github.com/oclif/plugin-help/compare/fcc41a0a404c914c93dbe925d77a57c31fb7c162...v0.5.1) (2018-02-03) ### Bug Fixes * updated config ([4f48c42](https://github.com/oclif/plugin-help/commit/4f48c42)) <a name="0.5.0"></a> # [0.5.0](https://github.com/oclif/plugin-help/compare/64df8c5c7b792285348af0e55a30887bc7dbab96...v0.5.0) (2018-02-02) ### Features * use lodash template on help strings ([fcc41a0](https://github.com/oclif/plugin-help/commit/fcc41a0)) <a name="0.4.7"></a> ## [0.4.7](https://github.com/oclif/plugin-help/compare/3d73da87de46d9f80bd2b2ce510a89f9930f8a7a...v0.4.7) (2018-02-02) ### Bug Fixes * add showHelp method ([64df8c5](https://github.com/oclif/plugin-help/commit/64df8c5)) <a name="0.4.6"></a> ## [0.4.6](https://github.com/oclif/plugin-help/compare/cf0d4b42149d39aeb7e3956a6c94fb1c63d68d72...v0.4.6) (2018-02-02) ### Bug Fixes * cache bust ([3d73da8](https://github.com/oclif/plugin-help/commit/3d73da8)) <a name="0.4.5"></a> ## [0.4.5](https://github.com/oclif/plugin-help/compare/30ca7c144bafb2e1ee6a701a559e755614115b76...v0.4.5) (2018-02-02) ### Bug Fixes * fixing manifest ([cf0d4b4](https://github.com/oclif/plugin-help/commit/cf0d4b4)) <a name="0.4.4"></a> ## [0.4.4](https://github.com/oclif/plugin-help/compare/241df8abf10d3f96e025db6f9c83d0a94cccd801...v0.4.4) (2018-02-02) ### Bug Fixes * fixed manifest location ([30ca7c1](https://github.com/oclif/plugin-help/commit/30ca7c1)) <a name="0.4.3"></a> ## [0.4.3](https://github.com/oclif/plugin-help/compare/08cf2fbb6583a3f8547705a1bc9e6a909f3866ec...v0.4.3) (2018-02-02) ### Bug Fixes * fix manifest writing ([241df8a](https://github.com/oclif/plugin-help/commit/241df8a)) <a name="0.4.2"></a> ## [0.4.2](https://github.com/oclif/plugin-help/compare/67c842d81cb9975967654e148be2d630fb372c20...v0.4.2) (2018-02-02) ### Bug Fixes * add plugin manifest ([08cf2fb](https://github.com/oclif/plugin-help/commit/08cf2fb)) <a name="0.4.1"></a> ## [0.4.1](https://github.com/oclif/plugin-help/compare/7bedad5eb4865c8b3c2264a06f52dd99af6b74dc...v0.4.1) (2018-02-02) ### Bug Fixes * prep for lodash templating ([67c842d](https://github.com/oclif/plugin-help/commit/67c842d)) <a name="0.4.0"></a> # [0.4.0](https://github.com/oclif/plugin-help/compare/d8df03bee99d520c51bf1754c00ed084b6a01170...v0.4.0) (2018-02-02) ### Features * show default flag/arg values ([7bedad5](https://github.com/oclif/plugin-help/commit/7bedad5)) <a name="0.3.7"></a> ## [0.3.7](https://github.com/oclif/plugin-help/compare/2977578c307c7092192179ee73cb1d4b634d8049...v0.3.7) (2018-02-02) ### Bug Fixes * fixed help in CI ([d8df03b](https://github.com/oclif/plugin-help/commit/d8df03b)) <a name="0.3.6"></a> ## [0.3.6](https://github.com/oclif/plugin-help/compare/fc0f0f5b5ae0c36e0409398f361fbab41707e2bb...v0.3.6) (2018-02-02) ### Bug Fixes * triggering release ([2977578](https://github.com/oclif/plugin-help/commit/2977578)) <a name="0.3.5"></a> ## [0.3.5](https://github.com/oclif/help/compare/608ba929331f1b5353e226d043c91863e2d60595...v0.3.5) (2018-02-01) ### Bug Fixes * remove blue color ([945ccc5](https://github.com/oclif/help/commit/945ccc5)) <a name="0.3.4"></a> ## [0.3.4](https://github.com/oclif/help/compare/85ec92fc619517934f62d365a2610e6e04661cec...v0.3.4) (2018-02-01) ### Bug Fixes * updated command ([da099da](https://github.com/oclif/help/commit/da099da)) <a name="0.3.3"></a> ## [0.3.3](https://github.com/oclif/help/compare/8c13ae47789018ad093f1fb6d3a248da10e8ac86...v0.3.3) (2018-02-01) ### Bug Fixes * hide underline if complex value ([85ec92f](https://github.com/oclif/help/commit/85ec92f)) <a name="0.3.2"></a> ## [0.3.2](https://github.com/oclif/help/compare/8046612a23df4c73910a6624781ab0ae96a0998e...v0.3.2) (2018-02-01) ### Bug Fixes * hide commands command ([8c13ae4](https://github.com/oclif/help/commit/8c13ae4)) <a name="0.3.1"></a> ## [0.3.1](https://github.com/oclif/help/compare/af7eb9b155fa44f2e7261b25b94dc76d05040422...v0.3.1) (2018-02-01) ### Bug Fixes * updated engine ([8046612](https://github.com/oclif/help/commit/8046612)) * work on markdown generator ([0c50c69](https://github.com/oclif/help/commit/0c50c69)) <a name="0.3.0"></a> # [0.3.0](https://github.com/oclif/help/compare/258a5b3873f6557959b72c1d116f44d0e5111e94...v0.3.0) (2018-01-31) ### Bug Fixes * add dev plugins ([7d8a3c7](https://github.com/oclif/help/commit/7d8a3c7)) ### Features * added basic root command support ([af7eb9b](https://github.com/oclif/help/commit/af7eb9b)) <a name="0.2.3"></a> ## [0.2.3](https://github.com/oclif/help/compare/1d28ed1244d6ac74fbd0a4fce9e1a74b1523c081...v0.2.3) (2018-01-31) ### Bug Fixes * updated deps ([258a5b3](https://github.com/oclif/help/commit/258a5b3)) <a name="0.2.2"></a> ## [0.2.2](https://github.com/oclif/help/compare/b4bed623435a2f4ea73d2ad813589f3105e4299e...v0.2.2) (2018-01-31) ### Bug Fixes * updated engine ([1d28ed1](https://github.com/oclif/help/commit/1d28ed1)) <a name="0.2.1"></a> ## [0.2.1](https://github.com/dxcli/help/compare/bc53900d424978ab143773eae4651e0ee591ee2f...v0.2.1) (2018-01-30) ### Bug Fixes * improve help output ([65a1ef8](https://github.com/dxcli/help/commit/65a1ef8)) <a name="0.2.0"></a> # [0.2.0](https://github.com/dxcli/help/compare/a65df6995f0da999ccc9348f8d25582c3af637e9...v0.2.0) (2018-01-30) ### Features * added help command ([bc53900](https://github.com/dxcli/help/commit/bc53900)) <a name="0.1.0"></a> # [0.1.0](https://github.com/dxcli/help/compare/v0.0.0...v0.1.0) (2018-01-30) ### Features * added command help ([a65df69](https://github.com/dxcli/help/commit/a65df69))
aredotna/case
ios/node_modules/@oclif/command/node_modules/@oclif/plugin-help/CHANGELOG.md
Markdown
mit
18,090
[ 30522, 1001, 1001, 1031, 1016, 1012, 1015, 1012, 1018, 1033, 1006, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 4012, 1013, 1051, 20464, 10128, 1013, 13354, 2378, 1011, 2393, 1013, 12826, 1013, 1058, 2475, 1012, 1015, 1012, 1017, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
local autoSave = GlobalEvent("AutoSave") function autoSave.onThink(interval) saveServer() return true end autoSave:interval(900000) autoSave:register()
mattyx14/otxserver
data/scripts/globalevents/customs/saveserver.lua
Lua
gpl-2.0
155
[ 30522, 2334, 8285, 3736, 3726, 1027, 3795, 18697, 3372, 1006, 1000, 8285, 3736, 3726, 1000, 1007, 3853, 8285, 3736, 3726, 1012, 2006, 15222, 8950, 1006, 13483, 1007, 13169, 2121, 6299, 1006, 1007, 2709, 2995, 2203, 8285, 3736, 3726, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: default title: About Ethan Mu --- <div class="post"> <h1 class="pageTitle">About Chen Mu</h1> <blockquote>Good, better, best. Never let it rest. Until your good is better, and your better is best.</blockquote> <p>I believe that to the key to being a great web developer is not only a solid foundation in design principles, but an understanding of code and the web as being one of the most unique and varied platforms.</p> <img src="{{ '/assets/img/Chen-Mu.jpg' | prepend: site.baseurl }}" alt=""> </div>
ChenMu1/ChenMu1.github.io
about.md
Markdown
mit
523
[ 30522, 1011, 1011, 1011, 9621, 1024, 12398, 2516, 1024, 2055, 6066, 14163, 1011, 1011, 1011, 1026, 4487, 2615, 2465, 1027, 1000, 2695, 1000, 1028, 1026, 1044, 2487, 2465, 1027, 1000, 3931, 3775, 9286, 1000, 1028, 2055, 8802, 14163, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
var page = require('webpage').create(); var url; if (phantom.args) { url = phantom.args[0]; } else { url = require('system').args[1]; } page.onConsoleMessage = function (message) { console.log(message); }; function exit(code) { setTimeout(function(){ phantom.exit(code); }, 0); phantom.onError = function(){}; } console.log("Loading URL: " + url); page.open(url, function (status) { if (status != "success") { console.log('Failed to open ' + url); phantom.exit(1); } console.log("Running test."); var result = page.evaluate(function() { return chess_game.test_runner.runner(); }); if (result != 0) { console.log("*** Test failed! ***"); exit(1); } else { console.log("Test succeeded."); exit(0); } });
tmtwd/chess-om
env/test/js/unit-test.js
JavaScript
epl-1.0
765
[ 30522, 13075, 3931, 1027, 5478, 1006, 1005, 4773, 13704, 1005, 1007, 1012, 3443, 1006, 1007, 1025, 13075, 24471, 2140, 1025, 2065, 1006, 11588, 1012, 12098, 5620, 1007, 1063, 24471, 2140, 1027, 11588, 1012, 12098, 5620, 1031, 1014, 1033, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#-*- coding: utf-8 -*- from decimal import Decimal from shop.cart.cart_modifiers_base import BaseCartModifier class TextOptionsOptionsCartModifier(BaseCartModifier): ''' This modifier adds an extra field to the cart to let the lineitem "know" about product options and their respective price. ''' def process_cart_item(self, cart_item, state): ''' This adds a list of price modifiers depending on the product options the client selected for the current cart_item (if any) ''' # process text_options as passed through the variation object if cart_item.variation.has_key('text_options'): for value in cart_item.variation['text_options'].itervalues(): label = value['name'] + ': ' + value['text'] price = Decimal(value['price']) * len(value['text']) * cart_item.quantity # Don't forget to update the running total! cart_item.current_total += price cart_item.extra_price_fields.append((label, price)) return cart_item
jrief/django-shop-productvariations
shop_textoptions/cart_modifier.py
Python
bsd-3-clause
1,084
[ 30522, 1001, 1011, 1008, 1011, 16861, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 2013, 26066, 12324, 26066, 2013, 4497, 1012, 11122, 1012, 11122, 1035, 16913, 28295, 1035, 2918, 12324, 2918, 10010, 21246, 7716, 18095, 2465, 3793, 7361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php defined('WPSS_PATH') or die();?> <?php $util = new WPSS_Util();?> <?php $question = new WPSS_Question((int) $_GET['id']);?> <?php $quiz = new WPSS_Quiz($question->quiz_id);?> <!-- Admin questions#new --> <div class="wrap wpss"> <img class="left" src="<?php echo WPSS_URL.'assets/images/wpss_admin.png'?>" /> <h2 class="left"><?php echo $quiz->title;?>, Editing Question</h2> <div class="clear"></div> <hr /> <p class="wpss-breadcrumb"> <a href="<?php echo $util->admin_url('','','');?>">Quizzes</a> &raquo; <a href="<?php echo $util->admin_url('quiz', 'edit', $quiz->id);?>"><?php echo $quiz->title;?></a> &raquo; <a href="<?php echo $util->admin_url('quiz', 'questions_index', $quiz->id);?>">Questions</a> &raquo; <a class="current">Edit</a> </p> <?php include( WPSS_PATH . "admin/questions/_form.php");?> </div>
JohnBueno/cafequill
wp-content/plugins/wordpress-simple-survey/admin/questions/edit.php
PHP
gpl-2.0
843
[ 30522, 1026, 1029, 25718, 4225, 1006, 1005, 1059, 4523, 2015, 1035, 4130, 1005, 1007, 2030, 3280, 1006, 1007, 1025, 1029, 1028, 1026, 1029, 25718, 1002, 21183, 4014, 1027, 2047, 1059, 4523, 2015, 1035, 21183, 4014, 1006, 1007, 1025, 1029, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the examples of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** No Commercial Usage ** This file contains pre-release code and may not be distributed. ** You may use this file in accordance with the terms and conditions ** contained in the Technology Preview License Agreement accompanying ** this package. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** If you have questions regarding the use of this file, please contact ** Nokia at qt-info@nokia.com. ** ** ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QtGui> #include "mainwindow.h" //! [0] int main(int argc, char *argv[]) //! [0] //! [1] { QApplication app(argc, argv); QString locale = QLocale::system().name(); //! [2] QTranslator translator; //! [2] //! [3] translator.load(QString("arrowpad_") + locale); app.installTranslator(&translator); //! [1] //! [3] MainWindow mainWindow; mainWindow.show(); return app.exec(); }
radekp/qt
examples/linguist/arrowpad/main.cpp
C++
lgpl-2.1
1,910
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
require 'puppetlabs_spec_helper/module_spec_helper' require 'rspec-puppet-facts' require "webmock/rspec" include RspecPuppetFacts
otto-de/puppet-chronos
spec/spec_helper.rb
Ruby
apache-2.0
129
[ 30522, 5478, 1005, 13997, 20470, 2015, 1035, 28699, 1035, 2393, 2121, 1013, 11336, 1035, 28699, 1035, 2393, 2121, 1005, 5478, 1005, 12667, 5051, 2278, 1011, 13997, 1011, 8866, 1005, 5478, 1000, 4773, 5302, 3600, 1013, 12667, 5051, 2278, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
QCL version 0.6.3 ================= Bernhard Oemer <oemer@tph.tuwien.ac.at> Despite many common concepts with classical computer science, quantum computing is still widely considered as a special discipline within the broad field of theoretical physics. One reason for the slow adoption of QC by the computer science community is the confusing variety of formalisms (Dirac notation, matrices, gates, operators, etc.), none of which has any similarity with classical programming languages, as well as the rather ``physical'' terminology in most of the available literature. QCL (Quantum Computation Language) tries to fill this gap: QCL is a hight level, architecture independent programming language for quantum computers, with a syntax derived from classical procedural languages like C or Pascal. This allows for the complete implementation and simulation of quantum algorithms (including classical components) in one consistent formalism. Features: --------- - a classical control language with functions, flow-control, interactive i/o and various classical data types (int, real, complex, boolean, string) - 2 quantum operator types: general unitarian (operator) and reversible pseudo-classic gates (qufunct) - inverse execution, allowing for on-the-fly determination of the inverse operator though caching of operator calls - various quantum data types (qubit registers) for compile time information on access modes (qureg, quconst, quvoid, quscratch) - convenient functions to manipulate quantum registers (q[n] - qubit, q[n:m] - substring, q&p - combined register) - Quantum memory management (quheap) allowing for local quantum variables - Transparent integration of Bennet-style scratch space management - Easy adaption to individual sets of elementary operators - graphical output for (X11 and Postscript) (v0.5) - conditional operators and quantum if-statements (v0.5, experimental) Availability: ------------- QCL has been developed under Linux; version 0.5.1 is tested to compile with the GNU C++ compiler 2.95.3 under SuSE 7.3. It should - however - compile under any Unix system with minor modifications (see the Makefile for details). The current version of QCL (sources and i386 Linux binaries) is available from my homepage: http://tph.tuwien.ac.at/~oemer/qcl/ Documentation: -------------- The reference documentation for QCL is my master thesis in technical physics "A Procedural Formalism for Quantum Computing". It gives a complete reference to QCL with many examples and also features a brief introduction into Quantum Computing. Some knowledge about Quantum Physics and familiarity with the braket-formalism is required. A more basic introduction esp. for computing scientists to quantum computing, quantum algorithms and QCL is included in my CS master thesis "Quantum Programming in QCL" which also features an introductory chapter to quantum physics in general. Both documents are available online in Postscript or HTML format: http://tph.tuwien.ac.at/~oemer/qcl.html#doc Installation: ------------- Besides the usual C++ development tools, you will need to have flex, bison and (optionally) GNU readline installed on your system. Untar the source package, then cd to the QCL directory, edit the Makefile for your needs and type make make install This will, by default, install the binary qcl to /usr/local/bin and the QCL include files to /usr/local/lib/qcl. For plotting support, libplotter (the C++ bindings of of GNU libplot) is required. GNU libplot is part of the the GNU plotutils; see http://www.gnu.org/software/plotutils/ Since version 0.4.3, QCL also includes support for the TeXmacs mathematical text editor. Recent TeXmacs distributions (1.0.0.6 or newer) already provide the necessary interfaces, so no additional installation is required. You can get the latest TeXmacs sources from http://www.texmacs.org/ Credits: -------- Andrey G. Grozin <A.G.Grozin@inp.nsk.su> - initial TeXmacs support - color XTerm support Muhammad Hussain Yusuf <myusuf@btconnect.com> - maintainer of the debian QCL package - testing of QCL on many hardware plattforms Feedback: --------- If you encounter any bugs or miss any particular feature or just like QCL, please let me know. My email address is Bernhard Oemer <oemer@tph.tuwien.ac.at> The QCL interpreter is Open Source(tm) software, so please feel free to write your own ports and extentions. If you send me patches, I will most probably include them in future versions of QCL and maintain them to the best of my abilities. ;-) Since English isn't my native language, I also appreciate any orthographic and grammatical corrections. Bernhard Oemer
souravzzz/qcl
README.md
Markdown
gpl-2.0
4,751
[ 30522, 25196, 2140, 2544, 1014, 1012, 1020, 1012, 1017, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 21432, 1051, 21382, 2099, 1026, 1051, 21382, 2099, 1030, 1056, 8458, 1012, 10722, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2015 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. } */ #ifndef XCSOAR_FORM_DRAW_HPP #define XCSOAR_FORM_DRAW_HPP #include "Screen/PaintWindow.hpp" #include <functional> class ContainerWindow; /** * This class is used for creating custom drawn content. * It is based on the WindowControl class. */ class WndOwnerDrawFrame : public PaintWindow { public: typedef void (*OnPaintCallback_t)(Canvas &canvas, const PixelRect &rc); public: template<typename CB> void Create(ContainerWindow &parent, PixelRect rc, const WindowStyle style, CB &&_paint) { mOnPaintCallback = std::move(_paint); PaintWindow::Create(parent, rc, style); } protected: /** * The callback function for painting the content of the control * @see SetOnPaintNotify() */ std::function<void(Canvas &canvas, const PixelRect &rc)> mOnPaintCallback; /** from class PaintWindow */ virtual void OnPaint(Canvas &canvas) override; }; #endif
etnestad/xcsoar
src/Form/Draw.hpp
C++
gpl-2.0
1,812
[ 30522, 1013, 1008, 9385, 1035, 6105, 1063, 1060, 6169, 10441, 2099, 21096, 3274, 1011, 8299, 1024, 1013, 1013, 7479, 1012, 1060, 6169, 10441, 2099, 1012, 8917, 1013, 9385, 1006, 1039, 1007, 2456, 1011, 2325, 1996, 1060, 6169, 10441, 2099, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2013 Robert von Burg <eitch@eitchnet.ch> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package li.strolch.xmlpers.api; /** * @author Robert von Burg <eitch@eitchnet.ch> */ public enum IoMode { DOM { @Override public <T> void write(PersistenceContext<T> ctx, FileIo fileIo) { fileIo.writeDom(ctx); } @Override public <T> void read(PersistenceContext<T> ctx, FileIo fileIo) { fileIo.readDom(ctx); } }, SAX { @Override public <T> void write(PersistenceContext<T> ctx, FileIo fileIo) { fileIo.writeSax(ctx); } @Override public <T> void read(PersistenceContext<T> ctx, FileIo fileIo) { fileIo.readSax(ctx); } }; /** * @param ctx * @param fileIo */ public <T> void write(PersistenceContext<T> ctx, FileIo fileIo) { throw new UnsupportedOperationException("Override me!"); //$NON-NLS-1$ } /** * @param ctx * @param fileIo */ public <T> void read(PersistenceContext<T> ctx, FileIo fileIo) { throw new UnsupportedOperationException("Override me!"); //$NON-NLS-1$ } }
4treesCH/strolch
li.strolch.xmlpers/src/main/java/li/strolch/xmlpers/api/IoMode.java
Java
apache-2.0
1,560
[ 30522, 1013, 1008, 1008, 9385, 2286, 2728, 3854, 20934, 10623, 1026, 1041, 20189, 1030, 1041, 20189, 7159, 1012, 10381, 1028, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> * Copyright (C) 2005 Eric Seidel <eric@webkit.org> * Copyright (C) 2013 Google Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ #include "config.h" #include "platform/graphics/filters/FEDiffuseLighting.h" #include "platform/graphics/filters/LightSource.h" #include "platform/text/TextStream.h" namespace blink { FEDiffuseLighting::FEDiffuseLighting(Filter* filter, const Color& lightingColor, float surfaceScale, float diffuseConstant, PassRefPtr<LightSource> lightSource) : FELighting(filter, DiffuseLighting, lightingColor, surfaceScale, diffuseConstant, 0, 0, lightSource) { } PassRefPtrWillBeRawPtr<FEDiffuseLighting> FEDiffuseLighting::create(Filter* filter, const Color& lightingColor, float surfaceScale, float diffuseConstant, PassRefPtr<LightSource> lightSource) { return adoptRefWillBeNoop(new FEDiffuseLighting(filter, lightingColor, surfaceScale, diffuseConstant, lightSource)); } FEDiffuseLighting::~FEDiffuseLighting() { } Color FEDiffuseLighting::lightingColor() const { return m_lightingColor; } bool FEDiffuseLighting::setLightingColor(const Color& lightingColor) { if (m_lightingColor == lightingColor) return false; m_lightingColor = lightingColor; return true; } float FEDiffuseLighting::surfaceScale() const { return m_surfaceScale; } bool FEDiffuseLighting::setSurfaceScale(float surfaceScale) { if (m_surfaceScale == surfaceScale) return false; m_surfaceScale = surfaceScale; return true; } float FEDiffuseLighting::diffuseConstant() const { return m_diffuseConstant; } bool FEDiffuseLighting::setDiffuseConstant(float diffuseConstant) { diffuseConstant = std::max(diffuseConstant, 0.0f); if (m_diffuseConstant == diffuseConstant) return false; m_diffuseConstant = diffuseConstant; return true; } const LightSource* FEDiffuseLighting::lightSource() const { return m_lightSource.get(); } void FEDiffuseLighting::setLightSource(PassRefPtr<LightSource> lightSource) { m_lightSource = lightSource; } TextStream& FEDiffuseLighting::externalRepresentation(TextStream& ts, int indent) const { writeIndent(ts, indent); ts << "[feDiffuseLighting"; FilterEffect::externalRepresentation(ts); ts << " surfaceScale=\"" << m_surfaceScale << "\" " << "diffuseConstant=\"" << m_diffuseConstant << "\"]\n"; inputEffect(0)->externalRepresentation(ts, indent + 1); return ts; } } // namespace blink
Workday/OpenFrame
third_party/WebKit/Source/platform/graphics/filters/FEDiffuseLighting.cpp
C++
bsd-3-clause
3,336
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2432, 1010, 2384, 1010, 2294, 1010, 2289, 24794, 2015, 27946, 2078, 1026, 27946, 2078, 1030, 1047, 3207, 1012, 8917, 1028, 1008, 9385, 1006, 1039, 1007, 2432, 1010, 2384, 6487, 20934, 2483, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using Signum.Utilities; using System; namespace Signum.Upgrade; class Program { static void Main(string[] args) { Console.WriteLine(); Console.WriteLine(" ..:: Welcome to Signum Upgrade ::.."); Console.WriteLine(); SafeConsole.WriteLineColor(ConsoleColor.DarkGray, " This application helps you upgrade a Signum Framework application by modifying your source code."); SafeConsole.WriteLineColor(ConsoleColor.DarkGray, " The closer your application resembles Southwind, the better it works."); SafeConsole.WriteLineColor(ConsoleColor.DarkGray, " Review all the changes carefully"); Console.WriteLine(); var uctx = UpgradeContext.CreateFromCurrentDirectory(); Console.Write(" RootFolder = "); SafeConsole.WriteLineColor(ConsoleColor.DarkGray, uctx.RootFolder); Console.Write(" ApplicationName = "); SafeConsole.WriteLineColor(ConsoleColor.DarkGray, uctx.ApplicationName); //UpgradeContext.DefaultIgnoreDirectories = UpgradeContext.DefaultIgnoreDirectories.Where(a => a != "Framework").ToArray(); new CodeUpgradeRunner(autoDiscover: true).Run(uctx); } }
signumsoftware/framework
Signum.Upgrade/Program.cs
C#
mit
1,199
[ 30522, 2478, 3696, 2819, 1012, 16548, 1025, 2478, 2291, 1025, 3415, 15327, 3696, 2819, 1012, 12200, 1025, 2465, 2565, 1063, 10763, 11675, 2364, 1006, 5164, 1031, 1033, 12098, 5620, 1007, 1063, 10122, 1012, 4339, 4179, 1006, 1007, 1025, 1012...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import pandas as pd import numpy as np from dateutil.relativedelta import relativedelta #### Utilities def get_first_visit_date(data_patient): ''' Determines the first visit for a given patient''' #IDEA Could be parallelized in Dask data_patient['first_visit_date'] = min(data_patient.visit_date) return data_patient def subset_analysis_data(data, date_analysis): ''' Function that subsets the full dataset to only the data available for a certain analysis date''' if type(data.date_entered.iloc[0]) is str : data.date_entered = pd.to_datetime(data.date_entered) data = data[data.date_entered < date_analysis] return data def subset_cohort(data, horizon_date, horizon_time, bandwidth): ''' Function that subsets data from a cohort that has initiated care a year before the horizon_date, and after a year + bandwith''' horizon_date = pd.to_datetime(horizon_date) data['first_visit_date'] = pd.to_datetime(data['first_visit_date']) cohort_data = data[(data['first_visit_date'] >= horizon_date - relativedelta(days=horizon_time + bandwidth)) & (data['first_visit_date'] < horizon_date - relativedelta(days=horizon_time))] return cohort_data #### Standard reporting def status_patient(data_patient, reference_date, grace_period): ''' Determines the status of a patient at a given reference_date, given the data available at a given analysis_date TODO Also select the available data for Death and Transfer and other outcomes based on data entry time ''' #IDEA Could be parallelized in Dask data_patient = get_first_visit_date(data_patient) date_out = pd.NaT date_last_appointment = pd.to_datetime(max(data_patient.next_visit_date)) late_time = reference_date - date_last_appointment if late_time.days > grace_period: status = 'LTFU' date_out = date_last_appointment if late_time.days <= grace_period: status = 'Followed' if (data_patient.reasonDescEn.iloc[0] is not np.nan) & (pd.to_datetime(data_patient.discDate.iloc[0]) < reference_date): status = data_patient.reasonDescEn.iloc[0] date_out = pd.to_datetime(data_patient.discDate.iloc[0]) return pd.DataFrame([{'status': status, 'late_time': late_time, 'last_appointment': date_last_appointment, 'date_out':date_out , 'first_visit_date':data_patient.first_visit_date.iloc[0], 'facility':data_patient.facility.iloc[0]}]) def horizon_outcome(data_cohort, reference_date, horizon_time): # TODO Make sure dates are dates data_cohort['first_visit_date'] = pd.to_datetime(data_cohort['first_visit_date']) #TODO This conversion should happen earlier data_cohort.loc[:, 'horizon_date'] = data_cohort['first_visit_date'] + np.timedelta64(horizon_time, 'D') data_cohort.loc[: , 'horizon_status'] = data_cohort['status'] # If the patient exited the cohort after his horizon date, still consider him followed # BUG This is marginally invalid, for example if a patient was considered LTFU before he died data_cohort.horizon_status[~(data_cohort['status'] == 'Followed') & (data_cohort['date_out'] > data_cohort['horizon_date'])] = 'Followed' return data_cohort ## Transversal description only def n_visits(data, month): reporting_month = pd.to_datetime(data['visit_date']).dt.to_period('M') n_vis = sum(reporting_month == month) return n_vis def make_report(data, reference_date, date_analysis, grace_period, horizon_time, cohort_width): assert reference_date <= date_analysis, 'You should not analyze a period before you have the data (date of analysis is before reference date)' if type(reference_date) is str : reference_date = pd.to_datetime(reference_date) if type(date_analysis) is str: date_analysis = pd.to_datetime(date_analysis) report_data = subset_analysis_data(data, date_analysis) if len(report_data) > 0: month = reference_date.to_period('M') - 1 n_visits_month = report_data.groupby('facility').apply(n_visits, month) df_status = report_data.groupby('patient_id').apply(status_patient, reference_date, 90) cohort_data = subset_cohort(df_status, reference_date, horizon_time, cohort_width) # print(df_status.head()) horizon_outcome_data = horizon_outcome(cohort_data, month, 365) transversal_reports = df_status.groupby('facility').status.value_counts() longitudinal_reports = horizon_outcome_data.groupby('facility').status.value_counts() out_reports = {'transversal':transversal_reports, 'longitudinal':longitudinal_reports, 'n_visits':n_visits_month} return out_reports # QUESTION What are the form_types
grlurton/hiv_retention_metrics
src/models/cohort_analysis_function.py
Python
mit
4,874
[ 30522, 12324, 25462, 2015, 2004, 22851, 12324, 16371, 8737, 2100, 2004, 27937, 2013, 3058, 21823, 2140, 1012, 5816, 9247, 2696, 12324, 5816, 9247, 2696, 1001, 1001, 1001, 1001, 16548, 13366, 2131, 1035, 2034, 1035, 3942, 1035, 3058, 1006, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2018 INRIA. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "MoreauJeanCombinedProjectionOSI.hpp" #include "Simulation.hpp" #include "LagrangianDS.hpp" #include "NewtonEulerDS.hpp" #include "NewtonEulerR.hpp" #include "LagrangianR.hpp" #include "BlockVector.hpp" #include "TypeName.hpp" using namespace RELATION; //#define DEBUG_STDOUT //#define DEBUG_MESSAGES //#define DEBUG_WHERE_MESSAGES #include <debug.h> MoreauJeanCombinedProjectionOSI::MoreauJeanCombinedProjectionOSI(double theta) : MoreauJeanOSI(theta) { _levelMinForOutput= 0; _levelMaxForOutput =1; _levelMinForInput =0; _levelMaxForInput =1; //_integratorType = OSI::MOREAUDIRECTPROJECTIONOSI; } void MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForDS(double t, SP::DynamicalSystem ds) { DEBUG_BEGIN("MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForDS( double t, SP::DynamicalSystem ds) \n"); MoreauJeanOSI::initializeWorkVectorsForDS(t, ds); const DynamicalSystemsGraph::VDescriptor& dsv = _dynamicalSystemsGraph->descriptor(ds); VectorOfVectors& workVectors = *_dynamicalSystemsGraph->properties(dsv).workVectors; Type::Siconos dsType = Type::value(*ds); if(dsType == Type::LagrangianDS || dsType == Type::LagrangianLinearTIDS) { SP::LagrangianDS d = std11::static_pointer_cast<LagrangianDS> (ds); workVectors[MoreauJeanOSI::QTMP].reset(new SiconosVector(d->dimension())); } else if(dsType == Type::NewtonEulerDS) { SP::NewtonEulerDS d = std11::static_pointer_cast<NewtonEulerDS>(ds); workVectors[MoreauJeanOSI::QTMP].reset(new SiconosVector(d->getqDim())); } else { RuntimeException::selfThrow("MoreauJeanCombinedProjectionOSI::initialize() - DS not of the right type"); } for (unsigned int k = _levelMinForInput ; k < _levelMaxForInput + 1; k++) { ds->initializeNonSmoothInput(k); } DEBUG_END("MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForDS( double t, SP::DynamicalSystem ds) \n"); } void MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForInteraction(Interaction &inter, InteractionProperties& interProp, DynamicalSystemsGraph & DSG) { DEBUG_BEGIN("MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForInteraction(Interaction &inter, InteractionProperties& interProp, DynamicalSystemsGraph & DSG)\n"); MoreauJeanOSI::initializeWorkVectorsForInteraction(inter, interProp,DSG); SP::DynamicalSystem ds1= interProp.source; SP::DynamicalSystem ds2= interProp.target; assert(ds1); assert(ds2); VectorOfBlockVectors& DSlink = inter.linkToDSVariables(); Relation &relation = *inter.relation(); RELATION::TYPES relationType = relation.getType(); unsigned int p0 =0; if (relationType == Lagrangian) { p0 = LagrangianR::p0; } else if (relationType == NewtonEuler) { p0 = NewtonEulerR::p0; } if (ds1 != ds2) { DEBUG_PRINT("ds1 != ds2\n"); if ((!DSlink[p0]) || (DSlink[p0]->numberOfBlocks() !=2)) DSlink[p0].reset(new BlockVector(2)); } else { if ((!DSlink[p0]) || (DSlink[p0]->numberOfBlocks() !=1)) DSlink[p0].reset(new BlockVector(1)); } if(checkOSI(DSG.descriptor(ds1))) { DEBUG_PRINTF("ds1->number() %i is taken into account\n", ds1->number()); assert(DSG.properties(DSG.descriptor(ds1)).workVectors); if (relationType == Lagrangian) { LagrangianDS& lds = *std11::static_pointer_cast<LagrangianDS> (ds1); DSlink[p0]->setVectorPtr(0,lds.p(0)); } else if (relationType == NewtonEuler) { NewtonEulerDS& neds = *std11::static_pointer_cast<NewtonEulerDS> (ds1); DSlink[p0]->setVectorPtr(0,neds.p(0)); } } DEBUG_PRINTF("ds1->number() %i\n",ds1->number()); DEBUG_PRINTF("ds2->number() %i\n",ds2->number()); if (ds1 != ds2) { DEBUG_PRINT("ds1 != ds2\n"); if(checkOSI(DSG.descriptor(ds2))) { DEBUG_PRINTF("ds2->number() %i is taken into account\n",ds2->number()); assert(DSG.properties(DSG.descriptor(ds2)).workVectors); if (relationType == Lagrangian) { LagrangianDS& lds = *std11::static_pointer_cast<LagrangianDS> (ds2); DSlink[p0]->setVectorPtr(1,lds.p(0)); } else if (relationType == NewtonEuler) { NewtonEulerDS& neds = *std11::static_pointer_cast<NewtonEulerDS> (ds2); DSlink[p0]->setVectorPtr(1,neds.p(0)); } } } DEBUG_END("MoreauJeanCombinedProjectionOSI::initializeWorkVectorsForInteraction(Interaction &inter, InteractionProperties& interProp, DynamicalSystemsGraph & DSG)\n"); } bool MoreauJeanCombinedProjectionOSI::addInteractionInIndexSet(SP::Interaction inter, unsigned int i) { assert(i == 1 || i == 2); //double h = _simulation->timeStep(); if(i == 1) // index set for resolution at the velocity { double y = (inter->y(0))->getValue(0); // y(0) is the position DEBUG_PRINTF("MoreauJeanCombinedProjectionOSI::addInteractionInIndexSet yref=%e \n", y); DEBUG_EXPR( if(y <= 0) printf("MoreauJeanCombinedProjectionOSI::addInteractionInIndexSet ACTIVATE in indexSet level = %i.\n", i); ) return (y <= 0); } else if(i == 2) // special index for the projection { DEBUG_EXPR( double lambda = 0; lambda = (inter->lambda(1))->getValue(0); // lambda(1) is the contact impulse for MoreauJeanOSI scheme printf("MoreauJeanCombinedProjectionOSI::addInteractionInIndexSet lambdaref=%e \n", lambda); if(lambda > 0) printf("MoreauJeanCombinedProjectionOSI::addInteractionInIndexSet ACTIVATE in indexSet level = %i.\n", i); ) // return (lambda > 0); return true; } else { return false; } } bool MoreauJeanCombinedProjectionOSI::removeInteractionFromIndexSet(SP::Interaction inter, unsigned int i) { assert(0); return(0); }
fperignon/siconos
kernel/src/simulationTools/MoreauJeanCombinedProjectionOSI.cpp
C++
apache-2.0
6,457
[ 30522, 1013, 1008, 14387, 17175, 2015, 2003, 1037, 2565, 4056, 2000, 11643, 1010, 12504, 1998, 2491, 1008, 1997, 2512, 5744, 8790, 2389, 3001, 1012, 1008, 1008, 9385, 2760, 1999, 4360, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>File System Node.js v6.2.0 Manual &amp; Documentation</title> <link rel="stylesheet" href="assets/css?family=Lato:400,700,400italic"> <link rel="stylesheet" href="assets/style.css"> <link rel="stylesheet" href="assets/sh.css"> <link rel="canonical" href="https://nodejs.org/api/fs.html"> </head> <body class="alt apidoc" id="api-section-fs"> <div id="content" class="clearfix"> <div id="column2" class="interior"> <div id="intro" class="interior"> <a href="/" title="Go back to the home page"> Node.js </a> </div> <ul> <li><a class="nav-documentation" href="documentation.html">About these Docs</a></li> <li><a class="nav-synopsis" href="synopsis.html">Usage &amp; Example</a></li> </ul> <div class="line"></div> <ul> <li><a class="nav-assert" href="assert.html">Assertion Testing</a></li> <li><a class="nav-buffer" href="buffer.html">Buffer</a></li> <li><a class="nav-addons" href="addons.html">C/C++ Addons</a></li> <li><a class="nav-child_process" href="child_process.html">Child Processes</a></li> <li><a class="nav-cluster" href="cluster.html">Cluster</a></li> <li><a class="nav-cli" href="cli.html">Command Line Options</a></li> <li><a class="nav-console" href="console.html">Console</a></li> <li><a class="nav-crypto" href="crypto.html">Crypto</a></li> <li><a class="nav-debugger" href="debugger.html">Debugger</a></li> <li><a class="nav-dns" href="dns.html">DNS</a></li> <li><a class="nav-domain" href="domain.html">Domain</a></li> <li><a class="nav-errors" href="errors.html">Errors</a></li> <li><a class="nav-events" href="events.html">Events</a></li> <li><a class="nav-fs active" href="fs.html">File System</a></li> <li><a class="nav-globals" href="globals.html">Globals</a></li> <li><a class="nav-http" href="http.html">HTTP</a></li> <li><a class="nav-https" href="https.html">HTTPS</a></li> <li><a class="nav-modules" href="modules.html">Modules</a></li> <li><a class="nav-net" href="net.html">Net</a></li> <li><a class="nav-os" href="os.html">OS</a></li> <li><a class="nav-path" href="path.html">Path</a></li> <li><a class="nav-process" href="process.html">Process</a></li> <li><a class="nav-punycode" href="punycode.html">Punycode</a></li> <li><a class="nav-querystring" href="querystring.html">Query Strings</a></li> <li><a class="nav-readline" href="readline.html">Readline</a></li> <li><a class="nav-repl" href="repl.html">REPL</a></li> <li><a class="nav-stream" href="stream.html">Stream</a></li> <li><a class="nav-string_decoder" href="string_decoder.html">String Decoder</a></li> <li><a class="nav-timers" href="timers.html">Timers</a></li> <li><a class="nav-tls" href="tls.html">TLS/SSL</a></li> <li><a class="nav-tty" href="tty.html">TTY</a></li> <li><a class="nav-dgram" href="dgram.html">UDP/Datagram</a></li> <li><a class="nav-url" href="url.html">URL</a></li> <li><a class="nav-util" href="util.html">Utilities</a></li> <li><a class="nav-v8" href="v8.html">V8</a></li> <li><a class="nav-vm" href="vm.html">VM</a></li> <li><a class="nav-zlib" href="zlib.html">ZLIB</a></li> </ul> <div class="line"></div> <ul> <li><a class="nav-https-github-com-nodejs-node" href="https://github.com/nodejs/node">GitHub Repo &amp; Issue Tracker</a></li> <li><a class="nav-http-groups-google-com-group-nodejs" href="http://groups.google.com/group/nodejs">Mailing List</a></li> </ul> </div> <div id="column1" data-id="fs" class="interior"> <header> <h1>Node.js v6.2.0 Documentation</h1> <div id="gtoc"> <p> <a href="index.html" name="toc">Index</a> | <a href="all.html">View on single page</a> | <a href="fs.json">View as JSON</a> </p> </div> <hr> </header> <div id="toc"> <h2>Table of Contents</h2> <ul> <li><a href="#fs_file_system">File System</a><ul> <li><a href="#fs_buffer_api">Buffer API</a></li> <li><a href="#fs_class_fs_fswatcher">Class: fs.FSWatcher</a><ul> <li><a href="#fs_event_change">Event: &#39;change&#39;</a></li> <li><a href="#fs_event_error">Event: &#39;error&#39;</a></li> <li><a href="#fs_watcher_close">watcher.close()</a></li> </ul> </li> <li><a href="#fs_class_fs_readstream">Class: fs.ReadStream</a><ul> <li><a href="#fs_event_open">Event: &#39;open&#39;</a></li> <li><a href="#fs_event_close">Event: &#39;close&#39;</a></li> <li><a href="#fs_readstream_path">readStream.path</a></li> </ul> </li> <li><a href="#fs_class_fs_stats">Class: fs.Stats</a><ul> <li><a href="#fs_stat_time_values">Stat Time Values</a></li> </ul> </li> <li><a href="#fs_class_fs_writestream">Class: fs.WriteStream</a><ul> <li><a href="#fs_event_open_1">Event: &#39;open&#39;</a></li> <li><a href="#fs_event_close_1">Event: &#39;close&#39;</a></li> <li><a href="#fs_writestream_byteswritten">writeStream.bytesWritten</a></li> <li><a href="#fs_writestream_path">writeStream.path</a></li> </ul> </li> <li><a href="#fs_fs_access_path_mode_callback">fs.access(path[, mode], callback)</a></li> <li><a href="#fs_fs_accesssync_path_mode">fs.accessSync(path[, mode])</a></li> <li><a href="#fs_fs_appendfile_file_data_options_callback">fs.appendFile(file, data[, options], callback)</a></li> <li><a href="#fs_fs_appendfilesync_file_data_options">fs.appendFileSync(file, data[, options])</a></li> <li><a href="#fs_fs_chmod_path_mode_callback">fs.chmod(path, mode, callback)</a></li> <li><a href="#fs_fs_chmodsync_path_mode">fs.chmodSync(path, mode)</a></li> <li><a href="#fs_fs_chown_path_uid_gid_callback">fs.chown(path, uid, gid, callback)</a></li> <li><a href="#fs_fs_chownsync_path_uid_gid">fs.chownSync(path, uid, gid)</a></li> <li><a href="#fs_fs_close_fd_callback">fs.close(fd, callback)</a></li> <li><a href="#fs_fs_closesync_fd">fs.closeSync(fd)</a></li> <li><a href="#fs_fs_createreadstream_path_options">fs.createReadStream(path[, options])</a></li> <li><a href="#fs_fs_createwritestream_path_options">fs.createWriteStream(path[, options])</a></li> <li><a href="#fs_fs_exists_path_callback">fs.exists(path, callback)</a></li> <li><a href="#fs_fs_existssync_path">fs.existsSync(path)</a></li> <li><a href="#fs_fs_fchmod_fd_mode_callback">fs.fchmod(fd, mode, callback)</a></li> <li><a href="#fs_fs_fchmodsync_fd_mode">fs.fchmodSync(fd, mode)</a></li> <li><a href="#fs_fs_fchown_fd_uid_gid_callback">fs.fchown(fd, uid, gid, callback)</a></li> <li><a href="#fs_fs_fchownsync_fd_uid_gid">fs.fchownSync(fd, uid, gid)</a></li> <li><a href="#fs_fs_fdatasync_fd_callback">fs.fdatasync(fd, callback)</a></li> <li><a href="#fs_fs_fdatasyncsync_fd">fs.fdatasyncSync(fd)</a></li> <li><a href="#fs_fs_fstat_fd_callback">fs.fstat(fd, callback)</a></li> <li><a href="#fs_fs_fstatsync_fd">fs.fstatSync(fd)</a></li> <li><a href="#fs_fs_fsync_fd_callback">fs.fsync(fd, callback)</a></li> <li><a href="#fs_fs_fsyncsync_fd">fs.fsyncSync(fd)</a></li> <li><a href="#fs_fs_ftruncate_fd_len_callback">fs.ftruncate(fd, len, callback)</a></li> <li><a href="#fs_fs_ftruncatesync_fd_len">fs.ftruncateSync(fd, len)</a></li> <li><a href="#fs_fs_futimes_fd_atime_mtime_callback">fs.futimes(fd, atime, mtime, callback)</a></li> <li><a href="#fs_fs_futimessync_fd_atime_mtime">fs.futimesSync(fd, atime, mtime)</a></li> <li><a href="#fs_fs_lchmod_path_mode_callback">fs.lchmod(path, mode, callback)</a></li> <li><a href="#fs_fs_lchmodsync_path_mode">fs.lchmodSync(path, mode)</a></li> <li><a href="#fs_fs_lchown_path_uid_gid_callback">fs.lchown(path, uid, gid, callback)</a></li> <li><a href="#fs_fs_lchownsync_path_uid_gid">fs.lchownSync(path, uid, gid)</a></li> <li><a href="#fs_fs_link_srcpath_dstpath_callback">fs.link(srcpath, dstpath, callback)</a></li> <li><a href="#fs_fs_linksync_srcpath_dstpath">fs.linkSync(srcpath, dstpath)</a></li> <li><a href="#fs_fs_lstat_path_callback">fs.lstat(path, callback)</a></li> <li><a href="#fs_fs_lstatsync_path">fs.lstatSync(path)</a></li> <li><a href="#fs_fs_mkdir_path_mode_callback">fs.mkdir(path[, mode], callback)</a></li> <li><a href="#fs_fs_mkdirsync_path_mode">fs.mkdirSync(path[, mode])</a></li> <li><a href="#fs_fs_mkdtemp_prefix_callback">fs.mkdtemp(prefix, callback)</a></li> <li><a href="#fs_fs_mkdtempsync_template">fs.mkdtempSync(template)</a></li> <li><a href="#fs_fs_open_path_flags_mode_callback">fs.open(path, flags[, mode], callback)</a></li> <li><a href="#fs_fs_opensync_path_flags_mode">fs.openSync(path, flags[, mode])</a></li> <li><a href="#fs_fs_read_fd_buffer_offset_length_position_callback">fs.read(fd, buffer, offset, length, position, callback)</a></li> <li><a href="#fs_fs_readdir_path_options_callback">fs.readdir(path[, options], callback)</a></li> <li><a href="#fs_fs_readdirsync_path_options">fs.readdirSync(path[, options])</a></li> <li><a href="#fs_fs_readfile_file_options_callback">fs.readFile(file[, options], callback)</a></li> <li><a href="#fs_fs_readfilesync_file_options">fs.readFileSync(file[, options])</a></li> <li><a href="#fs_fs_readlink_path_options_callback">fs.readlink(path[, options], callback)</a></li> <li><a href="#fs_fs_readlinksync_path_options">fs.readlinkSync(path[, options])</a></li> <li><a href="#fs_fs_readsync_fd_buffer_offset_length_position">fs.readSync(fd, buffer, offset, length, position)</a></li> <li><a href="#fs_fs_realpath_path_options_callback">fs.realpath(path[, options], callback)</a></li> <li><a href="#fs_fs_realpathsync_path_options">fs.realpathSync(path[, options])</a></li> <li><a href="#fs_fs_rename_oldpath_newpath_callback">fs.rename(oldPath, newPath, callback)</a></li> <li><a href="#fs_fs_renamesync_oldpath_newpath">fs.renameSync(oldPath, newPath)</a></li> <li><a href="#fs_fs_rmdir_path_callback">fs.rmdir(path, callback)</a></li> <li><a href="#fs_fs_rmdirsync_path">fs.rmdirSync(path)</a></li> <li><a href="#fs_fs_stat_path_callback">fs.stat(path, callback)</a></li> <li><a href="#fs_fs_statsync_path">fs.statSync(path)</a></li> <li><a href="#fs_fs_symlink_target_path_type_callback">fs.symlink(target, path[, type], callback)</a></li> <li><a href="#fs_fs_symlinksync_target_path_type">fs.symlinkSync(target, path[, type])</a></li> <li><a href="#fs_fs_truncate_path_len_callback">fs.truncate(path, len, callback)</a></li> <li><a href="#fs_fs_truncatesync_path_len">fs.truncateSync(path, len)</a></li> <li><a href="#fs_fs_unlink_path_callback">fs.unlink(path, callback)</a></li> <li><a href="#fs_fs_unlinksync_path">fs.unlinkSync(path)</a></li> <li><a href="#fs_fs_unwatchfile_filename_listener">fs.unwatchFile(filename[, listener])</a></li> <li><a href="#fs_fs_utimes_path_atime_mtime_callback">fs.utimes(path, atime, mtime, callback)</a></li> <li><a href="#fs_fs_utimessync_path_atime_mtime">fs.utimesSync(path, atime, mtime)</a></li> <li><a href="#fs_fs_watch_filename_options_listener">fs.watch(filename[, options][, listener])</a><ul> <li><a href="#fs_caveats">Caveats</a><ul> <li><a href="#fs_availability">Availability</a></li> <li><a href="#fs_inodes">Inodes</a></li> <li><a href="#fs_filename_argument">Filename Argument</a></li> </ul> </li> </ul> </li> <li><a href="#fs_fs_watchfile_filename_options_listener">fs.watchFile(filename[, options], listener)</a></li> <li><a href="#fs_fs_write_fd_buffer_offset_length_position_callback">fs.write(fd, buffer, offset, length[, position], callback)</a></li> <li><a href="#fs_fs_write_fd_data_position_encoding_callback">fs.write(fd, data[, position[, encoding]], callback)</a></li> <li><a href="#fs_fs_writefile_file_data_options_callback">fs.writeFile(file, data[, options], callback)</a></li> <li><a href="#fs_fs_writefilesync_file_data_options">fs.writeFileSync(file, data[, options])</a></li> <li><a href="#fs_fs_writesync_fd_buffer_offset_length_position">fs.writeSync(fd, buffer, offset, length[, position])</a></li> <li><a href="#fs_fs_writesync_fd_data_position_encoding">fs.writeSync(fd, data[, position[, encoding]])</a></li> </ul> </li> </ul> </div> <div id="apicontent"> <h1>File System<span><a class="mark" href="#fs_file_system" id="fs_file_system">#</a></span></h1> <pre class="api_stability api_stability_2">Stability: 2 - Stable</pre><!--name=fs--> <p>File I/O is provided by simple wrappers around standard POSIX functions. To use this module do <code>require(&#39;fs&#39;)</code>. All the methods have asynchronous and synchronous forms.</p> <p>The asynchronous form always takes a completion callback as its last argument. The arguments passed to the completion callback depend on the method, but the first argument is always reserved for an exception. If the operation was completed successfully, then the first argument will be <code>null</code> or <code>undefined</code>.</p> <p>When using the synchronous form any exceptions are immediately thrown. You can use try/catch to handle exceptions or allow them to bubble up.</p> <p>Here is an example of the asynchronous version:</p> <pre><code class="lang-js">const fs = require(&#39;fs&#39;); fs.unlink(&#39;/tmp/hello&#39;, (err) =&gt; { if (err) throw err; console.log(&#39;successfully deleted /tmp/hello&#39;); }); </code></pre> <p>Here is the synchronous version:</p> <pre><code class="lang-js">const fs = require(&#39;fs&#39;); fs.unlinkSync(&#39;/tmp/hello&#39;); console.log(&#39;successfully deleted /tmp/hello&#39;); </code></pre> <p>With the asynchronous methods there is no guaranteed ordering. So the following is prone to error:</p> <pre><code class="lang-js">fs.rename(&#39;/tmp/hello&#39;, &#39;/tmp/world&#39;, (err) =&gt; { if (err) throw err; console.log(&#39;renamed complete&#39;); }); fs.stat(&#39;/tmp/world&#39;, (err, stats) =&gt; { if (err) throw err; console.log(`stats: ${JSON.stringify(stats)}`); }); </code></pre> <p>It could be that <code>fs.stat</code> is executed before <code>fs.rename</code>. The correct way to do this is to chain the callbacks.</p> <pre><code class="lang-js">fs.rename(&#39;/tmp/hello&#39;, &#39;/tmp/world&#39;, (err) =&gt; { if (err) throw err; fs.stat(&#39;/tmp/world&#39;, (err, stats) =&gt; { if (err) throw err; console.log(`stats: ${JSON.stringify(stats)}`); }); }); </code></pre> <p>In busy processes, the programmer is <em>strongly encouraged</em> to use the asynchronous versions of these calls. The synchronous versions will block the entire process until they complete--halting all connections.</p> <p>The relative path to a filename can be used. Remember, however, that this path will be relative to <code>process.cwd()</code>.</p> <p>Most fs functions let you omit the callback argument. If you do, a default callback is used that rethrows errors. To get a trace to the original call site, set the <code>NODE_DEBUG</code> environment variable:</p> <pre><code>$ cat script.js function bad() { require(&#39;fs&#39;).readFile(&#39;/&#39;); } bad(); $ env NODE_DEBUG=fs node script.js fs.js:88 throw backtrace; ^ Error: EISDIR: illegal operation on a directory, read &lt;stack trace.&gt; </code></pre><h2>Buffer API<span><a class="mark" href="#fs_buffer_api" id="fs_buffer_api">#</a></span></h2> <p><code>fs</code> functions support passing and receiving paths as both strings and Buffers. The latter is intended to make it possible to work with filesystems that allow for non-UTF-8 filenames. For most typical uses, working with paths as Buffers will be unnecessary, as the string API converts to and from UTF-8 automatically.</p> <p><em>Note</em> that on certain file systems (such as NTFS and HFS+) filenames will always be encoded as UTF-8. On such file systems, passing non-UTF-8 encoded Buffers to <code>fs</code> functions will not work as expected.</p> <h2>Class: fs.FSWatcher<span><a class="mark" href="#fs_class_fs_fswatcher" id="fs_class_fs_fswatcher">#</a></span></h2> <p>Objects returned from <code>fs.watch()</code> are of this type.</p> <h3>Event: &#39;change&#39;<span><a class="mark" href="#fs_event_change" id="fs_event_change">#</a></span></h3> <div class="signature"><ul> <li><code>event</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> The type of fs change</li> <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> The filename that changed (if relevant/available)</li> </ul> </div><p>Emitted when something changes in a watched directory or file. See more details in <a href="#fs_fs_watch_filename_options_listener"><code>fs.watch()</code></a>.</p> <p>The <code>filename</code> argument may not be provided depending on operating system support. If <code>filename</code> is provided, it will be provided as a <code>Buffer</code> if <code>fs.watch()</code> is called with it&#39;s <code>encoding</code> option set to <code>&#39;buffer&#39;</code>, otherwise <code>filename</code> will be a string.</p> <pre><code class="lang-js">fs.watch(&#39;./tmp&#39;, {encoding: &#39;buffer&#39;}, (event, filename) =&gt; { if (filename) console.log(filename); // Prints: &lt;Buffer ...&gt; }); </code></pre> <h3>Event: &#39;error&#39;<span><a class="mark" href="#fs_event_error" id="fs_event_error">#</a></span></h3> <div class="signature"><ul> <li><code>error</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" class="type">&lt;Error&gt;</a></li> </ul> </div><p>Emitted when an error occurs.</p> <h3>watcher.close()<span><a class="mark" href="#fs_watcher_close" id="fs_watcher_close">#</a></span></h3> <p>Stop watching for changes on the given <code>fs.FSWatcher</code>.</p> <h2>Class: fs.ReadStream<span><a class="mark" href="#fs_class_fs_readstream" id="fs_class_fs_readstream">#</a></span></h2> <p><code>ReadStream</code> is a <a href="stream.html#stream_class_stream_readable">Readable Stream</a>.</p> <h3>Event: &#39;open&#39;<span><a class="mark" href="#fs_event_open" id="fs_event_open">#</a></span></h3> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span> Integer file descriptor used by the ReadStream.</li> </ul> </div><p>Emitted when the ReadStream&#39;s file is opened.</p> <h3>Event: &#39;close&#39;<span><a class="mark" href="#fs_event_close" id="fs_event_close">#</a></span></h3> <p>Emitted when the <code>ReadStream</code>&#39;s underlying file descriptor has been closed using the <code>fs.close()</code> method.</p> <h3>readStream.path<span><a class="mark" href="#fs_readstream_path" id="fs_readstream_path">#</a></span></h3> <p>The path to the file the stream is reading from as specified in the first argument to <code>fs.createReadStream()</code>. If <code>path</code> is passed as a string, then <code>readStream.path</code> will be a string. If <code>path</code> is passed as a <code>Buffer</code>, then <code>readStream.path</code> will be a <code>Buffer</code>.</p> <h2>Class: fs.Stats<span><a class="mark" href="#fs_class_fs_stats" id="fs_class_fs_stats">#</a></span></h2> <p>Objects returned from <a href="#fs_fs_stat_path_callback"><code>fs.stat()</code></a>, <a href="#fs_fs_lstat_path_callback"><code>fs.lstat()</code></a> and <a href="#fs_fs_fstat_fd_callback"><code>fs.fstat()</code></a> and their synchronous counterparts are of this type.</p> <ul> <li><code>stats.isFile()</code></li> <li><code>stats.isDirectory()</code></li> <li><code>stats.isBlockDevice()</code></li> <li><code>stats.isCharacterDevice()</code></li> <li><code>stats.isSymbolicLink()</code> (only valid with <a href="#fs_fs_lstat_path_callback"><code>fs.lstat()</code></a>)</li> <li><code>stats.isFIFO()</code></li> <li><code>stats.isSocket()</code></li> </ul> <p>For a regular file <a href="util.html#util_util_inspect_object_options"><code>util.inspect(stats)</code></a> would return a string very similar to this:</p> <pre><code class="lang-js">{ dev: 2114, ino: 48064969, mode: 33188, nlink: 1, uid: 85, gid: 100, rdev: 0, size: 527, blksize: 4096, blocks: 8, atime: Mon, 10 Oct 2011 23:24:11 GMT, mtime: Mon, 10 Oct 2011 23:24:11 GMT, ctime: Mon, 10 Oct 2011 23:24:11 GMT, birthtime: Mon, 10 Oct 2011 23:24:11 GMT } </code></pre> <p>Please note that <code>atime</code>, <code>mtime</code>, <code>birthtime</code>, and <code>ctime</code> are instances of <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date"><code>Date</code></a> object and to compare the values of these objects you should use appropriate methods. For most general uses <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getTime"><code>getTime()</code></a> will return the number of milliseconds elapsed since <em>1 January 1970 00:00:00 UTC</em> and this integer should be sufficient for any comparison, however there are additional methods which can be used for displaying fuzzy information. More details can be found in the <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date">MDN JavaScript Reference</a> page.</p> <h3>Stat Time Values<span><a class="mark" href="#fs_stat_time_values" id="fs_stat_time_values">#</a></span></h3> <p>The times in the stat object have the following semantics:</p> <ul> <li><code>atime</code> &quot;Access Time&quot; - Time when file data last accessed. Changed by the <code>mknod(2)</code>, <code>utimes(2)</code>, and <code>read(2)</code> system calls.</li> <li><code>mtime</code> &quot;Modified Time&quot; - Time when file data last modified. Changed by the <code>mknod(2)</code>, <code>utimes(2)</code>, and <code>write(2)</code> system calls.</li> <li><code>ctime</code> &quot;Change Time&quot; - Time when file status was last changed (inode data modification). Changed by the <code>chmod(2)</code>, <code>chown(2)</code>, <code>link(2)</code>, <code>mknod(2)</code>, <code>rename(2)</code>, <code>unlink(2)</code>, <code>utimes(2)</code>, <code>read(2)</code>, and <code>write(2)</code> system calls.</li> <li><code>birthtime</code> &quot;Birth Time&quot; - Time of file creation. Set once when the file is created. On filesystems where birthtime is not available, this field may instead hold either the <code>ctime</code> or <code>1970-01-01T00:00Z</code> (ie, unix epoch timestamp <code>0</code>). Note that this value may be greater than <code>atime</code> or <code>mtime</code> in this case. On Darwin and other FreeBSD variants, also set if the <code>atime</code> is explicitly set to an earlier value than the current <code>birthtime</code> using the <code>utimes(2)</code> system call.</li> </ul> <p>Prior to Node v0.12, the <code>ctime</code> held the <code>birthtime</code> on Windows systems. Note that as of v0.12, <code>ctime</code> is not &quot;creation time&quot;, and on Unix systems, it never was.</p> <h2>Class: fs.WriteStream<span><a class="mark" href="#fs_class_fs_writestream" id="fs_class_fs_writestream">#</a></span></h2> <p><code>WriteStream</code> is a <a href="stream.html#stream_class_stream_writable">Writable Stream</a>.</p> <h3>Event: &#39;open&#39;<span><a class="mark" href="#fs_event_open_1" id="fs_event_open_1">#</a></span></h3> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span> Integer file descriptor used by the WriteStream.</li> </ul> </div><p>Emitted when the WriteStream&#39;s file is opened.</p> <h3>Event: &#39;close&#39;<span><a class="mark" href="#fs_event_close_1" id="fs_event_close_1">#</a></span></h3> <p>Emitted when the <code>WriteStream</code>&#39;s underlying file descriptor has been closed using the <code>fs.close()</code> method.</p> <h3>writeStream.bytesWritten<span><a class="mark" href="#fs_writestream_byteswritten" id="fs_writestream_byteswritten">#</a></span></h3> <p>The number of bytes written so far. Does not include data that is still queued for writing.</p> <h3>writeStream.path<span><a class="mark" href="#fs_writestream_path" id="fs_writestream_path">#</a></span></h3> <p>The path to the file the stream is writing to as specified in the first argument to <code>fs.createWriteStream()</code>. If <code>path</code> is passed as a string, then <code>writeStream.path</code> will be a string. If <code>path</code> is passed as a <code>Buffer</code>, then <code>writeStream.path</code> will be a <code>Buffer</code>.</p> <h2>fs.access(path[, mode], callback)<span><a class="mark" href="#fs_fs_access_path_mode_callback" id="fs_fs_access_path_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Tests a user&#39;s permissions for the file specified by <code>path</code>. <code>mode</code> is an optional integer that specifies the accessibility checks to be performed. The following constants define the possible values of <code>mode</code>. It is possible to create a mask consisting of the bitwise OR of two or more values.</p> <ul> <li><code>fs.F_OK</code> - File is visible to the calling process. This is useful for determining if a file exists, but says nothing about <code>rwx</code> permissions. Default if no <code>mode</code> is specified.</li> <li><code>fs.R_OK</code> - File can be read by the calling process.</li> <li><code>fs.W_OK</code> - File can be written by the calling process.</li> <li><code>fs.X_OK</code> - File can be executed by the calling process. This has no effect on Windows (will behave like <code>fs.F_OK</code>).</li> </ul> <p>The final argument, <code>callback</code>, is a callback function that is invoked with a possible error argument. If any of the accessibility checks fail, the error argument will be populated. The following example checks if the file <code>/etc/passwd</code> can be read and written by the current process.</p> <pre><code class="lang-js">fs.access(&#39;/etc/passwd&#39;, fs.R_OK | fs.W_OK, (err) =&gt; { console.log(err ? &#39;no access!&#39; : &#39;can read/write&#39;); }); </code></pre> <h2>fs.accessSync(path[, mode])<span><a class="mark" href="#fs_fs_accesssync_path_mode" id="fs_fs_accesssync_path_mode">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous version of <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a>. This throws if any accessibility checks fail, and does nothing otherwise.</p> <h2>fs.appendFile(file, data[, options], callback)<span><a class="mark" href="#fs_fs_appendfile_file_data_options_callback" id="fs_fs_appendfile_file_data_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;Number&gt;</a> filename or file descriptor</li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>&#39;utf8&#39;</code></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span> default = <code>0o666</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;a&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronously append data to a file, creating the file if it does not yet exist. <code>data</code> can be a string or a buffer.</p> <p>Example:</p> <pre><code class="lang-js">fs.appendFile(&#39;message.txt&#39;, &#39;data to append&#39;, (err) =&gt; { if (err) throw err; console.log(&#39;The &quot;data to append&quot; was appended to file!&#39;); }); </code></pre> <p>If <code>options</code> is a string, then it specifies the encoding. Example:</p> <pre><code class="lang-js">fs.appendFile(&#39;message.txt&#39;, &#39;data to append&#39;, &#39;utf8&#39;, callback); </code></pre> <p>Any specified file descriptor has to have been opened for appending.</p> <p><em>Note: Specified file descriptors will not be closed automatically.</em></p> <h2>fs.appendFileSync(file, data[, options])<span><a class="mark" href="#fs_fs_appendfilesync_file_data_options" id="fs_fs_appendfilesync_file_data_options">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;Number&gt;</a> filename or file descriptor</li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>&#39;utf8&#39;</code></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span> default = <code>0o666</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;a&#39;</code></li> </ul> </li> </ul> </div><p>The synchronous version of <a href="fs.html#fs_fs_appendfile_file_data_options_callback"><code>fs.appendFile()</code></a>. Returns <code>undefined</code>.</p> <h2>fs.chmod(path, mode, callback)<span><a class="mark" href="#fs_fs_chmod_path_mode_callback" id="fs_fs_chmod_path_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/chmod.2.html">chmod(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.chmodSync(path, mode)<span><a class="mark" href="#fs_fs_chmodsync_path_mode" id="fs_fs_chmodsync_path_mode">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/chmod.2.html">chmod(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.chown(path, uid, gid, callback)<span><a class="mark" href="#fs_fs_chown_path_uid_gid_callback" id="fs_fs_chown_path_uid_gid_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/chown.2.html">chown(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.chownSync(path, uid, gid)<span><a class="mark" href="#fs_fs_chownsync_path_uid_gid" id="fs_fs_chownsync_path_uid_gid">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/chown.2.html">chown(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.close(fd, callback)<span><a class="mark" href="#fs_fs_close_fd_callback" id="fs_fs_close_fd_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/close.2.html">close(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.closeSync(fd)<span><a class="mark" href="#fs_fs_closesync_fd" id="fs_fs_closesync_fd">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/close.2.html">close(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.createReadStream(path[, options])<span><a class="mark" href="#fs_fs_createreadstream_path_options" id="fs_fs_createreadstream_path_options">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>autoClose</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;Boolean&gt;</a></li> <li><code>start</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>end</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </li> </ul> </div><p>Returns a new <a href="#fs_class_fs_readstream"><code>ReadStream</code></a> object. (See <a href="stream.html#stream_class_stream_readable">Readable Stream</a>).</p> <p>Be aware that, unlike the default value set for <code>highWaterMark</code> on a readable stream (16 kb), the stream returned by this method has a default value of 64 kb for the same parameter.</p> <p><code>options</code> is an object or string with the following defaults:</p> <pre><code class="lang-js">{ flags: &#39;r&#39;, encoding: null, fd: null, mode: 0o666, autoClose: true } </code></pre> <p><code>options</code> can include <code>start</code> and <code>end</code> values to read a range of bytes from the file instead of the entire file. Both <code>start</code> and <code>end</code> are inclusive and start at 0. The <code>encoding</code> can be any one of those accepted by <a href="buffer.html#buffer_buffer"><code>Buffer</code></a>.</p> <p>If <code>fd</code> is specified, <code>ReadStream</code> will ignore the <code>path</code> argument and will use the specified file descriptor. This means that no <code>&#39;open&#39;</code> event will be emitted. Note that <code>fd</code> should be blocking; non-blocking <code>fd</code>s should be passed to <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> <p>If <code>autoClose</code> is false, then the file descriptor won&#39;t be closed, even if there&#39;s an error. It is your responsibility to close it and make sure there&#39;s no file descriptor leak. If <code>autoClose</code> is set to true (default behavior), on <code>error</code> or <code>end</code> the file descriptor will be closed automatically.</p> <p><code>mode</code> sets the file mode (permission and sticky bits), but only if the file was created.</p> <p>An example to read the last 10 bytes of a file which is 100 bytes long:</p> <pre><code class="lang-js">fs.createReadStream(&#39;sample.txt&#39;, {start: 90, end: 99}); </code></pre> <p>If <code>options</code> is a string, then it specifies the encoding.</p> <h2>fs.createWriteStream(path[, options])<span><a class="mark" href="#fs_fs_createwritestream_path_options" id="fs_fs_createwritestream_path_options">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>defaultEncoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>autoClose</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;Boolean&gt;</a></li> <li><code>start</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </li> </ul> </div><p>Returns a new <a href="#fs_class_fs_writestream"><code>WriteStream</code></a> object. (See <a href="stream.html#stream_class_stream_writable">Writable Stream</a>).</p> <p><code>options</code> is an object or string with the following defaults:</p> <pre><code class="lang-js">{ flags: &#39;w&#39;, defaultEncoding: &#39;utf8&#39;, fd: null, mode: 0o666, autoClose: true } </code></pre> <p><code>options</code> may also include a <code>start</code> option to allow writing data at some position past the beginning of the file. Modifying a file rather than replacing it may require a <code>flags</code> mode of <code>r+</code> rather than the default mode <code>w</code>. The <code>defaultEncoding</code> can be any one of those accepted by <a href="buffer.html#buffer_buffer"><code>Buffer</code></a>.</p> <p>If <code>autoClose</code> is set to true (default behavior) on <code>error</code> or <code>end</code> the file descriptor will be closed automatically. If <code>autoClose</code> is false, then the file descriptor won&#39;t be closed, even if there&#39;s an error. It is your responsibility to close it and make sure there&#39;s no file descriptor leak.</p> <p>Like <a href="#fs_class_fs_readstream"><code>ReadStream</code></a>, if <code>fd</code> is specified, <code>WriteStream</code> will ignore the <code>path</code> argument and will use the specified file descriptor. This means that no <code>&#39;open&#39;</code> event will be emitted. Note that <code>fd</code> should be blocking; non-blocking <code>fd</code>s should be passed to <a href="net.html#net_class_net_socket"><code>net.Socket</code></a>.</p> <p>If <code>options</code> is a string, then it specifies the encoding.</p> <h2>fs.exists(path, callback)<span><a class="mark" href="#fs_fs_exists_path_callback" id="fs_fs_exists_path_callback">#</a></span></h2> <pre class="api_stability api_stability_0">Stability: 0 - Deprecated: Use <a href="#fs_fs_stat_path_callback"><code>fs.stat()</code></a> or <a href="#fs_fs_access_path_mode_callback"><code>fs.access()</code></a> instead.</pre><div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Test whether or not the given path exists by checking with the file system. Then call the <code>callback</code> argument with either true or false. Example:</p> <pre><code class="lang-js">fs.exists(&#39;/etc/passwd&#39;, (exists) =&gt; { console.log(exists ? &#39;it\&#39;s there&#39; : &#39;no passwd!&#39;); }); </code></pre> <p><code>fs.exists()</code> should not be used to check if a file exists before calling <code>fs.open()</code>. Doing so introduces a race condition since other processes may change the file&#39;s state between the two calls. Instead, user code should call <code>fs.open()</code> directly and handle the error raised if the file is non-existent.</p> <h2>fs.existsSync(path)<span><a class="mark" href="#fs_fs_existssync_path" id="fs_fs_existssync_path">#</a></span></h2> <pre class="api_stability api_stability_0">Stability: 0 - Deprecated: Use <a href="#fs_fs_statsync_path"><code>fs.statSync()</code></a> or <a href="#fs_fs_accesssync_path_mode"><code>fs.accessSync()</code></a> instead.</pre><div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous version of <a href="fs.html#fs_fs_exists_path_callback"><code>fs.exists()</code></a>. Returns <code>true</code> if the file exists, <code>false</code> otherwise.</p> <h2>fs.fchmod(fd, mode, callback)<span><a class="mark" href="#fs_fs_fchmod_fd_mode_callback" id="fs_fs_fchmod_fd_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fchmod.2.html">fchmod(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.fchmodSync(fd, mode)<span><a class="mark" href="#fs_fs_fchmodsync_fd_mode" id="fs_fs_fchmodsync_fd_mode">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fchmod.2.html">fchmod(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.fchown(fd, uid, gid, callback)<span><a class="mark" href="#fs_fs_fchown_fd_uid_gid_callback" id="fs_fs_fchown_fd_uid_gid_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fchown.2.html">fchown(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.fchownSync(fd, uid, gid)<span><a class="mark" href="#fs_fs_fchownsync_fd_uid_gid" id="fs_fs_fchownsync_fd_uid_gid">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fchown.2.html">fchown(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.fdatasync(fd, callback)<span><a class="mark" href="#fs_fs_fdatasync_fd_callback" id="fs_fs_fdatasync_fd_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fdatasync.2.html">fdatasync(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.fdatasyncSync(fd)<span><a class="mark" href="#fs_fs_fdatasyncsync_fd" id="fs_fs_fdatasyncsync_fd">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fdatasync.2.html">fdatasync(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.fstat(fd, callback)<span><a class="mark" href="#fs_fs_fstat_fd_callback" id="fs_fs_fstat_fd_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fstat.2.html">fstat(2)</a>. The callback gets two arguments <code>(err, stats)</code> where <code>stats</code> is a <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object. <code>fstat()</code> is identical to <a href="fs.html#fs_fs_stat_path_callback"><code>stat()</code></a>, except that the file to be stat-ed is specified by the file descriptor <code>fd</code>.</p> <h2>fs.fstatSync(fd)<span><a class="mark" href="#fs_fs_fstatsync_fd" id="fs_fs_fstatsync_fd">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fstat.2.html">fstat(2)</a>. Returns an instance of <code>fs.Stats</code>.</p> <h2>fs.fsync(fd, callback)<span><a class="mark" href="#fs_fs_fsync_fd_callback" id="fs_fs_fsync_fd_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/fsync.2.html">fsync(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.fsyncSync(fd)<span><a class="mark" href="#fs_fs_fsyncsync_fd" id="fs_fs_fsyncsync_fd">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/fsync.2.html">fsync(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.ftruncate(fd, len, callback)<span><a class="mark" href="#fs_fs_ftruncate_fd_len_callback" id="fs_fs_ftruncate_fd_len_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>len</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/ftruncate.2.html">ftruncate(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.ftruncateSync(fd, len)<span><a class="mark" href="#fs_fs_ftruncatesync_fd_len" id="fs_fs_ftruncatesync_fd_len">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>len</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/ftruncate.2.html">ftruncate(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.futimes(fd, atime, mtime, callback)<span><a class="mark" href="#fs_fs_futimes_fd_atime_mtime_callback" id="fs_fs_futimes_fd_atime_mtime_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>atime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mtime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Change the file timestamps of a file referenced by the supplied file descriptor.</p> <h2>fs.futimesSync(fd, atime, mtime)<span><a class="mark" href="#fs_fs_futimessync_fd_atime_mtime" id="fs_fs_futimessync_fd_atime_mtime">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>atime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mtime</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous version of <a href="#fs_fs_futimes_fd_atime_mtime_callback"><code>fs.futimes()</code></a>. Returns <code>undefined</code>.</p> <h2>fs.lchmod(path, mode, callback)<span><a class="mark" href="#fs_fs_lchmod_path_mode_callback" id="fs_fs_lchmod_path_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2">lchmod(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <p>Only available on Mac OS X.</p> <h2>fs.lchmodSync(path, mode)<span><a class="mark" href="#fs_fs_lchmodsync_path_mode" id="fs_fs_lchmodsync_path_mode">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="https://www.freebsd.org/cgi/man.cgi?query=lchmod&sektion=2">lchmod(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.lchown(path, uid, gid, callback)<span><a class="mark" href="#fs_fs_lchown_path_uid_gid_callback" id="fs_fs_lchown_path_uid_gid_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/lchown.2.html">lchown(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.lchownSync(path, uid, gid)<span><a class="mark" href="#fs_fs_lchownsync_path_uid_gid" id="fs_fs_lchownsync_path_uid_gid">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>uid</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>gid</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/lchown.2.html">lchown(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.link(srcpath, dstpath, callback)<span><a class="mark" href="#fs_fs_link_srcpath_dstpath_callback" id="fs_fs_link_srcpath_dstpath_callback">#</a></span></h2> <div class="signature"><ul> <li><code>srcpath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>dstpath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/link.2.html">link(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.linkSync(srcpath, dstpath)<span><a class="mark" href="#fs_fs_linksync_srcpath_dstpath" id="fs_fs_linksync_srcpath_dstpath">#</a></span></h2> <div class="signature"><ul> <li><code>srcpath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>dstpath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/link.2.html">link(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.lstat(path, callback)<span><a class="mark" href="#fs_fs_lstat_path_callback" id="fs_fs_lstat_path_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/lstat.2.html">lstat(2)</a>. The callback gets two arguments <code>(err, stats)</code> where <code>stats</code> is a <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object. <code>lstat()</code> is identical to <code>stat()</code>, except that if <code>path</code> is a symbolic link, then the link itself is stat-ed, not the file that it refers to.</p> <h2>fs.lstatSync(path)<span><a class="mark" href="#fs_fs_lstatsync_path" id="fs_fs_lstatsync_path">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/lstat.2.html">lstat(2)</a>. Returns an instance of <code>fs.Stats</code>.</p> <h2>fs.mkdir(path[, mode], callback)<span><a class="mark" href="#fs_fs_mkdir_path_mode_callback" id="fs_fs_mkdir_path_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/mkdir.2.html">mkdir(2)</a>. No arguments other than a possible exception are given to the completion callback. <code>mode</code> defaults to <code>0o777</code>.</p> <h2>fs.mkdirSync(path[, mode])<span><a class="mark" href="#fs_fs_mkdirsync_path_mode" id="fs_fs_mkdirsync_path_mode">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/mkdir.2.html">mkdir(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.mkdtemp(prefix, callback)<span><a class="mark" href="#fs_fs_mkdtemp_prefix_callback" id="fs_fs_mkdtemp_prefix_callback">#</a></span></h2> <p>Creates a unique temporary directory.</p> <p>Generates six random characters to be appended behind a required <code>prefix</code> to create a unique temporary directory.</p> <p>The created folder path is passed as a string to the callback&#39;s second parameter.</p> <p>Example:</p> <pre><code class="lang-js">fs.mkdtemp(&#39;/tmp/foo-&#39;, (err, folder) =&gt; { console.log(folder); // Prints: /tmp/foo-itXde2 }); </code></pre> <h2>fs.mkdtempSync(template)<span><a class="mark" href="#fs_fs_mkdtempsync_template" id="fs_fs_mkdtempsync_template">#</a></span></h2> <p>The synchronous version of [<code>fs.mkdtemp()</code>][]. Returns the created folder path.</p> <h2>fs.open(path, flags[, mode], callback)<span><a class="mark" href="#fs_fs_open_path_flags_mode_callback" id="fs_fs_open_path_flags_mode_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;Number&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous file open. See <a href="http://man7.org/linux/man-pages/man2/open.2.html">open(2)</a>. <code>flags</code> can be:</p> <ul> <li><p><code>&#39;r&#39;</code> - Open file for reading. An exception occurs if the file does not exist.</p> </li> <li><p><code>&#39;r+&#39;</code> - Open file for reading and writing. An exception occurs if the file does not exist.</p> </li> <li><p><code>&#39;rs+&#39;</code> - Open file for reading and writing in synchronous mode. Instructs the operating system to bypass the local file system cache.</p> <p>This is primarily useful for opening files on NFS mounts as it allows you to skip the potentially stale local cache. It has a very real impact on I/O performance so don&#39;t use this flag unless you need it.</p> <p>Note that this doesn&#39;t turn <code>fs.open()</code> into a synchronous blocking call. If that&#39;s what you want then you should be using <code>fs.openSync()</code></p> </li> <li><p><code>&#39;w&#39;</code> - Open file for writing. The file is created (if it does not exist) or truncated (if it exists).</p> </li> <li><p><code>&#39;wx&#39;</code> - Like <code>&#39;w&#39;</code> but fails if <code>path</code> exists.</p> </li> <li><p><code>&#39;w+&#39;</code> - Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).</p> </li> <li><p><code>&#39;wx+&#39;</code> - Like <code>&#39;w+&#39;</code> but fails if <code>path</code> exists.</p> </li> <li><p><code>&#39;a&#39;</code> - Open file for appending. The file is created if it does not exist.</p> </li> <li><p><code>&#39;ax&#39;</code> - Like <code>&#39;a&#39;</code> but fails if <code>path</code> exists.</p> </li> <li><p><code>&#39;a+&#39;</code> - Open file for reading and appending. The file is created if it does not exist.</p> </li> <li><p><code>&#39;ax+&#39;</code> - Like <code>&#39;a+&#39;</code> but fails if <code>path</code> exists.</p> </li> </ul> <p><code>mode</code> sets the file mode (permission and sticky bits), but only if the file was created. It defaults to <code>0666</code>, readable and writable.</p> <p>The callback gets two arguments <code>(err, fd)</code>.</p> <p>The exclusive flag <code>&#39;x&#39;</code> (<code>O_EXCL</code> flag in <a href="http://man7.org/linux/man-pages/man2/open.2.html">open(2)</a>) ensures that <code>path</code> is newly created. On POSIX systems, <code>path</code> is considered to exist even if it is a symlink to a non-existent file. The exclusive flag may or may not work with network file systems.</p> <p><code>flags</code> can also be a number as documented by <a href="http://man7.org/linux/man-pages/man2/open.2.html">open(2)</a>; commonly used constants are available from <code>require(&#39;constants&#39;)</code>. On Windows, flags are translated to their equivalent ones where applicable, e.g. <code>O_WRONLY</code> to <code>FILE_GENERIC_WRITE</code>, or <code>O_EXCL|O_CREAT</code> to <code>CREATE_NEW</code>, as accepted by CreateFileW.</p> <p>On Linux, positional writes don&#39;t work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file.</p> <p><em>Note: The behavior of <code>fs.open()</code> is platform specific for some flags. As such, opening a directory on OS X and Linux with the <code>&#39;a+&#39;</code> flag - see example below - will return an error. In contrast, on Windows and FreeBSD, a file descriptor will be returned.</em></p> <pre><code class="lang-js">// OS X and Linux fs.open(&#39;&lt;directory&gt;&#39;, &#39;a+&#39;, (err, fd) =&gt; { // =&gt; [Error: EISDIR: illegal operation on a directory, open &lt;directory&gt;] }) // Windows and FreeBSD fs.open(&#39;&lt;directory&gt;&#39;, &#39;a+&#39;, (err, fd) =&gt; { // =&gt; null, &lt;fd&gt; }) </code></pre> <h2>fs.openSync(path, flags[, mode])<span><a class="mark" href="#fs_fs_opensync_path_flags_mode" id="fs_fs_opensync_path_flags_mode">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>flags</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&lt;Number&gt;</a></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous version of <a href="#fs_fs_open_path_flags_mode_callback"><code>fs.open()</code></a>. Returns an integer representing the file descriptor.</p> <h2>fs.read(fd, buffer, offset, length, position, callback)<span><a class="mark" href="#fs_fs_read_fd_buffer_offset_length_position_callback" id="fs_fs_read_fd_buffer_offset_length_position_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>buffer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>offset</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>length</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Read data from the file specified by <code>fd</code>.</p> <p><code>buffer</code> is the buffer that the data will be written to.</p> <p><code>offset</code> is the offset in the buffer to start writing at.</p> <p><code>length</code> is an integer specifying the number of bytes to read.</p> <p><code>position</code> is an integer specifying where to begin reading from in the file. If <code>position</code> is <code>null</code>, data will be read from the current file position.</p> <p>The callback is given the three arguments, <code>(err, bytesRead, buffer)</code>.</p> <h2>fs.readdir(path[, options], callback)<span><a class="mark" href="#fs_fs_readdir_path_options_callback" id="fs_fs_readdir_path_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man3/readdir.3.html">readdir(3)</a>. Reads the contents of a directory. The callback gets two arguments <code>(err, files)</code> where <code>files</code> is an array of the names of the files in the directory excluding <code>&#39;.&#39;</code> and <code>&#39;..&#39;</code>.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the filenames passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the filenames returned will be passed as <code>Buffer</code> objects.</p> <h2>fs.readdirSync(path[, options])<span><a class="mark" href="#fs_fs_readdirsync_path_options" id="fs_fs_readdirsync_path_options">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man3/readdir.3.html">readdir(3)</a>. Returns an array of filenames excluding <code>&#39;.&#39;</code> and <code>&#39;..&#39;</code>.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the filenames passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the filenames returned will be passed as <code>Buffer</code> objects.</p> <h2>fs.readFile(file[, options], callback)<span><a class="mark" href="#fs_fs_readfile_file_options_callback" id="fs_fs_readfile_file_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <span class="type">&lt;Integer&gt;</span> filename or file descriptor</li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>null</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;r&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronously reads the entire contents of a file. Example:</p> <pre><code class="lang-js">fs.readFile(&#39;/etc/passwd&#39;, (err, data) =&gt; { if (err) throw err; console.log(data); }); </code></pre> <p>The callback is passed two arguments <code>(err, data)</code>, where <code>data</code> is the contents of the file.</p> <p>If no encoding is specified, then the raw buffer is returned.</p> <p>If <code>options</code> is a string, then it specifies the encoding. Example:</p> <pre><code class="lang-js">fs.readFile(&#39;/etc/passwd&#39;, &#39;utf8&#39;, callback); </code></pre> <p>Any specified file descriptor has to support reading.</p> <p><em>Note: Specified file descriptors will not be closed automatically.</em></p> <h2>fs.readFileSync(file[, options])<span><a class="mark" href="#fs_fs_readfilesync_file_options" id="fs_fs_readfilesync_file_options">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <span class="type">&lt;Integer&gt;</span> filename or file descriptor</li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>null</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;r&#39;</code></li> </ul> </li> </ul> </div><p>Synchronous version of <a href="#fs_fs_readfile_file_options_callback"><code>fs.readFile</code></a>. Returns the contents of the <code>file</code>.</p> <p>If the <code>encoding</code> option is specified then this function returns a string. Otherwise it returns a buffer.</p> <h2>fs.readlink(path[, options], callback)<span><a class="mark" href="#fs_fs_readlink_path_options_callback" id="fs_fs_readlink_path_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/readlink.2.html">readlink(2)</a>. The callback gets two arguments <code>(err, linkString)</code>.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the link path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the link path returned will be passed as a <code>Buffer</code> object.</p> <h2>fs.readlinkSync(path[, options])<span><a class="mark" href="#fs_fs_readlinksync_path_options" id="fs_fs_readlinksync_path_options">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/readlink.2.html">readlink(2)</a>. Returns the symbolic link&#39;s string value.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the link path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the link path returned will be passed as a <code>Buffer</code> object.</p> <h2>fs.readSync(fd, buffer, offset, length, position)<span><a class="mark" href="#fs_fs_readsync_fd_buffer_offset_length_position" id="fs_fs_readsync_fd_buffer_offset_length_position">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>buffer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>offset</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>length</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous version of <a href="#fs_fs_read_fd_buffer_offset_length_position_callback"><code>fs.read()</code></a>. Returns the number of <code>bytesRead</code>.</p> <h2>fs.realpath(path[, options], callback)<span><a class="mark" href="#fs_fs_realpath_path_options_callback" id="fs_fs_realpath_path_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man3/realpath.3.html">realpath(3)</a>. The <code>callback</code> gets two arguments <code>(err, resolvedPath)</code>. May use <code>process.cwd</code> to resolve relative paths.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the path returned will be passed as a <code>Buffer</code> object.</p> <h2>fs.realpathSync(path[, options])<span><a class="mark" href="#fs_fs_realpathsync_path_options" id="fs_fs_realpathsync_path_options">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a>;</li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;utf8&#39;</code></li> </ul> </li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man3/realpath.3.html">realpath(3)</a>. Returns the resolved path.</p> <p>The optional <code>options</code> argument can be a string specifying an encoding, or an object with an <code>encoding</code> property specifying the character encoding to use for the path passed to the callback. If the <code>encoding</code> is set to <code>&#39;buffer&#39;</code>, the path returned will be passed as a <code>Buffer</code> object.</p> <h2>fs.rename(oldPath, newPath, callback)<span><a class="mark" href="#fs_fs_rename_oldpath_newpath_callback" id="fs_fs_rename_oldpath_newpath_callback">#</a></span></h2> <div class="signature"><ul> <li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/rename.2.html">rename(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.renameSync(oldPath, newPath)<span><a class="mark" href="#fs_fs_renamesync_oldpath_newpath" id="fs_fs_renamesync_oldpath_newpath">#</a></span></h2> <div class="signature"><ul> <li><code>oldPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>newPath</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/rename.2.html">rename(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.rmdir(path, callback)<span><a class="mark" href="#fs_fs_rmdir_path_callback" id="fs_fs_rmdir_path_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/rmdir.2.html">rmdir(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.rmdirSync(path)<span><a class="mark" href="#fs_fs_rmdirsync_path" id="fs_fs_rmdirsync_path">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/rmdir.2.html">rmdir(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.stat(path, callback)<span><a class="mark" href="#fs_fs_stat_path_callback" id="fs_fs_stat_path_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/stat.2.html">stat(2)</a>. The callback gets two arguments <code>(err, stats)</code> where <code>stats</code> is a <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> object. See the <a href="#fs_class_fs_stats"><code>fs.Stats</code></a> section for more information.</p> <h2>fs.statSync(path)<span><a class="mark" href="#fs_fs_statsync_path" id="fs_fs_statsync_path">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/stat.2.html">stat(2)</a>. Returns an instance of <a href="#fs_class_fs_stats"><code>fs.Stats</code></a>.</p> <h2>fs.symlink(target, path[, type], callback)<span><a class="mark" href="#fs_fs_symlink_target_path_type_callback" id="fs_fs_symlink_target_path_type_callback">#</a></span></h2> <div class="signature"><ul> <li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/symlink.2.html">symlink(2)</a>. No arguments other than a possible exception are given to the completion callback. The <code>type</code> argument can be set to <code>&#39;dir&#39;</code>, <code>&#39;file&#39;</code>, or <code>&#39;junction&#39;</code> (default is <code>&#39;file&#39;</code>) and is only available on Windows (ignored on other platforms). Note that Windows junction points require the destination path to be absolute. When using <code>&#39;junction&#39;</code>, the <code>target</code> argument will automatically be normalized to absolute path.</p> <p>Here is an example below:</p> <pre><code class="lang-js">fs.symlink(&#39;./foo&#39;, &#39;./new-port&#39;); </code></pre> <p>It creates a symbolic link named &quot;new-port&quot; that points to &quot;foo&quot;.</p> <h2>fs.symlinkSync(target, path[, type])<span><a class="mark" href="#fs_fs_symlinksync_target_path_type" id="fs_fs_symlinksync_target_path_type">#</a></span></h2> <div class="signature"><ul> <li><code>target</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/symlink.2.html">symlink(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.truncate(path, len, callback)<span><a class="mark" href="#fs_fs_truncate_path_len_callback" id="fs_fs_truncate_path_len_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>len</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/truncate.2.html">truncate(2)</a>. No arguments other than a possible exception are given to the completion callback. A file descriptor can also be passed as the first argument. In this case, <code>fs.ftruncate()</code> is called.</p> <h2>fs.truncateSync(path, len)<span><a class="mark" href="#fs_fs_truncatesync_path_len" id="fs_fs_truncatesync_path_len">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>len</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/truncate.2.html">truncate(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.unlink(path, callback)<span><a class="mark" href="#fs_fs_unlink_path_callback" id="fs_fs_unlink_path_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronous <a href="http://man7.org/linux/man-pages/man2/unlink.2.html">unlink(2)</a>. No arguments other than a possible exception are given to the completion callback.</p> <h2>fs.unlinkSync(path)<span><a class="mark" href="#fs_fs_unlinksync_path" id="fs_fs_unlinksync_path">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> </ul> </div><p>Synchronous <a href="http://man7.org/linux/man-pages/man2/unlink.2.html">unlink(2)</a>. Returns <code>undefined</code>.</p> <h2>fs.unwatchFile(filename[, listener])<span><a class="mark" href="#fs_fs_unwatchfile_filename_listener" id="fs_fs_unwatchfile_filename_listener">#</a></span></h2> <div class="signature"><ul> <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Stop watching for changes on <code>filename</code>. If <code>listener</code> is specified, only that particular listener is removed. Otherwise, <em>all</em> listeners are removed and you have effectively stopped watching <code>filename</code>.</p> <p>Calling <code>fs.unwatchFile()</code> with a filename that is not being watched is a no-op, not an error.</p> <p><em>Note: <a href="#fs_fs_watch_filename_options_listener"><code>fs.watch()</code></a> is more efficient than <code>fs.watchFile()</code> and <code>fs.unwatchFile()</code>. <code>fs.watch()</code> should be used instead of <code>fs.watchFile()</code> and <code>fs.unwatchFile()</code> when possible.</em></p> <h2>fs.utimes(path, atime, mtime, callback)<span><a class="mark" href="#fs_fs_utimes_path_atime_mtime_callback" id="fs_fs_utimes_path_atime_mtime_callback">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>atime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mtime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Change file timestamps of the file referenced by the supplied path.</p> <p>Note: the arguments <code>atime</code> and <code>mtime</code> of the following related functions does follow the below rules:</p> <ul> <li>If the value is a numberable string like <code>&#39;123456789&#39;</code>, the value would get converted to corresponding number.</li> <li>If the value is <code>NaN</code> or <code>Infinity</code>, the value would get converted to <code>Date.now()</code>.</li> </ul> <h2>fs.utimesSync(path, atime, mtime)<span><a class="mark" href="#fs_fs_utimessync_path_atime_mtime" id="fs_fs_utimessync_path_atime_mtime">#</a></span></h2> <div class="signature"><ul> <li><code>path</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>atime</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>mtime</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><p>Synchronous version of <a href="#fs_fs_futimes_fd_atime_mtime_callback"><code>fs.utimes()</code></a>. Returns <code>undefined</code>.</p> <h2>fs.watch(filename[, options][, listener])<span><a class="mark" href="#fs_fs_watch_filename_options_listener" id="fs_fs_watch_filename_options_listener">#</a></span></h2> <div class="signature"><ul> <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>persistent</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;Boolean&gt;</a> Indicates whether the process should continue to run as long as files are being watched. default = <code>true</code></li> <li><code>recursive</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;Boolean&gt;</a> Indicates whether all subdirectories should be watched, or only the current directory. The applies when a directory is specified, and only on supported platforms (See <a href="#fs_caveats">Caveats</a>). default = <code>false</code></li> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> Specifies the character encoding to be used for the filename passed to the listener. default = <code>&#39;utf8&#39;</code></li> </ul> </li> <li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Watch for changes on <code>filename</code>, where <code>filename</code> is either a file or a directory. The returned object is a <a href="#fs_class_fs_fswatcher"><code>fs.FSWatcher</code></a>.</p> <p>The second argument is optional. If <code>options</code> is provided as a string, it specifies the <code>encoding</code>. Otherwise <code>options</code> should be passed as an object.</p> <p>The listener callback gets two arguments <code>(event, filename)</code>. <code>event</code> is either <code>&#39;rename&#39;</code> or <code>&#39;change&#39;</code>, and <code>filename</code> is the name of the file which triggered the event.</p> <h3>Caveats<span><a class="mark" href="#fs_caveats" id="fs_caveats">#</a></span></h3> <!--type=misc--> <p>The <code>fs.watch</code> API is not 100% consistent across platforms, and is unavailable in some situations.</p> <p>The recursive option is only supported on OS X and Windows.</p> <h4>Availability<span><a class="mark" href="#fs_availability" id="fs_availability">#</a></span></h4> <!--type=misc--> <p>This feature depends on the underlying operating system providing a way to be notified of filesystem changes.</p> <ul> <li>On Linux systems, this uses <code>inotify</code>.</li> <li>On BSD systems, this uses <code>kqueue</code>.</li> <li>On OS X, this uses <code>kqueue</code> for files and &#39;FSEvents&#39; for directories.</li> <li>On SunOS systems (including Solaris and SmartOS), this uses <code>event ports</code>.</li> <li>On Windows systems, this feature depends on <code>ReadDirectoryChangesW</code>.</li> </ul> <p>If the underlying functionality is not available for some reason, then <code>fs.watch</code> will not be able to function. For example, watching files or directories on network file systems (NFS, SMB, etc.) often doesn&#39;t work reliably or at all.</p> <p>You can still use <code>fs.watchFile</code>, which uses stat polling, but it is slower and less reliable.</p> <h4>Inodes<span><a class="mark" href="#fs_inodes" id="fs_inodes">#</a></span></h4> <!--type=misc--> <p>On Linux and OS X systems, <code>fs.watch()</code> resolves the path to an <a href="http://www.linux.org/threads/intro-to-inodes.4130">inode</a> and watches the inode. If the watched path is deleted and recreated, it is assigned a new inode. The watch will emit an event for the delete but will continue watching the <em>original</em> inode. Events for the new inode will not be emitted. This is expected behavior.</p> <h4>Filename Argument<span><a class="mark" href="#fs_filename_argument" id="fs_filename_argument">#</a></span></h4> <!--type=misc--> <p>Providing <code>filename</code> argument in the callback is only supported on Linux and Windows. Even on supported platforms, <code>filename</code> is not always guaranteed to be provided. Therefore, don&#39;t assume that <code>filename</code> argument is always provided in the callback, and have some fallback logic if it is null.</p> <pre><code class="lang-js">fs.watch(&#39;somedir&#39;, (event, filename) =&gt; { console.log(`event is: ${event}`); if (filename) { console.log(`filename provided: ${filename}`); } else { console.log(&#39;filename not provided&#39;); } }); </code></pre> <h2>fs.watchFile(filename[, options], listener)<span><a class="mark" href="#fs_fs_watchfile_filename_options_listener" id="fs_fs_watchfile_filename_options_listener">#</a></span></h2> <div class="signature"><ul> <li><code>filename</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a><ul> <li><code>persistent</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&lt;Boolean&gt;</a></li> <li><code>interval</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </li> <li><code>listener</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Watch for changes on <code>filename</code>. The callback <code>listener</code> will be called each time the file is accessed.</p> <p>The <code>options</code> argument may be omitted. If provided, it should be an object. The <code>options</code> object may contain a boolean named <code>persistent</code> that indicates whether the process should continue to run as long as files are being watched. The <code>options</code> object may specify an <code>interval</code> property indicating how often the target should be polled in milliseconds. The default is <code>{ persistent: true, interval: 5007 }</code>.</p> <p>The <code>listener</code> gets two arguments the current stat object and the previous stat object:</p> <pre><code class="lang-js">fs.watchFile(&#39;message.text&#39;, (curr, prev) =&gt; { console.log(`the current mtime is: ${curr.mtime}`); console.log(`the previous mtime was: ${prev.mtime}`); }); </code></pre> <p>These stat objects are instances of <code>fs.Stat</code>.</p> <p>If you want to be notified when the file was modified, not just accessed, you need to compare <code>curr.mtime</code> and <code>prev.mtime</code>.</p> <p><em>Note: when an <code>fs.watchFile</code> operation results in an <code>ENOENT</code> error, it will invoke the listener once, with all the fields zeroed (or, for dates, the Unix Epoch). In Windows, <code>blksize</code> and <code>blocks</code> fields will be <code>undefined</code>, instead of zero. If the file is created later on, the listener will be called again, with the latest stat objects. This is a change in functionality since v0.10.</em></p> <p><em>Note: <a href="#fs_fs_watch_filename_options_listener"><code>fs.watch()</code></a> is more efficient than <code>fs.watchFile</code> and <code>fs.unwatchFile</code>. <code>fs.watch</code> should be used instead of <code>fs.watchFile</code> and <code>fs.unwatchFile</code> when possible.</em></p> <h2>fs.write(fd, buffer, offset, length[, position], callback)<span><a class="mark" href="#fs_fs_write_fd_buffer_offset_length_position_callback" id="fs_fs_write_fd_buffer_offset_length_position_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>buffer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>offset</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>length</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Write <code>buffer</code> to the file specified by <code>fd</code>.</p> <p><code>offset</code> and <code>length</code> determine the part of the buffer to be written.</p> <p><code>position</code> refers to the offset from the beginning of the file where this data should be written. If <code>typeof position !== &#39;number&#39;</code>, the data will be written at the current position. See <a href="http://man7.org/linux/man-pages/man2/pwrite.2.html">pwrite(2)</a>.</p> <p>The callback will be given three arguments <code>(err, written, buffer)</code> where <code>written</code> specifies how many <em>bytes</em> were written from <code>buffer</code>.</p> <p>Note that it is unsafe to use <code>fs.write</code> multiple times on the same file without waiting for the callback. For this scenario, <code>fs.createWriteStream</code> is strongly recommended.</p> <p>On Linux, positional writes don&#39;t work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file.</p> <h2>fs.write(fd, data[, position[, encoding]], callback)<span><a class="mark" href="#fs_fs_write_fd_data_position_encoding_callback" id="fs_fs_write_fd_data_position_encoding_callback">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Write <code>data</code> to the file specified by <code>fd</code>. If <code>data</code> is not a Buffer instance then the value will be coerced to a string.</p> <p><code>position</code> refers to the offset from the beginning of the file where this data should be written. If <code>typeof position !== &#39;number&#39;</code> the data will be written at the current position. See <a href="http://man7.org/linux/man-pages/man2/pwrite.2.html">pwrite(2)</a>.</p> <p><code>encoding</code> is the expected string encoding.</p> <p>The callback will receive the arguments <code>(err, written, string)</code> where <code>written</code> specifies how many <em>bytes</em> the passed string required to be written. Note that bytes written is not the same as string characters. See <a href="buffer.html#buffer_class_method_buffer_bytelength_string_encoding"><code>Buffer.byteLength</code></a>.</p> <p>Unlike when writing <code>buffer</code>, the entire string must be written. No substring may be specified. This is because the byte offset of the resulting data may not be the same as the string offset.</p> <p>Note that it is unsafe to use <code>fs.write</code> multiple times on the same file without waiting for the callback. For this scenario, <code>fs.createWriteStream</code> is strongly recommended.</p> <p>On Linux, positional writes don&#39;t work when the file is opened in append mode. The kernel ignores the position argument and always appends the data to the end of the file.</p> <h2>fs.writeFile(file, data[, options], callback)<span><a class="mark" href="#fs_fs_writefile_file_data_options_callback" id="fs_fs_writefile_file_data_options_callback">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <span class="type">&lt;Integer&gt;</span> filename or file descriptor</li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>&#39;utf8&#39;</code></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span> default = <code>0o666</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;w&#39;</code></li> </ul> </li> <li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&lt;Function&gt;</a></li> </ul> </div><p>Asynchronously writes data to a file, replacing the file if it already exists. <code>data</code> can be a string or a buffer.</p> <p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer. It defaults to <code>&#39;utf8&#39;</code>.</p> <p>Example:</p> <pre><code class="lang-js">fs.writeFile(&#39;message.txt&#39;, &#39;Hello Node.js&#39;, (err) =&gt; { if (err) throw err; console.log(&#39;It\&#39;s saved!&#39;); }); </code></pre> <p>If <code>options</code> is a string, then it specifies the encoding. Example:</p> <pre><code class="lang-js">fs.writeFile(&#39;message.txt&#39;, &#39;Hello Node.js&#39;, &#39;utf8&#39;, callback); </code></pre> <p>Any specified file descriptor has to support writing.</p> <p>Note that it is unsafe to use <code>fs.writeFile</code> multiple times on the same file without waiting for the callback. For this scenario, <code>fs.createWriteStream</code> is strongly recommended.</p> <p><em>Note: Specified file descriptors will not be closed automatically.</em></p> <h2>fs.writeFileSync(file, data[, options])<span><a class="mark" href="#fs_fs_writefilesync_file_data_options" id="fs_fs_writefilesync_file_data_options">#</a></span></h2> <div class="signature"><ul> <li><code>file</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a> | <span class="type">&lt;Integer&gt;</span> filename or file descriptor</li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>options</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&lt;Object&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a><ul> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Null_type" class="type">&lt;Null&gt;</a> default = <code>&#39;utf8&#39;</code></li> <li><code>mode</code> <span class="type">&lt;Integer&gt;</span> default = <code>0o666</code></li> <li><code>flag</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> default = <code>&#39;w&#39;</code></li> </ul> </li> </ul> </div><p>The synchronous version of <a href="#fs_fs_writefile_file_data_options_callback"><code>fs.writeFile()</code></a>. Returns <code>undefined</code>.</p> <h2>fs.writeSync(fd, buffer, offset, length[, position])<span><a class="mark" href="#fs_fs_writesync_fd_buffer_offset_length_position" id="fs_fs_writesync_fd_buffer_offset_length_position">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>buffer</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>offset</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>length</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> </ul> </div><h2>fs.writeSync(fd, data[, position[, encoding]])<span><a class="mark" href="#fs_fs_writesync_fd_data_position_encoding" id="fs_fs_writesync_fd_data_position_encoding">#</a></span></h2> <div class="signature"><ul> <li><code>fd</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>data</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a> | <a href="buffer.html#buffer_class_buffer" class="type">&lt;Buffer&gt;</a></li> <li><code>position</code> <span class="type">&lt;Integer&gt;</span></li> <li><code>encoding</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&lt;String&gt;</a></li> </ul> </div><p>Synchronous versions of <a href="#fs_fs_write_fd_buffer_offset_length_position_callback"><code>fs.write()</code></a>. Returns the number of bytes written.</p> </div> </div> </div> <script src="assets/sh_main.js"></script> <script src="assets/sh_javascript.min.js"></script> <script>highlight(undefined, undefined, 'pre');</script> </body> </html>
huahouye/nodejs-API_zh
api_en/fs.html
HTML
mit
114,408
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 2516, 1028, 5371, 2291, 13045, 1012, 1046, 201...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/******************************************************************************* * KindEditor - WYSIWYG HTML Editor for Internet * Copyright (C) 2006-2011 kindsoft.net * * @author Roddy <luolonghao@gmail.com> * @site http://www.kindsoft.net/ * @licence http://www.kindsoft.net/license.php *******************************************************************************/ // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5 KindEditor.plugin('baidumap', function (K) { var self = this, name = 'baidumap', lang = self.lang(name + '.'); var mapWidth = K.undef(self.mapWidth, 558); var mapHeight = K.undef(self.mapHeight, 360); self.clickToolbar(name, function () { var html = ['<div style="padding:10px 20px;">', '<div class="ke-header">', // left start '<div class="ke-left">', lang.address + ' <input id="kindeditor_plugin_map_address" name="address" class="ke-input-text" value="" style="width:200px;" /> ', '<span class="ke-button-common ke-button-outer">', '<input type="button" name="searchBtn" class="ke-button-common ke-button" value="' + lang.search + '" />', '</span>', '</div>', // right start '<div class="ke-right">', '<input type="checkbox" id="keInsertDynamicMap" name="insertDynamicMap" value="1" /> <label for="keInsertDynamicMap">' + lang.insertDynamicMap + '</label>', '</div>', '<div class="ke-clearfix"></div>', '</div>', '<div class="ke-map" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></div>', '</div>'].join(''); var dialog = self.createDialog({ name: name, width: mapWidth + 42, title: self.lang(name), body: html, yesBtn: { name: self.lang('yes'), click: function (e) { var map = win.map; var centerObj = map.getCenter(); var center = centerObj.lng + ',' + centerObj.lat; var zoom = map.getZoom(); var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage', '?center=' + encodeURIComponent(center), '&zoom=' + encodeURIComponent(zoom), '&width=' + mapWidth, '&height=' + mapHeight, '&markers=' + encodeURIComponent(center), '&markerStyles=' + encodeURIComponent('l,A')].join(''); if (checkbox[0].checked) { self.insertHtml('<iframe src="' + url + '" frameborder="0" style="width:' + (mapWidth + 2) + 'px;height:' + (mapHeight + 2) + 'px;"></iframe>'); } else { self.exec('insertimage', url); } self.hideDialog().focus(); } }, beforeRemove: function () { searchBtn.remove(); if (doc) { doc.write(''); } iframe.remove(); } }); var div = dialog.div, addressBox = K('[name="address"]', div), searchBtn = K('[name="searchBtn"]', div), checkbox = K('[name="insertDynamicMap"]', dialog.div), win, doc; var iframe = K('<iframe class="ke-textarea" frameborder="0" src="' + self.pluginsPath + 'baidumap/map.html" style="width:' + mapWidth + 'px;height:' + mapHeight + 'px;"></iframe>'); function ready() { win = iframe[0].contentWindow; doc = K.iframeDoc(iframe); } iframe.bind('load', function () { iframe.unbind('load'); if (K.IE) { ready(); } else { setTimeout(ready, 0); } }); K('.ke-map', div).replaceWith(iframe); // search map searchBtn.click(function () { win.search(addressBox.val()); }); }); });
329221391/home
web/plus/kindeditor-4.1.10/plugins/baidumap/baidumap.js
JavaScript
bsd-3-clause
4,209
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// See https://aka.ms/new-console-template for more information return 0;
dsyme/fsharp
src/fsharp/Microsoft.FSharp.Compiler/Program.cs
C#
mit
76
[ 30522, 1013, 1013, 2156, 16770, 1024, 1013, 1013, 9875, 1012, 5796, 1013, 2047, 1011, 10122, 1011, 23561, 2005, 2062, 2592, 2709, 1014, 1025, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package models import ( "errors" "fmt" "strings" ) const ownerTeamName = "Owners" // Team represents a organization team. type Team struct { ID int64 `xorm:"pk autoincr"` OrgID int64 `xorm:"INDEX"` LowerName string Name string Description string Authorize AccessMode Repos []*Repository `xorm:"-"` Members []*User `xorm:"-"` NumRepos int NumMembers int } // IsOwnerTeam returns true if team is owner team. func (t *Team) IsOwnerTeam() bool { return t.Name == ownerTeamName } // IsMember returns true if given user is a member of team. func (t *Team) IsMember(userID int64) bool { return IsTeamMember(t.OrgID, t.ID, userID) } func (t *Team) getRepositories(e Engine) error { return e.Join("INNER", "team_repo", "repository.id = team_repo.repo_id"). Where("team_repo.team_id=?", t.ID).Find(&t.Repos) } // GetRepositories returns all repositories in team of organization. func (t *Team) GetRepositories() error { return t.getRepositories(x) } func (t *Team) getMembers(e Engine) (err error) { t.Members, err = getTeamMembers(e, t.ID) return err } // GetMembers returns all members in team of organization. func (t *Team) GetMembers() (err error) { return t.getMembers(x) } // AddMember adds new membership of the team to the organization, // the user will have membership to the organization automatically when needed. func (t *Team) AddMember(userID int64) error { return AddTeamMember(t, userID) } // RemoveMember removes member from team of organization. func (t *Team) RemoveMember(userID int64) error { return RemoveTeamMember(t, userID) } func (t *Team) hasRepository(e Engine, repoID int64) bool { return hasTeamRepo(e, t.OrgID, t.ID, repoID) } // HasRepository returns true if given repository belong to team. func (t *Team) HasRepository(repoID int64) bool { return t.hasRepository(x, repoID) } func (t *Team) addRepository(e Engine, repo *Repository) (err error) { if err = addTeamRepo(e, t.OrgID, t.ID, repo.ID); err != nil { return err } t.NumRepos++ if _, err = e.Id(t.ID).AllCols().Update(t); err != nil { return fmt.Errorf("update team: %v", err) } if err = repo.recalculateTeamAccesses(e, 0); err != nil { return fmt.Errorf("recalculateAccesses: %v", err) } if err = t.getMembers(e); err != nil { return fmt.Errorf("getMembers: %v", err) } for _, u := range t.Members { if err = watchRepo(e, u.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) } } return nil } // AddRepository adds new repository to team of organization. func (t *Team) AddRepository(repo *Repository) (err error) { if repo.OwnerID != t.OrgID { return errors.New("Repository does not belong to organization") } else if t.HasRepository(repo.ID) { return nil } sess := x.NewSession() defer sessionRelease(sess) if err = sess.Begin(); err != nil { return err } if err = t.addRepository(sess, repo); err != nil { return err } return sess.Commit() } func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (err error) { if err = removeTeamRepo(e, t.ID, repo.ID); err != nil { return err } t.NumRepos-- if _, err = e.Id(t.ID).AllCols().Update(t); err != nil { return err } // Don't need to recalculate when delete a repository from organization. if recalculate { if err = repo.recalculateTeamAccesses(e, t.ID); err != nil { return err } } if err = t.getMembers(e); err != nil { return fmt.Errorf("get team members: %v", err) } for _, u := range t.Members { has, err := hasAccess(e, u, repo, AccessModeRead) if err != nil { return err } else if has { continue } if err = watchRepo(e, u.ID, repo.ID, false); err != nil { return err } } return nil } // RemoveRepository removes repository from team of organization. func (t *Team) RemoveRepository(repoID int64) error { if !t.HasRepository(repoID) { return nil } repo, err := GetRepositoryByID(repoID) if err != nil { return err } sess := x.NewSession() defer sessionRelease(sess) if err = sess.Begin(); err != nil { return err } if err = t.removeRepository(sess, repo, true); err != nil { return err } return sess.Commit() } // IsUsableTeamName tests if a name could be as team name func IsUsableTeamName(name string) error { switch name { case "new": return ErrNameReserved{name} default: return nil } } // NewTeam creates a record of new team. // It's caller's responsibility to assign organization ID. func NewTeam(t *Team) (err error) { if len(t.Name) == 0 { return errors.New("empty team name") } if err = IsUsableTeamName(t.Name); err != nil { return err } has, err := x.Id(t.OrgID).Get(new(User)) if err != nil { return err } else if !has { return ErrOrgNotExist } t.LowerName = strings.ToLower(t.Name) has, err = x. Where("org_id=?", t.OrgID). And("lower_name=?", t.LowerName). Get(new(Team)) if err != nil { return err } else if has { return ErrTeamAlreadyExist{t.OrgID, t.LowerName} } sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } if _, err = sess.Insert(t); err != nil { sess.Rollback() return err } // Update organization number of teams. if _, err = sess.Exec("UPDATE `user` SET num_teams=num_teams+1 WHERE id = ?", t.OrgID); err != nil { sess.Rollback() return err } return sess.Commit() } func getTeam(e Engine, orgID int64, name string) (*Team, error) { t := &Team{ OrgID: orgID, LowerName: strings.ToLower(name), } has, err := e.Get(t) if err != nil { return nil, err } else if !has { return nil, ErrTeamNotExist } return t, nil } // GetTeam returns team by given team name and organization. func GetTeam(orgID int64, name string) (*Team, error) { return getTeam(x, orgID, name) } func getTeamByID(e Engine, teamID int64) (*Team, error) { t := new(Team) has, err := e.Id(teamID).Get(t) if err != nil { return nil, err } else if !has { return nil, ErrTeamNotExist } return t, nil } // GetTeamByID returns team by given ID. func GetTeamByID(teamID int64) (*Team, error) { return getTeamByID(x, teamID) } // UpdateTeam updates information of team. func UpdateTeam(t *Team, authChanged bool) (err error) { if len(t.Name) == 0 { return errors.New("empty team name") } if len(t.Description) > 255 { t.Description = t.Description[:255] } sess := x.NewSession() defer sessionRelease(sess) if err = sess.Begin(); err != nil { return err } t.LowerName = strings.ToLower(t.Name) has, err := sess. Where("org_id=?", t.OrgID). And("lower_name=?", t.LowerName). And("id!=?", t.ID). Get(new(Team)) if err != nil { return err } else if has { return ErrTeamAlreadyExist{t.OrgID, t.LowerName} } if _, err = sess.Id(t.ID).AllCols().Update(t); err != nil { return fmt.Errorf("update: %v", err) } // Update access for team members if needed. if authChanged { if err = t.getRepositories(sess); err != nil { return fmt.Errorf("getRepositories: %v", err) } for _, repo := range t.Repos { if err = repo.recalculateTeamAccesses(sess, 0); err != nil { return fmt.Errorf("recalculateTeamAccesses: %v", err) } } } return sess.Commit() } // DeleteTeam deletes given team. // It's caller's responsibility to assign organization ID. func DeleteTeam(t *Team) error { if err := t.GetRepositories(); err != nil { return err } // Get organization. org, err := GetUserByID(t.OrgID) if err != nil { return err } sess := x.NewSession() defer sessionRelease(sess) if err = sess.Begin(); err != nil { return err } // Delete all accesses. for _, repo := range t.Repos { if err = repo.recalculateTeamAccesses(sess, t.ID); err != nil { return err } } // Delete team-repo if _, err = sess. Where("team_id=?", t.ID). Delete(new(TeamRepo)); err != nil { return err } // Delete team-user. if _, err = sess. Where("org_id=?", org.ID). Where("team_id=?", t.ID). Delete(new(TeamUser)); err != nil { return err } // Delete team. if _, err = sess.Id(t.ID).Delete(new(Team)); err != nil { return err } // Update organization number of teams. if _, err = sess.Exec("UPDATE `user` SET num_teams=num_teams-1 WHERE id=?", t.OrgID); err != nil { return err } return sess.Commit() } // ___________ ____ ___ // \__ ___/___ _____ _____ | | \______ ___________ // | |_/ __ \\__ \ / \| | / ___// __ \_ __ \ // | |\ ___/ / __ \| Y Y \ | /\___ \\ ___/| | \/ // |____| \___ >____ /__|_| /______//____ >\___ >__| // \/ \/ \/ \/ \/ // TeamUser represents an team-user relation. type TeamUser struct { ID int64 `xorm:"pk autoincr"` OrgID int64 `xorm:"INDEX"` TeamID int64 `xorm:"UNIQUE(s)"` UID int64 `xorm:"UNIQUE(s)"` } func isTeamMember(e Engine, orgID, teamID, userID int64) bool { has, _ := e. Where("org_id=?", orgID). And("team_id=?", teamID). And("uid=?", userID). Get(new(TeamUser)) return has } // IsTeamMember returns true if given user is a member of team. func IsTeamMember(orgID, teamID, userID int64) bool { return isTeamMember(x, orgID, teamID, userID) } func getTeamMembers(e Engine, teamID int64) (_ []*User, err error) { teamUsers := make([]*TeamUser, 0, 10) if err = e. Where("team_id=?", teamID). Find(&teamUsers); err != nil { return nil, fmt.Errorf("get team-users: %v", err) } members := make([]*User, 0, len(teamUsers)) for i := range teamUsers { member := new(User) if _, err = e.Id(teamUsers[i].UID).Get(member); err != nil { return nil, fmt.Errorf("get user '%d': %v", teamUsers[i].UID, err) } members = append(members, member) } return members, nil } // GetTeamMembers returns all members in given team of organization. func GetTeamMembers(teamID int64) ([]*User, error) { return getTeamMembers(x, teamID) } func getUserTeams(e Engine, orgID, userID int64) (teams []*Team, err error) { return teams, e. Join("INNER", "team_user", "team_user.team_id = team.id"). Where("team.org_id = ?", orgID). And("team_user.uid=?", userID). Find(&teams) } // GetUserTeams returns all teams that user belongs to in given organization. func GetUserTeams(orgID, userID int64) ([]*Team, error) { return getUserTeams(x, orgID, userID) } // AddTeamMember adds new membership of given team to given organization, // the user will have membership to given organization automatically when needed. func AddTeamMember(team *Team, userID int64) error { if IsTeamMember(team.OrgID, team.ID, userID) { return nil } if err := AddOrgUser(team.OrgID, userID); err != nil { return err } // Get team and its repositories. team.NumMembers++ if err := team.GetRepositories(); err != nil { return err } sess := x.NewSession() defer sessionRelease(sess) if err := sess.Begin(); err != nil { return err } if _, err := sess.Insert(&TeamUser{ UID: userID, OrgID: team.OrgID, TeamID: team.ID, }); err != nil { return err } else if _, err := sess.Id(team.ID).Update(team); err != nil { return err } // Give access to team repositories. for _, repo := range team.Repos { if err := repo.recalculateTeamAccesses(sess, 0); err != nil { return err } } // We make sure it exists before. ou := new(OrgUser) if _, err := sess. Where("uid = ?", userID). And("org_id = ?", team.OrgID). Get(ou); err != nil { return err } ou.NumTeams++ if team.IsOwnerTeam() { ou.IsOwner = true } if _, err := sess.Id(ou.ID).AllCols().Update(ou); err != nil { return err } return sess.Commit() } func removeTeamMember(e Engine, team *Team, userID int64) error { if !isTeamMember(e, team.OrgID, team.ID, userID) { return nil } // Check if the user to delete is the last member in owner team. if team.IsOwnerTeam() && team.NumMembers == 1 { return ErrLastOrgOwner{UID: userID} } team.NumMembers-- if err := team.getRepositories(e); err != nil { return err } // Get organization. org, err := getUserByID(e, team.OrgID) if err != nil { return err } if _, err := e.Delete(&TeamUser{ UID: userID, OrgID: team.OrgID, TeamID: team.ID, }); err != nil { return err } else if _, err = e. Id(team.ID). AllCols(). Update(team); err != nil { return err } // Delete access to team repositories. for _, repo := range team.Repos { if err = repo.recalculateTeamAccesses(e, 0); err != nil { return err } } // This must exist. ou := new(OrgUser) _, err = e. Where("uid = ?", userID). And("org_id = ?", org.ID). Get(ou) if err != nil { return err } ou.NumTeams-- if team.IsOwnerTeam() { ou.IsOwner = false } if _, err = e. Id(ou.ID). AllCols(). Update(ou); err != nil { return err } return nil } // RemoveTeamMember removes member from given team of given organization. func RemoveTeamMember(team *Team, userID int64) error { sess := x.NewSession() defer sessionRelease(sess) if err := sess.Begin(); err != nil { return err } if err := removeTeamMember(sess, team, userID); err != nil { return err } return sess.Commit() } // ___________ __________ // \__ ___/___ _____ _____\______ \ ____ ______ ____ // | |_/ __ \\__ \ / \| _// __ \\____ \ / _ \ // | |\ ___/ / __ \| Y Y \ | \ ___/| |_> > <_> ) // |____| \___ >____ /__|_| /____|_ /\___ > __/ \____/ // \/ \/ \/ \/ \/|__| // TeamRepo represents an team-repository relation. type TeamRepo struct { ID int64 `xorm:"pk autoincr"` OrgID int64 `xorm:"INDEX"` TeamID int64 `xorm:"UNIQUE(s)"` RepoID int64 `xorm:"UNIQUE(s)"` } func hasTeamRepo(e Engine, orgID, teamID, repoID int64) bool { has, _ := e. Where("org_id=?", orgID). And("team_id=?", teamID). And("repo_id=?", repoID). Get(new(TeamRepo)) return has } // HasTeamRepo returns true if given repository belongs to team. func HasTeamRepo(orgID, teamID, repoID int64) bool { return hasTeamRepo(x, orgID, teamID, repoID) } func addTeamRepo(e Engine, orgID, teamID, repoID int64) error { _, err := e.InsertOne(&TeamRepo{ OrgID: orgID, TeamID: teamID, RepoID: repoID, }) return err } func removeTeamRepo(e Engine, teamID, repoID int64) error { _, err := e.Delete(&TeamRepo{ TeamID: teamID, RepoID: repoID, }) return err }
willemvd/gitea
models/org_team.go
GO
mit
14,531
[ 30522, 1013, 1013, 9385, 2355, 1996, 2175, 5620, 6048, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 2224, 1997, 2023, 3120, 3642, 2003, 9950, 2011, 1037, 10210, 1011, 2806, 1013, 1013, 6105, 2008, 2064, 2022, 2179, 1999, 1996, 6105, 5371, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Copyright 2015 Santhosh Kumar Tekuri * * The JLibs authors license this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package jlibs.wamp4j.spi; import java.io.InputStream; public interface Listener{ public void onMessage(WAMPSocket socket, MessageType type, InputStream is); public void onReadComplete(WAMPSocket socket); public void readyToWrite(WAMPSocket socket); public void onError(WAMPSocket socket, Throwable error); public void onClose(WAMPSocket socket); }
santhosh-tekuri/jlibs
wamp4j-core/src/main/java/jlibs/wamp4j/spi/Listener.java
Java
apache-2.0
1,010
[ 30522, 1013, 1008, 1008, 1008, 9385, 2325, 15548, 26643, 30524, 1996, 15895, 6105, 1010, 1008, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, 1008, 2007, 1996, 6105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php namespace Hvanoch\Component\DateIntervalParser; class DateIntervalParser { /** @var array */ protected $aliases = array( 'y' => 'y,yr,yrs,year,years', 'm' => 'm,mo,mon,mos,mons,month,months', 'w' => 'w,we,wk,week,weeks', 'd' => 'd,dy,dys,day,days', 'h' => 'h,hr,hrs,hour,hours', 'i' => 'i,min,mins,minute,minutes', 's' => 's,sec,secs,second,seconds' ); /** @var array */ protected $tokens = array(); /** @var \DateInterval */ private $dateTimeInterval; /** * @param array $additionalAliases */ public function __construct($additionalAliases = array()) { $this->mergeAdditionalAliases($additionalAliases); $tokens = array(); foreach ($this->aliases as $key => $aliasConcat) { $aliasList = explode(',', $aliasConcat); foreach ($aliasList as $alias) { $tokens[$alias] = $key; } } $this->tokens = $tokens; } /** * @param $additionalAliases * @throws DateIntervalParseException */ private function mergeAdditionalAliases($additionalAliases) { $aliasKeys = array_keys($this->aliases); foreach ($additionalAliases as $key => $alias) { if (!in_array($key, $aliasKeys)) { throw new DateIntervalParseException(sprintf('Key "%" for aliases "%" is not valid', $key, $alias)); } $this->aliases[$key] .= ',' . str_replace(' ', '', $alias); } } /** * @param $input * @return \DateInterval */ public function parse($input) { $this->dateTimeInterval = new \DateInterval('P0D'); $this->process($input); return $this->dateTimeInterval; } /** * @param string $input */ private function cleanupString(&$input) { $input = trim($input); } /** * @param string $input * @throws DateIntervalParseException */ private function process($input) { $this->cleanupString($input); $this->checkInvert($input); $matches = preg_split("/[\s]+/", $input); foreach ($matches as $match) { $this->processTerm($match); } } /** * @param $input */ private function checkInvert(&$input) { if (substr($input, 0, 1) == '-') { $this->dateTimeInterval->invert = 1; $input = substr($input, 1); } } /** * @param $input * @throws \Exception */ private function processTerm($input) { if (!preg_match('/(\d+)\s*([a-z]+)/i', $input, $matches)) { throw new DateIntervalParseException(sprintf('Unable to parse "%s"', $input)); } $tokenAliased = $matches[2]; if (!array_key_exists($tokenAliased, $this->tokens)) { throw new DateIntervalParseException(sprintf('No token found for "%s"', $tokenAliased)); } $token = $this->tokens[$tokenAliased]; $number = (int)$matches[1]; /** Convert weeks to days */ if ($token == 'w') { $token = 'd'; $number = $number * 7; } $this->dateTimeInterval->{$token} += $number; } }
hvanoch/daterangeparser
DateIntervalParser.php
PHP
mit
3,293
[ 30522, 1026, 1029, 25718, 3415, 15327, 1044, 6212, 11663, 1032, 6922, 1032, 3058, 18447, 2121, 10175, 19362, 8043, 1025, 2465, 3058, 18447, 2121, 10175, 19362, 8043, 1063, 1013, 1008, 1008, 1030, 13075, 9140, 1008, 1013, 5123, 1002, 14593, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT package syscall import "unsafe" // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getgroups(ngid int, gid *_Gid_t) (n int, err error) { r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setgroups(ngid int, gid *_Gid_t) (err error) { _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) wpid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socket(domain int, typ int, proto int) (fd int, err error) { r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Shutdown(s int, how int) (err error) { _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { _p0 = unsafe.Pointer(&mib[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func utimes(path string, timeval *[2]Timeval) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func futimes(fd int, timeval *[2]Timeval) (err error) { _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func fcntl(fd int, cmd int, arg int) (val int, err error) { r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func pipe() (r int, w int, err error) { r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) r = int(r0) w = int(r1) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func kill(pid int, signum int, posix int) (err error) { _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Access(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chflags(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chmod(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chown(path string, uid int, gid int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Chroot(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Close(fd int) (err error) { _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup(fd int) (nfd int, err error) { r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) nfd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Dup2(from int, to int) (err error) { _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exchangedata(path1 string, path2 string, options int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path1) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(path2) if err != nil { return } _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) use(unsafe.Pointer(_p0)) use(unsafe.Pointer(_p1)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Exit(code int) { Syscall(SYS_EXIT, uintptr(code), 0, 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchdir(fd int) (err error) { _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchflags(fd int, flags int) (err error) { _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchmod(fd int, mode uint32) (err error) { _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fchown(fd int, uid int, gid int) (err error) { _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Flock(fd int, how int) (err error) { _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fpathconf(fd int, name int) (val int, err error) { r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstat(fd int, stat *Stat_t) (err error) { _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fstatfs(fd int, stat *Statfs_t) (err error) { _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Fsync(fd int) (err error) { _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Ftruncate(fd int, length int64) (err error) { _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { var _p0 unsafe.Pointer if len(buf) > 0 { _p0 = unsafe.Pointer(&buf[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getdtablesize() (size int) { r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) size = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getegid() (egid int) { r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) egid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Geteuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getgid() (gid int) { r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) gid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgid(pid int) (pgid int, err error) { r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) pgid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpgrp() (pgrp int) { r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) pgrp = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpid() (pid int) { r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) pid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getppid() (ppid int) { r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) ppid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getpriority(which int, who int) (prio int, err error) { r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) prio = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getrusage(who int, rusage *Rusage) (err error) { _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getsid(pid int) (sid int, err error) { r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) sid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Getuid() (uid int) { r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) uid = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Issetugid() (tainted bool) { r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) tainted = bool(r0 != 0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Kqueue() (fd int, err error) { r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lchown(path string, uid int, gid int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Link(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(link) if err != nil { return } _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) use(unsafe.Pointer(_p0)) use(unsafe.Pointer(_p1)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Listen(s int, backlog int) (err error) { _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Lstat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkdir(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mkfifo(path string, mode uint32) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mknod(path string, mode uint32, dev int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlock(b []byte) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mlockall(flags int) (err error) { _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Mprotect(b []byte, prot int) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlock(b []byte) (err error) { var _p0 unsafe.Pointer if len(b) > 0 { _p0 = unsafe.Pointer(&b[0]) } else { _p0 = unsafe.Pointer(&_zero) } _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Munlockall() (err error) { _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Open(path string, mode int, perm uint32) (fd int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) use(unsafe.Pointer(_p0)) fd = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pathconf(path string, name int) (val int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) use(unsafe.Pointer(_p0)) val = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pread(fd int, p []byte, offset int64) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Pwrite(fd int, p []byte, offset int64) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func read(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Readlink(path string, buf []byte) (n int, err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 unsafe.Pointer if len(buf) > 0 { _p1 = unsafe.Pointer(&buf[0]) } else { _p1 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) use(unsafe.Pointer(_p0)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rename(from string, to string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(from) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(to) if err != nil { return } _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) use(unsafe.Pointer(_p0)) use(unsafe.Pointer(_p1)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Revoke(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Rmdir(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) newoffset = int64(int64(r1)<<32 | int64(r0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setegid(egid int) (err error) { _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Seteuid(euid int) (err error) { _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setgid(gid int) (err error) { _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setlogin(name string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(name) if err != nil { return } _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpgid(pid int, pgid int) (err error) { _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setpriority(which int, who int, prio int) (err error) { _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setprivexec(flag int) (err error) { _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setregid(rgid int, egid int) (err error) { _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setreuid(ruid int, euid int) (err error) { _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setrlimit(which int, lim *Rlimit) (err error) { _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setsid() (pid int, err error) { r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) pid = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Settimeofday(tp *Timeval) (err error) { _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Setuid(uid int) (err error) { _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Stat(path string, stat *Stat_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Statfs(path string, stat *Statfs_t) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Symlink(path string, link string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } var _p1 *byte _p1, err = BytePtrFromString(link) if err != nil { return } _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) use(unsafe.Pointer(_p0)) use(unsafe.Pointer(_p1)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Sync() (err error) { _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Truncate(path string, length int64) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Umask(newmask int) (oldmask int) { r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) oldmask = int(r0) return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Undelete(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unlink(path string) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Unmount(path string, flags int) (err error) { var _p0 *byte _p0, err = BytePtrFromString(path) if err != nil { return } _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) use(unsafe.Pointer(_p0)) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func write(fd int, p []byte) (n int, err error) { var _p0 unsafe.Pointer if len(p) > 0 { _p0 = unsafe.Pointer(&p[0]) } else { _p0 = unsafe.Pointer(&_zero) } r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) ret = uintptr(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func munmap(addr uintptr, length uintptr) (err error) { _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func readlen(fd int, buf *byte, nbuf int) (n int, err error) { r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func writelen(fd int, buf *byte, nbuf int) (n int, err error) { r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) n = int(r0) if e1 != 0 { err = errnoErr(e1) } return } // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) sec = int32(r0) usec = int32(r1) if e1 != 0 { err = errnoErr(e1) } return }
AnuchitPrasertsang/go
src/syscall/zsyscall_darwin_arm.go
GO
bsd-3-clause
33,695
[ 30522, 1013, 1013, 12395, 6508, 15782, 3363, 1012, 20228, 1011, 1048, 16703, 25353, 15782, 3363, 1035, 18667, 2094, 1012, 2175, 25353, 15782, 3363, 1035, 11534, 1012, 2175, 25353, 15782, 3363, 1035, 11534, 1035, 2849, 1012, 2175, 1013, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold 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, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ***********************************************************************/ #ifndef FC__GUI_MAIN_H #define FC__GUI_MAIN_H void popup_quit_dialog(); #endif /* FC__GUI_MAIN_H */
benjaminwinger/Freeciv
client/gui-qt/gui_main.h
C
gpl-2.0
799
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import { bind } from "@react-rxjs/core" import { of } from "rxjs" import { delay, distinctUntilChanged, map } from "rxjs/operators" import { CurrencyPair } from "./types" const fakeData: Record<string, CurrencyPair> = { EURUSD: { symbol: "EURUSD", ratePrecision: 5, pipsPosition: 4, base: "EUR", terms: "USD", defaultNotional: 1000000, }, USDJPY: { symbol: "USDJPY", ratePrecision: 3, pipsPosition: 2, base: "USD", terms: "JPY", defaultNotional: 1000000, }, GBPUSD: { symbol: "GBPUSD", ratePrecision: 5, pipsPosition: 4, base: "GBP", terms: "USD", defaultNotional: 1000000, }, GBPJPY: { symbol: "GBPJPY", ratePrecision: 3, pipsPosition: 2, base: "GBP", terms: "JPY", defaultNotional: 1000000, }, EURJPY: { symbol: "EURJPY", ratePrecision: 3, pipsPosition: 2, base: "EUR", terms: "JPY", defaultNotional: 1000000, }, AUDUSD: { symbol: "AUDUSD", ratePrecision: 5, pipsPosition: 4, base: "AUD", terms: "USD", defaultNotional: 1000000, }, NZDUSD: { symbol: "NZDUSD", ratePrecision: 5, pipsPosition: 4, base: "NZD", terms: "USD", defaultNotional: 10000000, }, EURCAD: { symbol: "EURCAD", ratePrecision: 5, pipsPosition: 4, base: "EUR", terms: "CAD", defaultNotional: 1000000, }, EURAUD: { symbol: "EURAUD", ratePrecision: 5, pipsPosition: 4, base: "EUR", terms: "AUD", defaultNotional: 1000000, }, } export const [useCurrencyPairs, currencyPairs$] = bind< Record<string, CurrencyPair> >(of(fakeData).pipe(delay(1_000))) export const [useCurrencyPair, getCurrencyPair$] = bind((symbol: string) => currencyPairs$.pipe( map((currencyPairs) => currencyPairs[symbol]), distinctUntilChanged(), ), )
AdaptiveConsulting/ReactiveTraderCloud
src/client/src/services/currencyPairs/currencyPairs.service-mock.ts
TypeScript
apache-2.0
1,856
[ 30522, 12324, 1063, 14187, 1065, 2013, 1000, 1030, 10509, 1011, 1054, 2595, 22578, 1013, 4563, 1000, 12324, 1063, 1997, 1065, 2013, 1000, 1054, 2595, 22578, 1000, 12324, 1063, 8536, 1010, 5664, 16671, 4014, 22305, 2098, 1010, 4949, 1065, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.javalego.erp.model.editors; import java.util.Collection; import java.util.List; import com.javalego.erp.model.Icons; import com.javalego.erp.model.Texts; import com.javalego.erp.model.entity.CategoriaProfesional; import com.javalego.erp.model.entity.Departamento; import com.javalego.erp.model.entity.Empleado; import com.javalego.erp.model.entity.Empresa; import com.javalego.exception.LocalizedException; import com.javalego.security.annotation.PermitAll; import com.javalego.ui.UIContext; import com.javalego.ui.condition.ConditionType; import com.javalego.ui.field.impl.DateFieldModel; import com.javalego.ui.field.impl.EmailFieldModel; import com.javalego.ui.field.impl.ImageFieldModel; import com.javalego.ui.field.impl.PhoneNumberFieldModel; import com.javalego.ui.field.impl.TextFieldModel; import com.javalego.ui.filter.impl.FilterParam; import com.javalego.ui.filter.impl.FilterParamsService; import com.javalego.ui.mvp.beans.view.list.adapter.ListBeansViewAdapter; import com.javalego.ui.mvp.editor.rules.IEditionRulesListener.ValueChangeEvent; import com.javalego.ui.mvp.nestedbean.imp.NestedBeanListValues; import com.javalego.util.StringUtils; /** * Formulario de mantenimiento de Tarifas de Productos * * @author ROBERTO RANZ * */ @PermitAll public class EditorEmpleados extends BaseEditor<Empleado> { private static final long serialVersionUID = -8571636754447755369L; /** * Constructor para inicializar modelo. */ public EditorEmpleados() { setTitle(Texts.EMPLEADOS); setIcon(Icons.PEOPLE); setEditionTitle(Texts.EMPLEADO); // Campos addFieldModel(new TextFieldModel(EMPRESA_NOMBRE, Texts.EMPRESA, true).setColumns(30).setRequired(true)); addFieldModel(new TextFieldModel(DEPARTAMENTO_NOMBRE, Texts.DEPARTAMENTO, true).setColumns(30).setRequired(true)); addFieldModel(new TextFieldModel(CATEGORIA_NOMBRE, Texts.CATEGORIA, true).setColumns(30).setRequired(true)); addFieldModel(new TextFieldModel(NOMBRE, Texts.NOMBRE).setColumns(30).setRequired(true)); addFieldModel(new TextFieldModel(NIF, Texts.NIF).setMaxSize(20)); addFieldModel(new DateFieldModel(ALTA, Texts.FECHA_ALTA).setReadOnly(true)); addFieldModel(new PhoneNumberFieldModel(TELEFONO, Texts.TELEFONO).setMaxSize(15)); addFieldModel(new PhoneNumberFieldModel(MOVIL, Texts.MOVIL).setMaxSize(15)); addFieldModel(new EmailFieldModel(EMAIL, Texts.EMAIL).setMaxSize(130).setColumns(40)); addFieldModel(new TextFieldModel(DOMICILIO, Texts.DIRECCION)); addFieldModel(new ImageFieldModel(FOTO, Texts.FOTO)); // Filtros basado en campos del editor. Se crea el presenter para la // edición de los campos que constituyen los parámetros del filtro addFilterService(new FilterParamsService(Texts.NOMBRE, new FilterParam(NOMBRE, Texts.NOMBRE, ConditionType.CONTAINS))); addFilterService(new FilterParamsService(Texts.DIRECCION, new FilterParam(DOMICILIO, Texts.DIRECCION, ConditionType.CONTAINS))); addFilterService(new FilterParamsService(Texts.NIF, new FilterParam(NIF, Texts.NIF, ConditionType.CONTAINS))); addFilterService(new FilterParamsService(Texts.EMAIL, new FilterParam(EMAIL, Texts.EMAIL, ConditionType.CONTAINS))); // Servicios del editor para beans nested relacionados. EditorServices<Empleado> services = new EditorServices<Empleado>(); setEditorServices(services); services.addNestedFieldModel(DEPARTAMENTO_NOMBRE, new NestedBeanListValues<Empleado, Departamento>() { @Override public void valueChangeEvent(ValueChangeEvent event) throws LocalizedException { if (getDataProvider() != null) { Departamento e = (Departamento) getDataProvider().find(Departamento.class, "nombre = '" + event.getValue() + "'"); if (e != null) { event.getEditorRules().setValue(DEPARTAMENTO_ID, e.getId()); } else { event.getEditorRules().setValue(DEPARTAMENTO_ID, null); event.getEditorRules().setValue(DEPARTAMENTO_NOMBRE, null); } } } @SuppressWarnings("unchecked") @Override public Collection<String> getKeys(String constraint) throws LocalizedException { return getDataProvider() == null ? null : (Collection<String>) getDataProvider().propertyValues(Departamento.class, NOMBRE, constraint != null ? "nombre like'" + constraint + "%'" : null, NOMBRE); } @Override public boolean isAutoComplete() { return false; } }); services.addNestedFieldModel(CATEGORIA_NOMBRE, new NestedBeanListValues<Empleado, CategoriaProfesional>() { @Override public void valueChangeEvent(ValueChangeEvent event) throws LocalizedException { if (getDataProvider() != null) { CategoriaProfesional e = (CategoriaProfesional) getDataProvider().find(CategoriaProfesional.class, "nombre = '" + event.getValue() + "'"); if (e != null) { event.getEditorRules().setValue(CATEGORIA_ID, e.getId()); } else { event.getEditorRules().setValue(CATEGORIA_ID, null); event.getEditorRules().setValue(CATEGORIA_NOMBRE, null); } } } @SuppressWarnings("unchecked") @Override public Collection<String> getKeys(String constraint) throws LocalizedException { return getDataProvider() == null ? null : (Collection<String>) getDataProvider().propertyValues(CategoriaProfesional.class, NOMBRE, constraint != null ? "nombre like'" + constraint + "%'" : null, NOMBRE); } @Override public boolean isAutoComplete() { return false; } }); services.addNestedFieldModel(EMPRESA_NOMBRE, new NestedBeanListValues<Empleado, Empresa>() { @Override public void valueChangeEvent(ValueChangeEvent event) throws LocalizedException { if (getDataProvider() != null) { Empresa e = (Empresa) getDataProvider().find(Empresa.class, "nombre = '" + event.getValue() + "'"); if (e != null) { event.getEditorRules().setValue(EMPRESA_ID, e.getId()); } else { event.getEditorRules().setValue(EMPRESA_ID, null); event.getEditorRules().setValue(EMPRESA_NOMBRE, null); } } } @SuppressWarnings("unchecked") @Override public Collection<String> getKeys(String constraint) throws LocalizedException { return getDataProvider() == null ? null : (Collection<String>) getDataProvider().propertyValues(Empresa.class, NOMBRE, constraint != null ? "nombre like'" + constraint + "%'" : null, NOMBRE); } @Override public boolean isAutoComplete() { return false; } }); // Vistas de datos del bean addFormatView(new ListBeansViewAdapter<Empleado>(UIContext.getText(Texts.NOMBRE) + " + " + UIContext.getText(Texts.DEPARTAMENTO), FOTO) { @Override public String toHtml(Empleado bean) { return "<h2>" + bean.getNombre() + "</h2>" + (bean.getDepartamento() != null ? bean.getDepartamento().getNombre() : "") + "<br>" + (bean.getEmpresa() != null ? bean.getEmpresa().getNombre() : ""); } }); } @Override public Collection<Empleado> getBeans(String filter, String order) throws LocalizedException { Collection<Empleado> list = getDataServices().getEmpleados(filter, order); if (order != null && list != null && list.size() > 1) { StringUtils.sortList((List<?>) list, NOMBRE); } return list; } @Override public Class<Empleado> getBeanClass() { return Empleado.class; } }
rranz/meccano4j_vaadin
javalego/javalego-app-erp-model/src/main/java/com/javalego/erp/model/editors/EditorEmpleados.java
Java
gpl-3.0
7,451
[ 30522, 7427, 4012, 1012, 9262, 23115, 2080, 1012, 9413, 2361, 1012, 2944, 1012, 10195, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 3074, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 2862, 1025, 12324, 4012, 1012, 9262, 23115, 2080, 1012, 941...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package top.chenat.bean; import javax.persistence.Entity; /** * Created by ChenAt on 10/17/17. * desc: */ @Entity public class Test2 { }
ChenAt/common-dao
src/test/java/top/chenat/bean/Test2.java
Java
apache-2.0
142
[ 30522, 7427, 2327, 1012, 8802, 4017, 1012, 14068, 1025, 12324, 9262, 2595, 1012, 28297, 1012, 9178, 1025, 1013, 1008, 1008, 1008, 2580, 2011, 8802, 4017, 2006, 2184, 1013, 2459, 1013, 2459, 1012, 1008, 4078, 2278, 1024, 1008, 1013, 1030, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2009-2010, Sergey Karakovskiy and Julian Togelius * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Mario AI nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package ch.idsia.unittests; import ch.idsia.benchmark.mario.engine.level.Level; import ch.idsia.benchmark.mario.engine.level.LevelGenerator; import ch.idsia.benchmark.mario.engine.level.SpriteTemplate; import ch.idsia.benchmark.mario.engine.sprites.Sprite; import ch.idsia.benchmark.tasks.BasicTask; import ch.idsia.tools.MarioAIOptions; import ch.idsia.tools.RandomCreatureGenerator; import junit.framework.TestCase; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; /** * Created by IntelliJ IDEA. * User: Sergey Karakovskiy, sergey.karakovskiy@gmail.com * Date: Aug 28, 2010 * Time: 10:30:34 PM * Package: ch.idsia.unittests */ public class LevelGeneratorTest extends TestCase { @BeforeTest public void setUp() { } @AfterTest public void tearDown() { } @Test public void testRegressionLBBug() throws Exception { // This test has to be first because it only happens if blocks have // never been on before. final MarioAIOptions marioAIOptions = new MarioAIOptions(); marioAIOptions.setArgs("-lb off"); Level level1 = LevelGenerator.createLevel(marioAIOptions); marioAIOptions.setArgs("-vis off -ag ch.idsia.agents.controllers.ForwardJumpingAgent -lb on"); final BasicTask basicTask = new BasicTask(marioAIOptions); basicTask.setOptionsAndReset(marioAIOptions); basicTask.runSingleEpisode(1); marioAIOptions.setArgs("-lb off"); Level level2 = LevelGenerator.createLevel(marioAIOptions); for (int i = 0; i < level1.length; i++) { for (int j = 0; j < level1.height; j++) { assertEquals(level1.getBlock(i, j), level2.getBlock(i, j)); } } } @Test public void testCreateLevel() throws Exception { final MarioAIOptions marioAIOptions = new MarioAIOptions(); Level level1 = LevelGenerator.createLevel(marioAIOptions); Level level2 = LevelGenerator.createLevel(marioAIOptions); for (int i = 0; i < level1.length; i++) { for (int j = 0; j < level1.height; j++) { assertEquals(level1.getBlock(i, j), level2.getBlock(i, j)); } } } @Test public void testSpriteTemplates() throws Exception { final MarioAIOptions marioAIOptions = new MarioAIOptions(); Level level1 = LevelGenerator.createLevel(marioAIOptions); Level level2 = LevelGenerator.createLevel(marioAIOptions); for (int i = 0; i < level1.length; i++) { for (int j = 0; j < level1.height; j++) { int t1 = 0; int t2 = 0; SpriteTemplate st1 = level1.getSpriteTemplate(i, j); SpriteTemplate st2 = level2.getSpriteTemplate(i, j); if (st1 != null) { t1 = st1.getType(); } if (st2 != null) { t2 = st2.getType(); } else if (st1 != null) { throw new AssertionError("st1 is not null, st2 is null!"); } assertEquals(t1, t2); } } } @Test public void testCreateLevelWithoutCreatures() throws Exception { final MarioAIOptions marioAIOptions = new MarioAIOptions("-le off"); Level level = LevelGenerator.createLevel(marioAIOptions); for (int i = 0; i < level.length; i++) { for (int j = 0; j < level.height; j++) { SpriteTemplate st = level.getSpriteTemplate(i, j); if (st != null && st.getType() == Sprite.KIND_PRINCESS) { continue; } assertNull(st); } } } // @Test // public void testCreateLevelWithTubesWithoutFlowers() // { // final MarioAIOptions marioAIOptions = new MarioAIOptions("-ltb on -le g,gw,gk,gkw,rk,rkw,s,sw"); // Level level = LevelGenerator.createLevel(marioAIOptions); // // assertEquals(true, level.counters.tubesCount > 0); // assertEquals(true, level.counters.totalTubes == Integer.MAX_VALUE); // } // @Test // public void testCreateLevelWithTubesWithFlowers() // { // final MarioAIOptions marioAIOptions = new MarioAIOptions("-ltb on -le f -ld 5 -ls 222"); // Level level = LevelGenerator.createLevel(marioAIOptions); // // boolean fl = false; // // for (int i = 0; i < level.length; i++) // for (int j = 0; j < level.height; j++) // if ((level.getSpriteTemplate (i, j) != null) && (level.getSpriteTemplate (i, j).getType() == Sprite.KIND_ENEMY_FLOWER)) // { // fl = true; // break; // } // // assertEquals(true, fl); // } @Test public void testRandomCreatureGenerator_RedKoopaWinged() { RandomCreatureGenerator g = new RandomCreatureGenerator(0, "rkw", 0); assertEquals(Sprite.KIND_RED_KOOPA_WINGED, g.nextCreature()); } @Test public void testRandomCreatureGenerator_GreenKoopaWinged() { RandomCreatureGenerator g = new RandomCreatureGenerator(0, "gkw", 0); assertEquals(Sprite.KIND_GREEN_KOOPA_WINGED, g.nextCreature()); } @Test public void testRandomCreatureGenerator_Goomba() { RandomCreatureGenerator g = new RandomCreatureGenerator(0, "g", 0); assertEquals(Sprite.KIND_GOOMBA, g.nextCreature()); } @Test public void testRandomCreatureGenerator_10Goombas() { final MarioAIOptions marioAIOptions = new MarioAIOptions("-le g:10"); Level level = LevelGenerator.createLevel(marioAIOptions); int counter = 0; for (int i = 0; i < level.length; i++) { for (int j = 0; j < level.height; j++) { SpriteTemplate st1 = level.getSpriteTemplate(i, j); if (st1 != null && st1.getType() != Sprite.KIND_PRINCESS) { int type = st1.getType(); assertEquals(Sprite.KIND_GOOMBA, type); ++counter; } } } System.out.println("level.counters.creatures = " + Level.counters.creatures); assertEquals(10, counter); } @Test public void testRandomCreatureGenerator_20RedWingedKoopas() { final MarioAIOptions marioAIOptions = new MarioAIOptions("-le rkw:20"); Level level = LevelGenerator.createLevel(marioAIOptions); int counter = 0; for (int i = 0; i < level.length; i++) { for (int j = 0; j < level.height; j++) { SpriteTemplate st1 = level.getSpriteTemplate(i, j); if (st1 != null && st1.getType() != Sprite.KIND_PRINCESS) { int type = st1.getType(); assertEquals(Sprite.KIND_RED_KOOPA_WINGED, type); ++counter; } } } System.out.println("level.counters.creatures = " + Level.counters.creatures); assertEquals(20, counter); } }
kavanj/marioai
src/ch/idsia/unittests/LevelGeneratorTest.java
Java
bsd-3-clause
9,162
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2268, 1011, 2230, 1010, 22703, 13173, 7724, 5488, 2100, 1998, 6426, 2000, 12439, 4173, 1008, 2035, 2916, 9235, 1012, 1008, 1008, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ************************************************************************ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * * (c) 2009. (c) 2009. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 * All rights reserved Tous droits réservés * * NRC disclaims any warranties, Le CNRC dénie toute garantie * expressed, implied, or énoncée, implicite ou légale, * statutory, of any kind with de quelque nature que ce * respect to the software, soit, concernant le logiciel, * including without limitation y compris sans restriction * any warranty of merchantability toute garantie de valeur * or fitness for a particular marchande ou de pertinence * purpose. NRC shall not be pour un usage particulier. * liable in any event for any Le CNRC ne pourra en aucun cas * damages, whether direct or être tenu responsable de tout * indirect, special or general, dommage, direct ou indirect, * consequential or incidental, particulier ou général, * arising from the use of the accessoire ou fortuit, résultant * software. Neither the name de l'utilisation du logiciel. Ni * of the National Research le nom du Conseil National de * Council of Canada nor the Recherches du Canada ni les noms * names of its contributors may de ses participants ne peuvent * be used to endorse or promote être utilisés pour approuver ou * products derived from this promouvoir les produits dérivés * software without specific prior de ce logiciel sans autorisation * written permission. préalable et particulière * par écrit. * * This file is part of the Ce fichier fait partie du projet * OpenCADC project. OpenCADC. * * OpenCADC is free software: OpenCADC est un logiciel libre ; * you can redistribute it and/or vous pouvez le redistribuer ou le * modify it under the terms of modifier suivant les termes de * the GNU Affero General Public la “GNU Affero General Public * License as published by the License” telle que publiée * Free Software Foundation, par la Free Software Foundation * either version 3 of the : soit la version 3 de cette * License, or (at your option) licence, soit (à votre gré) * any later version. toute version ultérieure. * * OpenCADC is distributed in the OpenCADC est distribué * hope that it will be useful, dans l’espoir qu’il vous * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE * without even the implied GARANTIE : sans même la garantie * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence * General Public License for Générale Publique GNU Affero * more details. pour plus de détails. * * You should have received Vous devriez avoir reçu une * a copy of the GNU Affero copie de la Licence Générale * General Public License along Publique GNU Affero avec * with OpenCADC. If not, see OpenCADC ; si ce n’est * <http://www.gnu.org/licenses/>. pas le cas, consultez : * <http://www.gnu.org/licenses/>. * * $Revision: 4 $ * ************************************************************************ */ package ca.nrc.cadc.vos.server; import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.net.URL; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import ca.nrc.cadc.io.ByteCountInputStream; import ca.nrc.cadc.uws.JobInfo; import ca.nrc.cadc.uws.Parameter; import ca.nrc.cadc.uws.web.InlineContentException; import ca.nrc.cadc.uws.web.InlineContentHandler; import ca.nrc.cadc.uws.web.UWSInlineContentHandler; import ca.nrc.cadc.vos.Transfer; import ca.nrc.cadc.vos.TransferParsingException; import ca.nrc.cadc.vos.TransferReader; import ca.nrc.cadc.vos.TransferWriter; import ca.nrc.cadc.vos.VOSURI; public class TransferInlineContentHandler implements UWSInlineContentHandler { private static Logger log = Logger.getLogger(TransferInlineContentHandler.class); // 6Kb XML Doc size limit private static final long DOCUMENT_SIZE_MAX = 6144L; private static final String TEXT_XML = "text/xml"; public TransferInlineContentHandler() { } public Content accept(String name, String contentType, InputStream inputStream) throws InlineContentException, IOException { if (!contentType.equals(TEXT_XML)) throw new IllegalArgumentException("Transfer document expected Content-Type is " + TEXT_XML + " not " + contentType); if (inputStream == null) throw new IOException("The InputStream is closed"); // wrap the input stream in a byte counter to limit bytes read ByteCountInputStream sizeLimitInputStream = new ByteCountInputStream(inputStream, DOCUMENT_SIZE_MAX); try { TransferReader reader = new TransferReader(true); Transfer transfer = reader.read(sizeLimitInputStream, VOSURI.SCHEME); log.debug("Transfer: read " + sizeLimitInputStream.getByteCount() + " bytes."); TransferWriter tw = new TransferWriter(); StringWriter sw = new StringWriter(); tw.write(transfer, sw); Content content = new Content(); content.name = CONTENT_JOBINFO; content.value = new JobInfo(sw.toString(), contentType, true);; return content; } catch (TransferParsingException e) { throw new InlineContentException("Unable to create JobInfo from Transfer Document", e); } } }
opencadc/vos
cadc-vos-server/src/main/java/ca/nrc/cadc/vos/server/TransferInlineContentHandler.java
Java
agpl-3.0
6,452
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Created by zacharymartin on 4/20/15. */ ParserUI.PARSING = 0; ParserUI.PLATES = 1; ParserUI.FEATURES = 2; ParserUI.EXPERIMENT = 3; ParserUI.MANUAL_ENTRY = "byManualEntry"; ParserUI.PLATE_LEVEL_FEATURE = "byFeature"; ParserUI.FEATURE_LIST_PLACEHOLDER = "--- features ---"; ParserUI.LABEL_LIST_PLACEHOLDER = "--- labels ---"; function ParserUI(parsingController){ this.parsingController = parsingController; this.parseOnlyModeOn = false; var _self = this; // construct a flash messenger var flashMessenger = new FlashMessenger("userMsgPanel"); // references to all UI elements by Tab // Parsing var parsingNameElement = document.getElementById("parsingName"); var machineNameElement = document.getElementById("machineName"); var wellRowElement = document.getElementById("plateDimensions"); var wellColumnElement = document.getElementById("assayType"); var parsingDescriptionElement = document.getElementById("parsingDescription"); var selectedFileElement = document.getElementById("selectedFile"); var filesInput = document.getElementById("files"); var chooseFileButton = document.getElementById("getFile"); var delimiterList = document.getElementById("delimiterList"); var delimiterOptions = []; // an array of all the options elements in the delimiter // list // ~~~~~~~~~~~~~~~~~~~~~ Plate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var firstPlateCellRangeElement = document.getElementById("firstPlateCellRange"); var applyFirstPlateButton = document.getElementById("applyFirstPlate"); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Features ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var newFeatureButton = document.getElementById("newFeature"); var addFeatureButton = document.getElementById("saveFeature"); var deleteFeatureButton = document.getElementById("deleteFeature"); var applyFeaturesButton = document.getElementById("applyFeatures"); var featureCellRangeElement = document.getElementById("featureCellRange"); var featureCategoryElement = document.getElementById("featureCategory"); var featureLevelRadioButtonSet = document.getElementById("featureLevel"); var wellLevelRadioButton = document.getElementById("wellLevel"); var plateLevelRadioButton = document.getElementById("plateLevel"); var experimentLevelRadioButton = document.getElementById("experimentLevel"); var featureListElement = document.getElementById("featureList"); var featureOptions = []; // an array of all the options elements in the feature list var labelListElement = document.getElementById("labelList"); var labelOptions = []; // an array of all the options elements in the label list // ~~~~~~~~~~~~~~~~~~~~~~~~~ Experiment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var importAndSaveDataButton = document.getElementById("sendImportDataToServer"); var downloadFileImportButton = document.getElementById("downloadFileImport"); var downloadIntergroupButton = document.getElementById("downloadIntergroupFile"); var byPlateLevelFeatureRadioButton = document.getElementById("byFeature"); var byManualEntryRadioButton = document.getElementById("byManualEntry"); var plateLevelFeatureListElement = document.getElementById("plateLevelFeatureList"); var setPlateIdButton = document.getElementById("setPlateID"); var plateIdentifierList = document.getElementById("plateList"); var plateImportList = document.getElementById("plateImportList"); var experimentSelectizeElement; // an object representing the options in the experiment selectize element. This object // has a property for each option in the selectize element. The property name is the // name of the experiment and the displayed text for the option. The property value // id the experiment id and is the value of the selectize option var experimentSelectizeOptions = {}; var plateIdentifierSelectizeElement; var plateIdentifierSelectizeOptionValues = []; var byFeatureMethodDiv = document.getElementById("byFeatureMethod"); var byManualMethodDiv = document.getElementById("byManualEntryMethod"); //~~~~~~~~~~~~~~~~~~~~~~~~ General Elements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var $tabsElement = $("#tabs"); var parsingIDElement = document.getElementById("parsingId"); var saveConfigButton = document.getElementById("saveConfigToServer"); var saveAsConfigButton = document.getElementById("saveAsConfigToServer"); var selectedFiles; // ------------------- parsing tab getters and setters ------------------------------ this.getParsingName = function(){ if (_self.parseOnlyModeOn){ return parsingNameElement.innerHTML; } else { return parsingNameElement.value; } }; this.getPlateDimensions = function(){ if (_self.parseOnlyModeOn){ return wellRowElement.innerHTML; } else { return wellRowElement.value; } }; this.setPlateDimensions = function(plateDimensions){ if (_self.parseOnlyModeOn){ wellRowElement.innerHTML = plateDimensions; } else { wellRowElement.value = plateDimensions; } }; this.getAssayType = function(){ if (_self.parseOnlyModeOn){ return wellColumnElement.innerHTML; } else { return wellColumnElement.value; } }; this.setAssayType = function(assayType){ if (_self.parseOnlyModeOn){ wellColumnElement.innerHTML = assayType; } else { wellColumnElement.value = assayType; } }; this.setParsingName = function(parsingName){ if (_self.parseOnlyModeOn){ parsingNameElement.innerHTML = parsingName; } else { parsingNameElement.value = parsingName; } }; this.getMachineName = function(){ if (_self.parseOnlyModeOn){ return machineNameElement.innerHTML; } else { return machineNameElement.value; } }; this.setMachineName = function(machineName){ if (_self.parseOnlyModeOn){ machineNameElement.innerHTML = machineName; } else { machineNameElement.value = machineName; } }; this.getParsingDescription = function(){ if (_self.parseOnlyModeOn){ return parsingDescriptionElement.innerHTML; } else { return parsingDescriptionElement.value; } }; this.setParsingDescription = function(parsingDescription){ if (_self.parseOnlyModeOn){ parsingDescriptionElement.innerHTML = parsingDescription; } else { parsingDescriptionElement.value = parsingDescription; } }; this.getSelectedFileName = function(){ return selectedFileElement.innerHTML; }; this.setSelectedFileName = function(selectedFileName){ selectedFileElement.innerHTML = selectedFileName; }; this.getSelectedDelimiter = function(){ if (_self.parseOnlyModeOn){ return delimiterList.innerHTML; } else { return delimiterList.value; } }; this.setDelimiter = function(delimiterName){ if (delimiterName !== null){ if (_self.parseOnlyModeOn){ delimiterList.innerHTML = delimiterName; } else { delimiterList.value = delimiterName; } } else { if (_self.parseOnlyModeOn){ delimiterList.innerHTML = ""; } else { delimiterList.scrollTop = 0; } // deselect all options for (var i=0; i<delimiterOptions.length; i++){ delimiterOptions[i].selected = false; } } }; this.loadDelimiterList = function(delimiterNameArray){ // load the delimiterOptions array delimiterOptions = []; for (var i=0; i<delimiterNameArray.length; i++){ var optionName = delimiterNameArray[i]; var option = document.createElement("option"); delimiterOptions.push(option); option.setAttribute("value", optionName); option.innerHTML = optionName; } if (!_self.parseOnlyModeOn){ delimiterList.innerHTML = ""; // load the delimiter list for (var j=0; j<delimiterOptions.length; j++){ delimiterList.appendChild(delimiterOptions[j]) } } _self.setDelimiter(null); }; this.switchDelimiterListToSpan = function(){ var span = document.createElement("span"); span.innerHTML = _self.getSelectedDelimiter(); $(delimiterList).replaceWith(span); delimiterList = span; }; this.switchDelimiterListToSelect = function(){ var select = document.createElement("select"); for (var j=0; j<delimiterOptions.length; j++){ select.appendChild(delimiterOptions[j]); } select.value = _self.getSelectedDelimiter(); $(delimiterList).replaceWith(select); delimiterList = select; addEvent(select, "change", _self.handleDelimiterChange); }; this.getListedDelimiters = function(){ var delimiters = []; for (var i=0; i<delimiterOptions.length; i++){ delimiters.push(delimiterOptions[i].value); } return delimiters; }; // --------------------- parsing tab event handlers -------------------------------- this.handleDelimiterChange = function(event){ var selectedDelimiter = delimiterList.value; try{ _self.parsingController.changeDelimiter(selectedDelimiter); } catch (error){ _self.displayError(error); } }; this.handleFileSelect = function(event) { if (event.target && event.target.files){ // file input case selectedFiles = event.target.files; // FileList object } else if (event.dataTransfer && event.dataTransfer.files) { // drag and drop case selectedFiles = event.dataTransfer.files; } try{ _self.parsingController.loadFiles(selectedFiles); // if the files loaded without errors, display their names on the UI // TODO - display multiple file names _self.setSelectedFileName(selectedFiles[0].name); } catch (error){ _self.displayError(error); } }; // ---------------------- Plate tab getters and setters ------------------------------ this.getFirstPlateCellRange = function(){ var cellRange; try { if (_self.parseOnlyModeOn){ cellRange = ParserUI.convertStringToCellRange( firstPlateCellRangeElement.innerHTML); } else { cellRange = ParserUI.convertStringToCellRange(firstPlateCellRangeElement.value); } } catch (error) { _self.displayError(error); } return cellRange; }; this.setFirstPlateCellRange = function(firstPlateRange){ if (_self.parseOnlyModeOn){ firstPlateCellRangeElement.innerHTML = firstPlateRange.toString(); } else { firstPlateCellRangeElement.value = firstPlateRange.toString(); } }; // ---------------------- Plate tab event handlers ----------------------------------- this.handleFirstPlateCellRangeChange = function(){ var selectedCellRange = _self.getFirstPlateCellRange(); try { _self.parsingController.selectCells(selectedCellRange); } catch (error){ _self.displayError(error); } }; this.handleApplyFirstPlate = function(){ var selectedCellRange = _self.getFirstPlateCellRange(); try { _self.parsingController.defineFirstPlate(selectedCellRange); } catch (error){ _self.displayError(error); } }; // ----------------------- Features tab getters and setters -------------------------- this.getFeatureCellRange = function(){ var cellRange; try { if (_self.parseOnlyModeOn){ cellRange = ParserUI.convertStringToCellRange( featureCellRangeElement.innerHTML); } else { cellRange = ParserUI.convertStringToCellRange( featureCellRangeElement.value); } } catch (error){ _self.displayError(error); } return cellRange; }; this.setFeatureCellRange = function(featureRange){ if (_self.parseOnlyModeOn){ featureCellRangeElement.innerHTML = featureRange.toString(); } else { featureCellRangeElement.value = featureRange.toString(); } }; this.getFeatureLevel = function(){ var level = null; if (wellLevelRadioButton.checked){ level = WELL_LEVEL; } else if (document.getElementById("plateLevel").checked){ level = PLATE_LEVEL; } else if (document.getElementById("experimentLevel").checked){ level = EXPERIMENT_LEVEL; } return level; }; this.setFeatureLevel = function(level){ if (level === WELL_LEVEL){ wellLevelRadioButton.checked = true; plateLevelRadioButton.checked = false; experimentLevelRadioButton.checked = false; } else if (level === PLATE_LEVEL) { wellLevelRadioButton.checked = false; plateLevelRadioButton.checked = true; experimentLevelRadioButton.checked = false; } else if (level === EXPERIMENT_LEVEL){ wellLevelRadioButton.checked = false; plateLevelRadioButton.checked = false; experimentLevelRadioButton.checked = true; } else { wellLevelRadioButton.checked = false; plateLevelRadioButton.checked = false; experimentLevelRadioButton.checked = false; } }; this.getFeatureCategory = function(){ if (_self.parseOnlyModeOn){ return featureCategoryElement.innerHTML; } else { return featureCategoryElement.value; } }; this.setFeatureCategory = function(categoryName){ if (_self.parseOnlyModeOn){ featureCategoryElement.innerHTML = categoryName; } else { featureCategoryElement.value = categoryName; } }; this.getSelectedFeature = function(){ return featureListElement.value; }; this.loadFeatureList = function(featureNameArray){ featureListElement.innerHTML = ""; featureListElement.scrollTop = 0; featureOptions = []; if (featureNameArray && featureNameArray.length){ loadSelectElement(featureListElement, featureNameArray, featureOptions); } else { // load the label selector with a place holder option = document.createElement("option"); option.setAttribute("value", ParserUI.FEATURE_LIST_PLACEHOLDER); option.innerHTML = ParserUI.FEATURE_LIST_PLACEHOLDER; featureOptions.push(option); featureListElement.appendChild(option); } }; this.setFeature = function(featureName){ if (featureName !== null){ featureListElement.value = featureName; } else { // deselect all options var featureOptionsArray = featureListElement.options; for (var i=0; i<featureOptionsArray.length; i++){ featureOptionsArray[i].selected = false; } } }; this.getListedFeatures = function(){ var listedFeatureNames = []; for (var i=0; i<featureOptions.length; i++){ listedFeatureNames.push(featureOptions[i].value); } return listedFeatureNames; }; this.loadLabelList = function(labelDescriptors){ // clear the label list selector labelListElement.innerHTML = ""; labelListElement.scrollTop = 0; labelOptions = []; var option; if (labelDescriptors){ // load the label selector with the label descriptors for (var i=0; i<labelDescriptors.length; i++){ var value = labelDescriptors[i].cell; var descriptor = labelDescriptors[i].descriptor; option = document.createElement("option"); labelOptions.push(option); option.setAttribute("value", value); option.innerHTML = descriptor; labelListElement.appendChild(option); } } else { // load the label selector with a place holder option = document.createElement("option"); option.setAttribute("value", ParserUI.FEATURE_LIST_PLACEHOLDER); option.innerHTML = ParserUI.LABEL_LIST_PLACEHOLDER; labelOptions.push(option); labelListElement.appendChild(option); } }; this.setLabel = function(labelCell){ if (labelCell !== null){ labelListElement.value = labelCell; } else { // deselect all options var labelOptionsArray = labelListElement.options; for (var i=0; i<labelOptionsArray.length; i++){ labelOptionsArray[i].selected = false; } } }; this.getListedLabels = function(){ var listedLabels = []; for (var i=0; i<labelOptions.length; i++){ listedLabels.push(labelOptions[i].innerHTML); } return listedLabels; }; this.getListedLabelCells = function(){ var listedLabelCells = []; for (var i=0; i<labelOptions.length; i++){ listedLabelCellss.push(labelOptions[i].value); } return listedLabelCells; }; this.clearFeatureInfo = function(){ _self.setFeatureCellRange(""); _self.setFeatureLevel(null); _self.setFeatureCategory(""); _self.setFeature(null); _self.loadLabelList(null); }; this.enableDeleteFeatureButton = function(){ deleteFeatureButton.disabled = false; }; this.disableDeleteFeatureButton = function(){ deleteFeatureButton.disabled = true; }; // ------------------- Features tab event handlers ---------------------------------- this.handleFeatureCellRangeChange = function(){ var selectedCellRange = _self.getFeatureCellRange(); try { _self.parsingController.selectCells(selectedCellRange); } catch (error){ _self.displayError(error); } }; this.handleFeatureSelection = function(event){ var selectedFeature = _self.getSelectedFeature(); if (selectedFeature !== ParserUI.FEATURE_LIST_PLACEHOLDER){ try { _self.parsingController.displayFeature(selectedFeature); _self.enableDeleteFeatureButton(); } catch(error){ _self.displayError(error); } } else { event.preventDefault(); } }; this.handleNewFeature = function(){ try { _self.parsingController.prepareUIForNewFeature(); } catch (error){ _self.displayError(error); } }; this.handleAddFeature = function(){ try{ _self.parsingController.defineFeature(); } catch(error){ _self.displayError(error); } }; this.handleDeleteFeature = function(){ var nameOfFeatureToRemove = _self.getSelectedFeature(); try{ _self.parsingController.removeFeature(nameOfFeatureToRemove); } catch(error){ _self.displayError(error); } }; this.handleApplyFeatures = function(){ try { _self.parsingController.applyAllFeaturesToGrid(); } catch(error){ _self.displayError(error); } }; // ------------------------- Experiment tab getters and setters ---------------------- this.getPlateIDSelectMethod = function(){ var method = null; if (byPlateLevelFeatureRadioButton.checked){ method = ParserUI.PLATE_LEVEL_FEATURE; } else if (byManualEntryRadioButton.checked){ method = ParserUI.MANUAL_ENTRY; } return method; }; this.setPlateIDSelectMethod = function(method){ if (method === ParserUI.MANUAL_ENTRY){ byManualEntryRadioButton.checked = true; byPlateLevelFeatureRadioButton.checked = false; } else if (method === ParserUI.PLATE_LEVEL_FEATURE){ byManualEntryRadioButton.checked = false; byPlateLevelFeatureRadioButton.checked = true; } else { byManualEntryRadioButton.checked = false; byPlateLevelFeatureRadioButton.checked = false; } }; this.loadPlateWithIDList = function(plateIDArray){ // clear the select element plateIdentifierList.innerHTML = ""; plateIdentifierList.scrollTop = 0; plateImportList.innerHTML = ""; // load the plate ID select element for (var i=0; i<plateIDArray.length; i++){ var optionContents = "plate " + (i+1) + ": " +plateIDArray[i]; var importOptionContents = "plate "+ (i+1); var option = document.createElement("option"); var importOption = document.createElement("option"); option.setAttribute("value", i.toString()); importOption.setAttribute("value", i.toString()); option.innerHTML = optionContents; importOption.innerHTML = importOptionContents; plateIdentifierList.appendChild(option); plateImportList.appendChild(importOption); } $('#plateImportList').multiSelect({ selectableHeader: "<div class='custom-header'>Plates to Import</div>", selectionHeader: "<div class='custom-header'>Plates to Skip</div>", afterSelect: this.plateImportListSelection, afterDeselect: this.plateImportListSelection }); this.plateImportListSelection(); }; this.plateImportListSelection = function(values) { _self.parsingController.platesToImport.length = 0; var options = plateImportList.options, cnt = 0, bImp; for (var idx = 0; idx < options.length; ++idx) { bImp = options[idx].selected; _self.parsingController.platesToImport.push(!bImp); if (bImp) cnt++; } importAndSaveDataButton.disabled = (cnt == options.length) ? true : false; }; this.getListedPlatesWithIDs = function(){ var result = []; var options = plateIdentifierList.options; for (var i=0; i<options.length; i++){ var opitonContents = options[i].innerHTML; var splitContents = option.split(" "); var plateID = splitContents[splitContents.length - 1]; result.push(plateID); } return result; }; this.getSelectedPlateWithIDIndex = function(){ var selectedIndex = plateIdentifierList.value; var parsedSelectedIndex = parseInt(selectedIndex); if (selectedIndex === "" || isNaN(parsedSelectedIndex)){ return null; } else { return parsedSelectedIndex; } }; this.setSelectedPlateWithIDIndex = function(plateIndex){ var plateWithIDOptionsArray = plateIdentifierList.options; if (plateIndex !== null && plateWithIDOptionsArray.length !== 0){ plateIdentifierList.value = plateIndex; } else { plateIdentifierList.scrollTop = 0; // deselect all options for (var i=0; i<plateWithIDOptionsArray.length; i++){ plateWithIDOptionsArray[i].selected = false; } } }; this.loadPlateLevelFeatureList = function(plateLevelFeatureNameArray){ // clear the select element and scroll back to the top plateLevelFeatureListElement.innerHTML = ""; plateLevelFeatureListElement.scrollTop = 0; // load the select element for (var i=0; i<plateLevelFeatureNameArray.length; i++){ var optionName = plateLevelFeatureNameArray[i]; var option = document.createElement("option"); option.setAttribute("value", optionName); option.innerHTML = optionName; plateLevelFeatureListElement.appendChild(option); } }; this.getListedPlateLevelFeatures = function(){ var result = []; var options = plateLevelFeatureListElement.options; for (var i=0; i<options.length; i++){ var opitonContents = options[i].innerHTML; result.push(optionContents); } return result; }; this.getSelectedPlateLevelFeature = function(){ var selectedPlateLevelFeature = plateLevelFeatureListElement.value; if (!selectedPlateLevelFeature){ return null; } else { return selectedPlateLevelFeature; } }; this.setSelectedPlateLevelFeature = function(featureName){ if (featureName !== null){ plateLevelFeatureListElement.value = featureName; } else { plateIdentifierList.scrollTop = 0; var plateFeatureOptions = plateLevelFeatureListElement.options; // deselect all options for (var i=0; i<plateFeatureOptions.length; i++){ plateFeatureOptions[i].selected = false; } } }; /** * * @param experimentNameIDObjectArray - an array of objects, one for each experiment * in which the experiment name is listed under the * property "name" and the experiment id is listed * under the property "id" */ this.loadExperimentSelectize = function(experimentNameIDObjectArray){ experimentSelectizeElement.clearOptions(); experimentSelectizeOptions = {}; for (var i=0; i<experimentNameIDObjectArray.length; i++){ var name = experimentNameIDObjectArray[i].name; var id = experimentNameIDObjectArray[i].id; experimentSelectizeElement.addOption(experimentNameIDObjectArray[i]); experimentSelectizeOptions[name] = id; } experimentSelectizeElement.refreshOptions(true); }; this.getExperimentOptionNames = function(){ var result = []; for (var experimentName in experimentSelectizeOptions){ result.push(experimentName); } return result; }; this.getExperimentOptionIDs = function(){ var result = []; for (var experimentName in experimentSelectizeOptions){ var experimentID = experimentSelectizeOptions[experimentName]; result.push(experimentID); } return result; }; this.getSelectedExperimentName = function(){ var selectedExperimentID = this.getSelectedExperimentID(); return experimentSelectizeElement.getOption(selectedExperimentID).html(); }; this.getSelectedExperimentID = function(){ return experimentSelectizeElement.getValue(); }; this.setSelectedExperimentByID = function(experimentID){ experimentSelectizeElement.setValue(experimentID) }; this.setSelectedExperimentByName = function(experimentName){ var experimentID = experimentSelectizeOptions[experimentName]; return experimentSelectizeElement.setValue(experimentID); }; /** * * @param plateIDArray - an array of plate identifiers to load into the plate id * selectize element */ this.loadPlateIDSelectize = function(plateIDArray){ plateIdentifierSelectizeElement.clearOptions(); plateIdentifierSelectizeOptionValues = []; for (var i=0; i<plateIDArray.length; i++){ plateIdentifierSelectizeElement.addOption({ plateID: plateIDArray[i] }); plateIdentifierSelectizeOptionValues.push(plateIDArray[i]); } plateIdentifierSelectizeElement.refreshOptions(true); }; this.getPlateIDSelectizeOptionValues = function(){ var result = []; for (var i=0; i<plateIdentifierSelectizeOptionValues.length; i++){ result.push(plateIdentifierSelectizeOptionValues[i]); } return result; }; this.getSelectedPlateIdentifier = function(){ return plateIdentifierSelectizeElement.getValue(); }; this.setSelectedPlateIdentifier = function(plateIdentifier){ if (plateIdentifier === null){ plateIdentifierSelectizeElement.clear(true); } else { plateIdentifierSelectizeElement.setValue(plateIdentifier); } }; this.incrementPlateAndIdentifierSelections = function(){ // move the selected plate with id selection down by 1 var selectedPlateIndex = _self.getSelectedPlateWithIDIndex(); var numPlates = plateIdentifierList.options.length; var newSelectedPlateIndex = (selectedPlateIndex + 1) % numPlates; _self.setSelectedPlateWithIDIndex(newSelectedPlateIndex); // move the selected plate identifier down by 1 var selectedPlateIdentifier = _self.getSelectedPlateIdentifier(); for(var i=0; i<plateIdentifierSelectizeOptionValues.length; i++){ if (plateIdentifierSelectizeOptionValues[i] === selectedPlateIdentifier){ var newSelectedPlateIdentifierIndex = (i+1)%plateIdentifierSelectizeOptionValues.length; var newSelectedPlateIdentifier = plateIdentifierSelectizeOptionValues[newSelectedPlateIdentifierIndex]; _self.setSelectedPlateIdentifier(newSelectedPlateIdentifier); } } }; // ------------------ Experiment tab event handlers ---------------------------------- this.handleDataImport = function(){ try { _self.parsingController.saveImportDataToServer(); } catch (error){ _self.displayError(error); } }; this.handleDownloadFileImport = function(){ try { _self.parsingController.downloadImportData(); } catch (error){ _self.displayError(error); } }; this.handleIntergroupDownload = function(){ try { _self.parsingController.downloadIntergroupData() ; } catch (error) { _self.displayError(error); } }; this.handleByPlateLevelFeatureMethod = function(){ try { _self.parsingController.assignPlateIDsByFeature(); } catch(error){ _self.displayError(error); } byFeatureMethodDiv.style.display = "block"; byManualMethodDiv.style.display = "none"; }; this.handleByManualMethod = function(){ try { _self.parsingController.assignPlateIDsByManualMethod(); } catch(error){ _self.displayError(error); } byFeatureMethodDiv.style.display = "none"; byManualMethodDiv.style.display = "block"; }; this.handlePlateLevelFeatureSelection = function(){ var selectedFeature = _self.getSelectedPlateLevelFeature(); try{ _self.parsingController.setPlateLevelFeatureAsPlateID(selectedFeature); } catch (error){ _self.displayError(error); } }; this.handlePlateIdSetButtonClick = function(){ var selectedIdentifier = _self.getSelectedPlateIdentifier(); var selectedPlateIndex = _self.getSelectedPlateWithIDIndex(); try{ _self.parsingController.setPlateID(selectedPlateIndex, selectedIdentifier); } catch (error) { _self.displayError(error); } }; this.handlePlateWithIdListSelection = function(){ var selectedPlateIndex = _self.getSelectedPlateWithIDIndex(); try{ _self.parsingController.showPlate(selectedPlateIndex); } catch(error){ _self.displayError(error); } }; this.handleExperimentSelection = function(){ var selectedExperimentID = _self.getSelectedExperimentID(); try{ _self.parsingController.fillOutExperimentPlateIDs(selectedExperimentID); } catch(error){ _self.displayError(error); } }; this.handlePlateIdSelection = function(selectedPlateID){ var selectedFeatureName = _self.getSelectedPlateLevelFeature(); try{ //_self.parsingController.showPlateLevelFeature(selectedFeatureName); } catch(error){ _self.displayError(error); } }; // ---------------------- tabs setters and getters ----------------------------------- this.getActiveTab = function(){ return $tabsElement.tabs( "option", "active" ); }; this.setActiveTab = function(tab){ $tabsElement.tabs("option", "active", tab); }; // ---------------------- tabs event handler ----------------------------------------- this.handleClickCell = function(event, ui){ if (e.shiftKey) { alert("shift+click") } if (e.ctrlKey) { alert("control+click") } var newTab = ui.keyCode var oldTab = ui.oldTab.index(); try { _self.parsingController.changeStage(newTab, oldTab); } catch (error) { event.preventDefault(); _self.displayError(error); } }; this.handleTabChange = function(event, ui){ var newTab = ui.newTab.index(); var oldTab = ui.oldTab.index(); try { _self.parsingController.changeStage(newTab, oldTab); } catch (error) { event.preventDefault(); _self.displayError(error); } }; // ------------------- General getters and setters ---------------------------------- this.getParsingID = function(){ return parsingIDElement.value; }; this.setParsingID = function(id){ parsingIDElement.value = id; }; this.displayError = function(error){ console.log(error); this.displayErrorMessage(error.getMessage()); }; this.displayErrorMessage = function(message){ flashMessenger.showUserMsg(FlashMessenger.ERROR, message); }; this.displayMessage = function(message){ flashMessenger.showUserMsg(FlashMessenger.HIGHLIGHT, message) }; this.enableSaveButton = function(){ saveConfigButton.disabled = false; }; this.disableSaveButton = function(){ saveConfigButton.disabled = true; }; this.enableSaveAsButton = function(){ saveAsConfigButton.disabled = false; }; this.disableSaveAsButton = function(){ saveAsConfigButton.disabled = true; }; // -------------------- General event handlers --------------------------------------- this.handleSaveConfig = function(){ try { _self.parsingController.saveParsingConfigToServer(); } catch (error){ _self.displayError(error); } }; this.handleSaveAsConfig = function(){ if (_self.parseOnlyModeOn){ _self.switchOutOfParseOnlyMode(); } else { try { _self.parsingController.saveAsParsingConfigToServer(); } catch (error){ _self.displayError(error); } } }; this.switchSaveAsButtonToModifyAsNewParsingConfig = function(){ saveAsConfigButton.innerHTML = "Modify as new Parsing Configuration"; }; this.switchSaveAsButtonBackToSaveAs = function(){ saveAsConfigButton.innerHTML = "Save As"; }; this.switchToParseOnlyMode = function(){ parsingNameElement = switchTextInputToSpan(parsingNameElement); machineNameElement = switchTextInputToSpan(machineNameElement); parsingDescriptionElement = switchTextAreaToP(parsingDescriptionElement); _self.switchDelimiterListToSpan(); firstPlateCellRangeElement = switchTextInputToSpan(firstPlateCellRangeElement); featureCellRangeElement = switchTextInputToSpan(featureCellRangeElement); featureCategoryElement = switchTextInputToSpan(featureCategoryElement); applyFirstPlateButton.style.display = "none"; newFeatureButton.style.display = "none"; addFeatureButton.style.display = "none"; deleteFeatureButton.style.display = "none"; _self.switchSaveAsButtonToModifyAsNewParsingConfig(); _self.parseOnlyModeOn = true; }; this.switchOutOfParseOnlyMode = function(){ parsingNameElement = switchSpanToTextInput(parsingNameElement); machineNameElement = switchSpanToTextInput(machineNameElement); parsingDescriptionElement = switchPToTextArea(parsingDescriptionElement); _self.switchDelimiterListToSelect(); firstPlateCellRangeElement = switchSpanToTextInput(firstPlateCellRangeElement); featureCellRangeElement = switchSpanToTextInput(featureCellRangeElement); featureCategoryElement = switchSpanToTextInput(featureCategoryElement); applyFirstPlateButton.style.display = "inline"; newFeatureButton.style.display = "inline"; addFeatureButton.style.display = "inline"; deleteFeatureButton.style.display = "inline"; _self.switchSaveAsButtonBackToSaveAs(); _self.parseOnlyModeOn = false; }; function switchTextInputToSpan(element){ var span = document.createElement("span"); span.innerHTML = element.value; span.id = element.id; $(element).replaceWith(span); return span; } function switchSpanToTextInput(element){ var textInput = document.createElement("input"); textInput.value = element.innerHTML; textInput.id = element.id; $(element).replaceWith(textInput); return textInput; } function switchTextAreaToP(element){ var p = document.createElement("p"); p.innerHTML = element.value; p.id = element.id; $(element).replaceWith(p); return p; } function switchPToTextArea(element){ var textArea = document.createElement("textarea"); textArea.value = element.innerHTML; textArea.id = element.id; $(element).replaceWith(textArea); return textArea; } function loadSelectElement(selectElement, optionNamesArray, optionsArray){ // clear the select element and scroll back to the top selectElement.innerHTML = ""; selectElement.scrollTop = 0; optionsArray = []; // load the select element for (var i=0; i<optionNamesArray.length; i++){ var optionName = optionNamesArray[i]; var option = document.createElement("option"); optionsArray.push(option); option.setAttribute("value", optionName); option.innerHTML = optionName; selectElement.appendChild(option); } } /** * getTargetElement - This function get a reference to the HTML element that * triggered an event * @param event - the event for which we wish the element that triggered it * @returns - the HTML element that triggered the event. */ function getTargetElement(event){ 'use strict'; var target; // make sure we have the event, depending on different browser // capabilities event = event || window.event; // get a reference to the element that triggered the event, depending on // different browser capabilities target = event.target || event.srcElement; return target; } // end of function getTargetElement /** * addEvent - This function adds an event handler to an html element in * a way that covers many browser types. * @param elementId - the string id of the element to attach the handler to * or a reference to the element itself. * @param eventType - a string representation of the event to be handled * without the "on" prefix * @param handlerFunction - the function to handle the event */ function addEvent(elementId, eventType, handlerFunction) { 'use strict'; var element; if (typeof(elementId) === "string"){ element = document.getElementById(elementId); } else { element = elementId; } if (element.addEventListener) { element.addEventListener(eventType, handlerFunction, false); } else if (window.attachEvent) { element.attachEvent("on" + eventType, handlerFunction); } } // end of function addEvent function init (){ // +++++++++++++++++++++ parsing tab events +++++++++++++++++++++++++++++++++++++ // when a file is selected using the files input, trigger the file select handler addEvent(filesInput, "change", _self.handleFileSelect); // if the choose file button is clicked, trigger a click event on the hidden // files input, to open a file system browser for selecting files addEvent(chooseFileButton, "click", function(){ filesInput.click(); }); // Attach listener for when a file is first dragged onto the screen addEvent(document, "dragenter", function(e){ e.stopPropagation(); e.preventDefault(); // Show an overlay so it is clear what the user needs to do document.body.classList.add('show-overlay'); }); // Attach a listener for while the file is over the browser window addEvent(document, "dragover", function(e) { e.stopPropagation(); e.preventDefault(); }); // Attach a listener for when the file is actually dropped, and trigger the // file select handler addEvent(document, "drop", function(e) { e.stopPropagation(); e.preventDefault(); // Hides the overlay document.body.classList.remove('show-overlay'); // Process the files _self.handleFileSelect(e); }); addEvent(delimiterList, "change", _self.handleDelimiterChange); // ++++++++++++++++++ plate tab events +++++++++++++++++++++++++++++++++++++++++++ addEvent(firstPlateCellRangeElement, "change", _self.handleFirstPlateCellRangeChange); addEvent(applyFirstPlateButton, "click", _self.handleApplyFirstPlate); // ++++++++++++++++++++ features tab events ++++++++++++++++++++++++++++++++++++++ addEvent(newFeatureButton, "click", _self.handleNewFeature); addEvent(addFeatureButton, "click", _self.handleAddFeature); addEvent(deleteFeatureButton, "click", _self.handleDeleteFeature); addEvent(applyFeaturesButton, "click", _self.handleApplyFeatures); addEvent(featureListElement, "change", _self.handleFeatureSelection); addEvent(featureCellRangeElement, "change", _self.handleFeatureCellRangeChange); // ++++++++++++++++++++ Experiment tab events and selectize setup ++++++++++++++++ addEvent(importAndSaveDataButton, "click", _self.handleDataImport); addEvent(downloadFileImportButton, "click", _self.handleDownloadFileImport); addEvent(downloadIntergroupButton, "click", _self.handleIntergroupDownload); addEvent(byPlateLevelFeatureRadioButton, "click", _self.handleByPlateLevelFeatureMethod); addEvent(byManualEntryRadioButton, "click", _self.handleByManualMethod); addEvent(plateLevelFeatureListElement, "change", _self.handlePlateLevelFeatureSelection); addEvent(setPlateIdButton, "click", _self.handlePlateIdSetButtonClick); addEvent(plateIdentifierList, "change", _self.handlePlateWithIdListSelection); var $select1 = $("#experiment").selectize({ labelField: "name", valueField: "id", onChange: _self.handleExperimentSelection, create: false }); experimentSelectizeElement = $select1[0].selectize; var $select2 = $("#plateID").selectize({ labelField: "plateID", valueField: "plateID", onChange: _self.handlePlateIdSelection, create: true }); plateIdentifierSelectizeElement = $select2[0].selectize; // ++++++++++++++++++++++++ tabs setup and events ++++++++++++++++++++++++++++++++ // to get jQuery-UI tab functionality working $tabsElement.tabs({ beforeActivate: _self.handleTabChange }); // ++++++++++++++++++++++++++ General events +++++++++++++++++++++++++++++++++++++ addEvent(saveConfigButton, "click", _self.handleSaveConfig); addEvent(saveAsConfigButton, "click", _self.handleSaveAsConfig); // +++++++++++++++++++++++++++ start the Parsing Controller ++++++++++++++++++++++ } // set up all of the event handlers init(); } ParserUI.convertStringToCellRange = function(string){ if (!string){ return null; } var range = string.trim(); var rangeSplit = range.split(":"); if (!rangeSplit || !(rangeSplit[0] && typeof rangeSplit[0] === "string") || !(rangeSplit[1] && typeof rangeSplit[0] === "string")){ return null; } var startCoords = Grid.getCellCoordinates(rangeSplit[0].trim()); var endCoords = Grid.getCellCoordinates(rangeSplit[1].trim()); if (!startCoords || !startCoords[0] || !startCoords[1] || typeof startCoords[0] !== "number" || typeof startCoords[1] !== "number"){ return null } if (!endCoords || !endCoords[0] || !endCoords[1] || typeof endCoords[0] !== "number" || typeof endCoords[1] !== "number"){ return null } var cellRange = new CellRange(startCoords[0], startCoords[1], endCoords[0], endCoords[1]); return cellRange; };
platify/platify
grails-app/assets/javascripts/parser/ParserUI.js
JavaScript
gpl-3.0
47,186
[ 30522, 1013, 1008, 1008, 1008, 2580, 2011, 19474, 22345, 2378, 2006, 1018, 1013, 2322, 1013, 2321, 1012, 1008, 1013, 11968, 8043, 10179, 1012, 11968, 7741, 1027, 1014, 1025, 11968, 8043, 10179, 1012, 7766, 1027, 1015, 1025, 11968, 8043, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=yes'> <title>Video Poker</title> <style> @import url('https://fonts.googleapis.com/css?family=Luckiest+Guy'); body { background-color:#0032b4; color:#fff; font-family:"Helvetica Neue",Helvetica,sans-serif; font-size:1vw; } #main { perspective:1000px; position:absolute; top:0px; right:0px; bottom:0px; left:0px; text-align:center; } #paytable { display:none; width:90%; color:#ffffff; border: 4px outset #0df; margin:.5em auto 0px; background-color:#142850; border-collapse:collapse; line-height:1em; font-weight: 700; font-size:130%;text-transform: uppercase; } #paybet { background-color:#0af; color:#ff0;border-bottom: 2px solid #fff; } #paytable td#paybet1, #paytable td#paybet2,#paytable td#paybet3,#paytable td#paybet4,#paytable td#paybet5 { background-color:#0af; color:#ff0; text-align:center; border-bottom: 2px solid #fff; } table#paytable .paybet { background-color:#c00; color:#ff0; } #paytable td { text-align:left; border-left:3px solid #0af; white-space:nowrap; padding:.125em .25em .125em .25em;} #paytable td.right { text-align:right; } .paybet { background-color:#ff0; } #toolbar { display:inline-block; position:absolute; left:0px; bottom:0px; right:0px; height:15%; text-align:center; background-color:rgba(0,0,0,.5); } button { z-index:999; margin-top:1em; font-size:200%; color:#000; background-color:#cccc00; border:.25em outset #ffff00; width:7em; height 3em; text-transform:uppercase; height:3em; font-weight:bold; position:relative; text-shadow: 2px 2px 1px rgba(255,255,255,.5);} button.disabled { color: #cccc00; text-shadow: none; } .right { text-align:right; } .left { text-align:left; } h2 { width:3.3vw; height:6.1vh; margin:0; padding:1.3vw 1.6vw 1.1vw 0.7vw; color:#fff; z-index:9999; border-radius:5vw; display:inline-block; border:0.6vw dashed #fff; font-size:3vw; top:-1vh; position:relative; letter-spacing:-4px; text-shadow:-1px -2px 0px #000; } .status { display:inline-block; } #bet { width:30%; color:#eee; position:absolute; left:2vw; height:8vh; font-size:3vw; top:5vh; text-align:left; } #bet:before { content: "BET: "; } #credit { width:30vw; color:#eef; position:absolute; right:2vw; height:8vh; font-size:3vw; top:5vh; text-align:right; } #credit:before { content: "CREDITS: "; } #win { width:33%; color:#eee; position:absolute; left:33%; height:9vh; top:5vh; font-size:3vw;z-index:9999; } @keyframes bounce { 0% { transform: rotate(0deg) scale(1); } 10% { transform: rotate(-15deg) scale(1.5); } 20% { transform: rotate(15deg) scale(1); } 30% { transform: rotate(-10deg) scale(1.5); } 40% { transform: rotate(10deg) scale(1); } 50% { transform: rotate(-5deg) scale(1.5); } 60% { transform: rotate(5deg) scale(1); } 70% { transform: scale(1.5); } 80% { transform: scale(1); } 90% { transform: scale(1.5); } 100% { transform: scale(1); } } .handresult { font-size:2em; background-color:rgba(174,84,231,1); color:#fff; border:.25vw solid rgba(107,36,154,1); border-bottom-left-radius:1vw; border-bottom-right-radius:1vw; font-weight:bold; text-shadow:2px 2px 2px #000; z-index:99999; width:100%; position:absolute; bottom:-0.2vh; left:0; display:none; overflow:hidden; transition:all 300ms cubic-bezier(.25, .99, .71, 1.23); height:5vh; text-transform:uppercase; } #cards .handresult { font-size:3vw; bottom:-1.5vh; height:7vh; } #won { position: absolute; display: inline-block; width:50vw; top: 22%; left: 20%; font-size: 1.5vw; color: #f9e945; text-shadow: 2px 2px 0px #000; font-weight: bold; background-color: rgba(0,0,0,.5); padding: 2vh 4vw 2vh; border-radius: 4vw; border: 1vw solid rgb(249, 233, 69); transform: scale(1); z-index: 99999; box-shadow: 0 0.5vw 0.5vw rgba(0,0,0,.4); animation: bounce 2s 2; display:none; animation: win 2000ms 2; } #won button { border-radius:4vw; } @keyframes win { 0% { text-shadow:0 0 0 #fff; transform:scale(1); } 10% { transform:scale(1.25); } 20% { transform:scale(1.0); } 30% { transform:scale(1.25); } 40% { transform:scale(1.0); } 50% { text-shadow:0 0 6vw #fff; } 60% { text-shadow:0 0 0vw #fff; } 70% { text-shadow:0 0 6vw #fff; } 80% { text-shadow:0 0 0vw #fff; } 90% { text-shadow:0 0 6vw #fff; transform:scale(1.25); } 100% { text-shadow:0 0 0vw #fff; transform:scale(1.0); } } table#paytable tr.winner { background-color:#00d8ff; color:#000;} td.winner { background-color:#fff; transform:scale(1); text-align:center; animation: throb 2s; } #results { margin-top:-2em; display:none;} .status { height: 10vh; position: absolute; font-weight: bold; bottom:16vh; text-shadow: 2px 2px 1px rgba(0,0,0,.5); left: 0px; width:100%; z-index:99; } @keyframes throb { 0% { transform: scale(2); } 20% { transform: scale(1); } 40% { transform: scale(2); } 60% { transform: scale(1); } 80% { transform: scale(2); } 100% { transform: scale(1); } } th { border-bottom:3px solid #0df; border-right:3px solid #0df; } #payleft, #payright { position:absolute; line-height:1.4vw; bottom:15vh; width:16vw; height:42vh; } #payleft { left:0px; } #payright { right:0px; } .payline { background-color: #f00; margin: 0.2vh .5vw; font-size: 1.25vw; text-transform: uppercase; text-align: center; text-shadow: 1.5px 1.5px 0px #000; border-radius: 1.5vw; border: 0.2vw outset; font-weight: bold; padding-bottom: 0.3vh; } .pay { background-color: #000; display: block; width: 10vw; margin: 0 auto 0vh; border: 2px inset #ff0; padding:0.4vh 2vw; border-bottom-left-radius:1.2vw; border-bottom-right-radius:1.2vw; } #gameselect { position:absolute; display:inline-block; bottom:11vh; left:18vw; width:24vw; height:0vh; background:linear-gradient(to top, #f4e130 0%,#fff460 100%); z-index:999; font-size:2.4vw; color:#000; text-shadow:1px 1px 0px #fff; box-shadow:.25vw -.25vw .25vw rgba(0,0,0,.4), -.25vw 0 .25vw rgba(0,0,0,.4); overflow:hidden; font-weight:500; text-transform:uppercase; transition:all 300ms cubic-bezier(.25, .99, .71, 1.23); text-align:left; } #handselect { position:absolute; display:inline-block; bottom:11vh; left:32.3vw; width:14vw; height:0vh; background:linear-gradient(to top, #f4e130 0%,#fff460 100%); z-index:999; text-align:center; font-size:3vw; color:#000; text-shadow:1px 1px 0px #fff; box-shadow:.25vw -.25vw .25vw rgba(0,0,0,.4), -.25vw 0 .25vw rgba(0,0,0,.4); overflow:hidden; font-weight:500; text-transform:uppercase; transition:all 300ms cubic-bezier(.25, .99, .71, 1.23); } div#handselect.open { height:33vh; } div#gameselect.open { height:36vh; } #handselect input { display:none; } #handcount { margin:0; padding:0; } #gameslist { margin:0; padding:0; } #gameslist li { list-style-type:none; border-bottom:1px solid #660; cursor:pointer; padding:1vh;} .gameslistSelected { background-color:#660; color:#fff; } #handcount li { list-style-type:none; border-bottom: 1px solid #660; cursor:pointer; } .handcountSelected { background-color:#660; color:#fff; } #doubleup { position:absolute; display:none; top:0; left:0; right:0; bottom:0; background-color:#0032b4; z-index:99999; width:100%; } #doubleup .cardwrap .card { width:90%; height:90%; } #doubleup .cardwrap { padding-left:2.5vw; } #doubleheader { font-size:2vw; font-family:"Luckiest Guy", cursive; } #doubleheader h1 { color:#c00; -webkit-text-stroke: .125vw #ff0; font-size:2em; } #doubleheader button {font-size:1.5vw;margin-left:2vw; } .dealercardlabel { display: inline-block; position: relative; top: -2.2vh; background-color: #0032b4; color: #ff0; font-size: 1.5em; padding: 0px 0.25vw; left: -1.6vw; font-weight: bold; text-shadow: 2px 2px 0px #000; white-space: nowrap;} #doubledealer { display: inline-block; width: 12vw; margin-right: 4vw; border: .25vw solid #ff0; border-radius: 1vw; padding-left: 3vw; height: 38vh; } </style> <link rel='manifest' href='manifest.json'> <link rel='stylesheet' type='text/css' href='poker5.css'> <script src="pokersolver.js"></script> <script src="https://www.gstatic.com/firebasejs/3.9.0/firebase.js"></script> <script> // Initialize Firebase var config = { apiKey: "AIzaSyDxGzBuvFA2qrOZZPBdTmIjsXAgWpcrmcs", authDomain: "crblackjack-9e220.firebaseapp.com", databaseURL: "https://crblackjack-9e220.firebaseio.com", projectId: "crblackjack-9e220", storageBucket: "crblackjack-9e220.appspot.com", messagingSenderId: "32143422101" }; firebase.initializeApp(config); </script> </head> <body> <div id='main'> <table id='paytable'> <colgroup> <col> <col id='bet1pay'> <col id='bet2pay'> <col id='bet3pay'> <col id='bet4pay'> <col id='bet5pay'> </colgroup> </table> <div id='holds'> <div id='card0-hold' class='hold'></div> <div id='card1-hold' class='hold'></div> <div id='card2-hold' class='hold'></div> <div id='card3-hold' class='hold'></div> <div id='card4-hold' class='hold'></div> </div> <div id='hands'> </div> <div id='payleft'></div> <div id='cards'> <div id='card0' class='cardwrap'><div class='card card1H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='card1' class='cardwrap'><div class='card card13H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='card2' class='cardwrap'><div class='card card12H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='card3' class='cardwrap'><div class='card card11H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='card4' class='cardwrap'><div class='card card10H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='result' class='handresult'></div> </div> <div id='payright'></div> <div id='status' class='status'> <div id='bet'>0</div> <div id='win'></div> <div id='credit'></div> </div> <div id='won'></div> <div id='gameover'>PLAY 5 CREDITS</div> <div id='gameselect'> <ul id='gameslist'> <li id='game_poker'>Jacks or Better</li> <li id='game_bonus'>Bonus Poker</li> <li id='game_doublebonus'>Double Bonus</li> <li id='game_dueces'>Dueces Wild</li> <li id='game_joker'>Joker Poker</li> </ul> </div> <div id='handselect'> <ul id='handcount'> <li id='handcount5'>5</li> <li id='handcount10'>10</li> <li id='handcount25'>25</li> <li id='handcount50'>50</li> <li id='handcount100'>100</li> </ul> </div> <div id='toolbar'> <span class='left'> <button onclick='cdr.login()' class='leftButton' id='loginButton'>Login</button> <button onclick='cdr.changeGames()' id='gamesButton'>Games</button> <button onclick='cdr.changeHands()' id='handsButton'>Hands</button> </span> <h2 id='denom'>$1</h2> <span class='right'> <button onclick='cdr.betone()' id='betOne'>Bet 1</button> <button onclick='cdr.betmax()' id='betMax'>Bet 5</button> <button id='dealdrawButton' onclick='cdr.dealdraw()' disabled='true' class='rightButton disabled'>Deal</button> </span> </div> <div id='doubleup'> <div id='doubleheader'> <h1>Double Up?</h1> <p>YOU WON $<span id='doublewin'>0</span></p> <p>DOUBLE UP TO $<span id='doubledouble'>0</span></p> <p> <button id='doubleButton'>Double</button> <button id='collectButton'>Collect</button> </p> </div> <div id='doublecards'> <div id='doubledealer'><span class='dealercardlabel'>DEALERS CARD</span><br><div id='doublecard0' class='cardwrap flipped' ><div class='card card1S'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div></div> <div id='doublecard1' class='cardwrap flipped'><br><div class='card card3H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='doublecard2' class='cardwrap flipped'><br><div class='card card8D'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='doublecard3' class='cardwrap flipped'><br><div class='card card11C'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> <div id='doublecard4' class='cardwrap flipped'><br><div class='card card10H'><figure class='pic'>&nbsp;</figure></div><div class='cardback'><figure class='pic'>&nbsp;</figure></div></div> </div> </div> </div> <script> (function() { window.cdr = { game: { endpoint: "https://us-central1-crblackjack-9e220.cloudfunctions.net/", hands: 10, type: "poker", wilds: "", chipColors: ["#dd0", "#0c0", "#c00", "#c0c", "#000", "#0be", "#fa0", "#999", "#0a6", "#69a", "#333", "#000"], creditValues: [ 1, 2, 5, 10, 25, 100, 250, 500, 1000, 2000, 5000, 10000, 50000 ], creditValueIdx:0, creditValue:1, cards: [], discards: {}, holds: {}, bet: 0, credit: 1000, uid:"", stage:0 }, paytable: { "RoyalFlush": { hand: 'Royal Flush', win: [ 250, 500, 750, 1000, 4000]}, "StraightFlush": { hand: 'Straight Flush', win: [ 50, 100, 150, 200, 250]}, "FourOfAKind": { hand: 'Four of a Kind', win: [ 25, 50, 75, 100, 125]}, "FullHouse": { hand: 'Full House', win: [ 9, 18, 27, 36, 45]}, "Flush": { hand: 'Flush', win: [ 6, 12, 18, 24, 30]}, "Straight": { hand: 'Straight', win: [ 4, 8, 12, 16, 20]}, "ThreeOfAKind": { hand: 'Three of a Kind', win: [ 3, 6, 9, 12, 15]}, "TwoPair": { hand: 'Two Pair', win: [ 2, 4, 6, 8, 10]}, "OnePair": { hand: 'Jacks or Better', win: [ 1, 2, 3, 4, 5]} }, games: { "poker": "Jacks or Better", "bonus": "Bonus Poker", "doublebonus": "Double Bonus Poker", "dueces": "Dueces Wild", "joker": "Joker Poker" }, addListener: function(i) { $$("card" + i).addEventListener("click", function(e) { cdr.toggleCard("card" + i, 0); }); }, changeGames: function() { $$("game_"+cdr.game.type).classList.add('gameslistSelected'); $$("gameselect").classList.toggle("open"); $$("handselect").classList.remove("open"); }, changeHands: function() { $$("handcount"+cdr.game.hands).classList.add('handcountSelected'); $$("handselect").classList.toggle("open"); $$("gameselect").classList.remove("open"); }, betone: function() { $$("handselect").classList.remove("open"); $$("gameselect").classList.remove("open"); if (cdr.game.bet > 0) $(".paybet").classList.remove('paybet'); cdr.game.bet++; if (cdr.game.bet > 5) { cdr.game.bet = 0; $$("dealdrawButton").setAttribute("disabled", true); $$("dealdrawButton").classList.add("disabled"); } if (cdr.game.bet > 0) { $$("dealdrawButton").removeAttribute("disabled"); $$("dealdrawButton").classList.remove("disabled"); $$("paytable").className = "paybet" + cdr.game.bet; if ($(".paybet")) $(".paybet").classList.remove('paybet'); $$("bet"+cdr.game.bet+"pay").classList.add('paybet'); } $$("bet").innerHTML = cdr.game.bet + "x"+cdr.game.hands; cdr.genPaytable(); }, betmax: function() { $$("handselect").classList.remove("open"); $$("gameselect").classList.remove("open"); cdr.game.bet = 5; if (cdr.game.bet > 0) { $$("dealdrawButton").removeAttribute("disabled"); $$("dealdrawButton").classList.remove("disabled"); $$("dealdrawButton").innerHTML = "DEAL"; $$("paytable").className = "paybet" + cdr.game.bet; if ($(".paybet")) $(".paybet").classList.remove('paybet'); $$("bet"+cdr.game.bet+"pay").classList.add('paybet'); } else { $$("dealdrawButton").setAttribute("disabled"); $$("dealdrawButton").classList.add("disabled"); } $$("bet").innerHTML = cdr.game.bet + "x" + cdr.game.hands + "(" + (cdr.game.bet * cdr.game.hands) + ")"; cdr.genPaytable(); cdr.deal(); }, dealdraw: function() { $$("handselect").classList.remove("open"); $$("gameselect").classList.remove("open"); if (cdr.game.stage === 0) { cdr.deal(); } else if (cdr.game.stage === 1) { cdr.draw(); } }, addListeners: function() { $$("cards").addEventListener("mousedown", function(e) { var tgt = e.target; if (tgt.classList.contains('card')) { cdr.toggleCard(tgt.parentNode.id, 0, 0); } else if (tgt.classList.contains('cardwrap')) { cdr.toggleCard(tgt.id, 0, 0); } }); $$("gameslist").addEventListener("click", function(e) { $(".gameslistSelected").classList.remove("gameslistSelected"); var tgt = e.target; var matches = tgt.id.match(/game_(\w+)/); if (matches[1]) { cdr.game.type = matches[1]; tgt.classList.add('gameslistSelected'); var url = document.location.href.replace(/#.*/, ''); document.location.href = url + "#" + cdr.game.type; $$("gameselect").classList.remove('open'); cdr.init(); $$('win').innerHTML = tgt.innerHTML; cdr.settings.type = matches[1]; localStorage.setItem("settings", JSON.stringify(cdr.settings)); } }); $$("handcount").addEventListener("click", function(e) { var tgt = e.target; var matches = tgt.id.match(/handcount(\d+)/); if (matches[1]) { var newcount = parseInt(matches[1]); cdr.switchHands(newcount); cdr.settings.hands = newcount; localStorage.setItem("settings", JSON.stringify(cdr.settings)); } }); $$("denom").addEventListener("click", function(e) { cdr.game.creditValueIdx++; if (cdr.game.creditValueIdx > cdr.game.creditValues.length - 1) cdr.game.creditValueIdx = 0; if (cdr.game.balance / cdr.game.creditValues[cdr.game.creditValueIdx] < 0) cdr.game.creditValueIdx = 0; cdr.game.creditValue = cdr.game.creditValues[cdr.game.creditValueIdx]; cdr.updateChip(); cdr.updateCredits(); cdr.settings.creditValue = cdr.game.creditValue; cdr.settings.creditValueIdx = cdr.game.creditValueIdx; localStorage.setItem("settings", JSON.stringify(cdr.settings)); }); }, init: function() { if (document.location.hash) { cdr.game.type = document.location.hash.replace(/^#/, ''); if (cdr.game.type==="dueces") { $$("main").classList.add('wilds'); cdr.game.wilds = "wilds"; } else { cdr.game.wilds = ""; } } var savedJS = localStorage.getItem("settings"); if (savedJS) { cdr.settings = JSON.parse(savedJS); for (var i in cdr.settings) { if (cdr.settings.hasOwnProperty(i)) { cdr.game[i] = cdr.settings[i]; } } } cdr.updateChip(); cdr.genPaytable(); cdr.makeHands(); //var cards = cdr.newDeck(); $$("main").classList.add("hands"+cdr.game.hands); $$("gameover").style.transform = "scale(1)"; $$("gameover").innerHTML = cdr.games[cdr.game.type]; if (!cdr.game.listening) { cdr.addListeners(); cdr.game.listening = true; } }, switchHands: function(handcount) { $$("handcount"+cdr.game.hands).className = ""; $$("handcount"+handcount).className = "handcountSelected"; cdr.game.hands = handcount; setTimeout(function() { $$("handselect").classList.remove("open"); }, 250); setTimeout(function() { cdr.makeHands(); $$("main").className = "hands"+cdr.game.hands + " " + cdr.game.wilds; }, 250); }, updateChip: function() { $$("denom").className = "chip" + cdr.game.creditValue; $$("denom").style.backgroundColor = cdr.game.chipColors[cdr.game.creditValueIdx]; var show = (cdr.game.creditValue>999) ? (cdr.game.creditValue / 1000) + "K" : cdr.game.creditValue; $$("denom").innerHTML = "$" + show; }, updateCredits: function() { var uid = cdr.game.uid; firebase.database().ref("bank/"+uid+"/balance").on("value", function(snapshot) { var balance = snapshot.val(); cdr.game.balance = balance; cdr.game.credit = Math.floor(balance / cdr.game.creditValue); var showCredit = cdr.game.credit; if (showCredit > 1000000000) { showCredit = Math.floor(showCredit / 1000000) / 100 + "B"; } else if (showCredit > 1000000) { showCredit = Math.floor(showCredit / 1000) / 100 + "M"; } else if (showCredit > 1000) { showCredit = Math.floor(showCredit / 100) / 10 + "K"; } $$("credit").innerHTML = showCredit; if ((cdr.game.credit < 1) || cdr.game.active) { cdr.disable("betOne"); cdr.disable("betMax"); } else if (cdr.game.credit < 5) { cdr.enable("betOne"); cdr.disable("betMax"); } else { cdr.enable("betOne"); cdr.enable("betMax"); } }); }, disable: function(item) { $$(item).setAttribute("disabled",true); $$(item).classList.add('disabled'); }, enable: function(item) { $$(item).removeAttribute("disabled"); $$(item).classList.remove('disabled'); }, toggleCard: function(card, delay) { // setTimeout(function() { $$(card).classList.toggle('flipped'); }, delay * 100); var current = $$(card + '-hold').style.visibility; if (current==="hidden") { $$(card + '-hold').style.visibility = ""; cdr.game.holds[card] = true; for (var i=1; i < cdr.game.hands; i++) { $("#hand"+i+card+" .card").className = $("#"+card+" .card").className; // $$("hand"+i+card).classList.remove('flipped'); cdr.showCard("hand"+i+card, 0, 0); } } else { $$(card + '-hold').style.visibility = "hidden"; for (var i=1; i < cdr.game.hands; i++) { // $$("hand"+i+card).classList.add('flipped'); cdr.hideCard("hand"+i+card, 0, 0); } delete cdr.game.holds[card]; } // if (cdr.game.discards[card]) { delete cdr.game.discards[card]; } else { cdr.game.discards[card] = true; } }, hideCard: function(card, delay) { setTimeout(function() { $$(card).classList.add('flipped'); setTimeout(function() { $("#"+card+" .card").style.visibility='hidden';}, 100); }, delay * 10); }, showCard: function(card, delay, wait=500) { setTimeout(function() { $("#"+card+" .card").style.visibility='visible'; $$(card).classList.remove('flipped'); }, (delay * 10) + wait); }, setCard: function(i, draw, delay) { setTimeout(function() { $("#card" + i + " .card").className = 'card card' + draw; }, (delay * 100)); }, clearHolds: function() { for (var i=0; i<5; i++) { $$("card"+i+"-hold").style.visibility = "hidden"; } cdr.game.holds = []; }, newCard: function(card, newcard, delay) { var match = card.match(/card(\d)/); cdr.game.cards[match[1]] = newcard; setTimeout(function() { $("#" + card + " .card").className = "card card" + newcard; }, delay * 75); }, draw: function() { var cnt = 0; var needcards = []; $$("dealdrawButton").setAttribute("disabled", true); $$("dealdrawButton").classList.add('disabled'); $$("dealdrawButton").innerHTML = "DEAL"; for (var i=0; i<5; i++) { if (!cdr.game.holds["card"+i]) { cdr.hideCard('card' + i, cnt); cnt++; cdr.game.discards["card"+i] = true; needcards.push(i); } } var scr = document.createElement('script'); scr.src = cdr.game.endpoint + "exchangeCards?game="+cdr.game.type+"&callback=cdr.newCards&hands=" + cdr.game.hands + "&uid=" + firebase.auth().currentUser.uid + "&discard=" + needcards.join(','); document.body.appendChild(scr); }, newCards: function(cards) { console.log("cards: "+JSON.stringify(cards)); console.dir(cards); cdr.game.results = cards; cdr.game.resultCounts = {}; cdr.game.stage = 2; var cnt = 0; var wintot = 0; var c = cards.hands[0]; for (var j=0; j < c.length; j++) { if ($$("card"+j).classList.contains('flipped')) { $("#card"+j+" .card").className = "card card" + c[j]; $("#card"+j+" .card").style.visibility = "visible"; cdr.showCard("card"+j, cnt, 0); cnt++; } } if (cards.results[0]) { cdr.showResult(0, cards); wintot += cards.wins[0]; if (!cdr.game.resultCounts[cards.results[0]]) cdr.game.resultCounts[cards.results[0]] = 0; cdr.game.resultCounts[cards.results[0]]++; cdr.genPaytable(cdr.game.resultCounts); } var discards = 0; for (var i=1; i < cards.hands.length; i++) { var c = cards.hands[i]; for (var j=0; j < c.length; j++) { if ($$("hand"+i+"card"+j).classList.contains('flipped')) { $("#hand"+i+"card"+j+" .card").className = "card card" + c[j]; cdr.showCard("hand"+i+"card"+j, cnt, 0); } } cnt++; if (!discards) discards = cnt; if (cards.results[i]) { cdr.showResult(i, cards); wintot += cards.wins[i]; if (!cdr.game.resultCounts[cards.results[i]]) cdr.game.resultCounts[cards.results[i]] = 0; cdr.updatePaytable(i, cards.results[i]); } } if (wintot > 0) { setTimeout(function() { $$("won").innerHTML = "<h1>YOU'VE WON "+Math.floor(wintot / cdr.game.creditValue)+" CREDITS!</h1><h1>\"DOUBLE IT\" TO "+Math.floor(wintot / cdr.game.creditValue) * 2 +"?</h1><button onclick='cdr.doubleup()'>DOUBLE IT</button> <button onclick='$$(\"won\").style.display = \"none\"'>COLLECT</button>"; $$("won").style.display = "inline-block"; $$("win").innerHTML = "WIN: "+Math.floor(wintot / cdr.game.creditValue); cdr.resetButtons(); cdr.game.active = false; cdr.game.stage = 0; /*setTimeout(function() { $$("doublewin").innerHTML = Math.floor(wintot / cdr.game.creditValue); $$("doubledouble").innerHTML = Math.floor(wintot / cdr.game.creditValue) * 2; $$("doubleup").style.display = "inline-block"; }, 2000);*/ }, cnt * 25); } else { cdr.gameoverTimeout = setTimeout(function() { $$("gameover").innerHTML = "GAME OVER"; $$("gameover").style.transform = "scale(1)"; }, 1000); cdr.game.active = false; cdr.resetButtons(); cdr.game.stage = 0; } }, updatePaytable: function(cnt, hand) { setTimeout(function() { cdr.game.resultCounts[hand]++; cdr.genPaytable(cdr.game.resultCounts); }, cnt * 10); }, showResult: function(i, cards) { var el = (i > 0) ? $$("hand"+i+"result") : $$("result"); setTimeout(function() { el.innerHTML = cards.results[i].replace(/([a-z0-9])([A-Z0-9])/g, '$1 $2').replace(/([A-Z])([A-Z])/g, '$1 $2'); el.style.display = "inline-block"; el.style.height = ""; }, 10 * i); }, checkWin: function() { var scr = document.createElement('script'); scr.src = cdr.game.endpoint + "checkHand?callback=cdr.gotWin&game="+cdr.game.type+"&uid=" + firebase.auth().currentUser.uid; document.body.appendChild(scr); }, gotWin: function(hand, won) { if (hand && won) { var win = cdr.paytable[hand]; if (win) { $$("win").innerHTML = win.hand; $$("won").style.display = "inline-block"; $$("won").innerHTML = "WON " + win.win[cdr.game.bet - 1]; cdr.clearWinners(); $$(hand).classList.add('winner'); $$(hand + (cdr.game.bet - 1)).classList.add('winner'); cdr.gameoverTimeout = setTimeout(function() { $$("gameover").innerHTML = "GAME OVER"; $$("gameover").style.transform = "scale(1)"; }, 10000); } } else { $$("gameover").innerHTML = "GAME OVER"; $$("gameover").style.transform = "scale(1)"; } cdr.resetButtons(); cdr.game.active = false; }, resetButtons: function() { $$("gamesButton").classList.remove('disabled'); $$("gamesButton").removeAttribute('disabled'); $$("handsButton").classList.remove('disabled'); $$("handsButton").removeAttribute('disabled'); $$("handselect").classList.remove("open"); $$("gameselect").classList.remove("open"); $$("betOne").classList.remove('disabled'); $$("betOne").removeAttribute('disabled'); $$("betMax").classList.remove('disabled'); $$("betMax").removeAttribute('disabled'); if (cdr.game.bet) { $$("dealdrawButton").classList.remove('disabled'); $$("dealdrawButton").removeAttribute('disabled'); } else { $$("dealdrawButton").classList.add('disabled'); $$("dealdrawButton").setAttribute('disabled'); } $$("dealdrawButton").innerHTML = "DEAL"; }, clearWinners: function() { var els = $$$('.winner'); for (var i=0; i<els.length; i++) { els[i].classList.remove('winner'); } $$("result").style.display = "none"; for (var i=1; i<5; i++) { $$("hand"+i+"result").style.display = "none"; } }, resetCards: function() { for (var h=1; h < cdr.game.hands; h++) { for (var c=0; c < 5; c++) { $$("hand"+h+"card"+c).classList.add('flipped'); } $$("hand"+h+"result").style.height = "0"; } setTimeout(function() { var els = $$$(".handresult"); for (var i in els) { if (els.hasOwnProperty(i)) { els[i].style.display = "none"; } } }, 150); }, deal: function() { if (cdr.game.bet == 0) { $$("gameover").innerHTML = "ADD CREDITS TO PLAY"; return false; } if (cdr.gameoverTimeout) { clearTimeout(cdr.gameoverTimeout); cdr.gameoverTimeout = 0; } $$("gameover").style.transform = "scale(0)"; $$("won").style.display = "none"; cdr.game.active = true; cdr.game.stage = 1; cdr.clearHolds(); cdr.clearWinners(); cdr.resetCards(); $$("win").innerHTML = ""; $$("won").innerHTML = ""; $$("won").style.display = "none"; $$("gamesButton").classList.add("disabled"); $$("gamesButton").setAttribute("disabled", true); $$("handsButton").classList.add("disabled"); $$("handsButton").setAttribute("disabled", true); $$("dealdrawButton").innerHTML = "DRAW"; $$("betOne").classList.add("disabled"); $$("betOne").setAttribute("disabled", true); $$("betMax").classList.add("disabled"); $$("betMax").setAttribute("disabled", true); cdr.game.cards = []; cdr.game.discards = []; cdr.newDeck(); var func = document.createElement('script'); func.src = cdr.game.endpoint + "newGame?game="+cdr.game.type+"&hands="+cdr.game.hands+"&callback=cdr.gotGame&uid=" + firebase.auth().currentUser.uid + "&bet=" + cdr.game.bet * cdr.game.creditValue; document.body.appendChild(func); }, gotGame: function(cards) { for (var i=0; i<5; i++) { draw = cards[i]; cards.push(draw); cdr.hideCard("card" + i, i); cdr.setCard(i, draw, i); cdr.showCard("card" + i, i + 1); } cdr.game.cards = cards; cdr.game.active = true; cdr.game.draws = 1; }, solve: function() { var hand = []; for (var i=0; i<cdr.game.cards.length; i++) { var card = cdr.game.cards[i].toLowerCase(); var match = card.match(/(\d*)([cdsh])/i); var num = parseInt(match[1]); var suit = match[2]; if ((num > 9) || (num==1)) { switch (num) { case 1: num = "A"; break; case 10: num = "T"; break; case 11: num = "J"; break; case 12: num = "Q"; break; case 13: num = "K"; break; } } hand.push(num + suit); } console.log("hand:"); console.dir(hand); var result = Hand.solve(hand, "jacksbetter", true); cdr.game.result = result.constructor.name; console.dir(result); return result; }, solveHand: function(hand) { var suits = []; var cards = []; var seen = {}; var suit = ''; var canFlush = 1; var haveAce = 0; for (var i=0; i<hand.length; i++) { var match = hand[i].match(/^(\d+)([HDSC])/i); if (match[1] && match[2]) { if (suit === '') suit = match[2]; if (match[1] == 1) { haveAce++; } if (suit && (suit !== match[2])) { canFlush = 0; } if (!seen[match[1]]) { seen[match[1]] = 1; } else { seen[match[1]]++; } cards.push(parseInt(match[1])); suits.push(match[2]); } } var isFlush = canFlush; cards = cards.sort(function(a, b) { return a - b; }); var lastCard, isStraight = true; for (var i=0; i<cards.length - 1; i++) { if (!lastCard) { lastCard = parseInt(cards[i]); } else if ((lastCard + 1) !== parseInt(cards[i])) { if (isStraight!==false && (lastCard===1) && (cards[i]===10)) { isStraight = true; } else { isStraight = false; } } lastCard = parseInt(cards[i]); } var isPair = false; var isTwoPair = false; var isQualifiedPair = false; var isThreeOfAKind = false; var isFourOfAKind = false; for (var i in seen) { if (seen.hasOwnProperty(i)) { if (seen[i] > 1) { switch (seen[i]) { case 2: if ((i > 10) || (i == 1)) { isQualifiedPair = true; } if (isPair===true) isTwoPair = true; isPair = true; break; case 3: isThreeOfAKind = true; break; case 4: isFourOfAKind = true; break; } } } } if (isStraight && isFlush && (cards[0] === 10)) return "RoyalFlush"; if (isStraight && isFlush) return "StraightFlush"; if (isFourOfAKind) return "FourOfAKind"; if (isThreeOfAKind && isPair) return "FullHouse"; if (isFlush) return "Flush"; if (isStraight) return "Straight"; if (isThreeOfAKind) return "ThreeOfAKind"; if (isTwoPair) return "TwoPair"; if (isQualifiedPair) return "OnePair"; return false; }, shuffle: function(array) { var currentIndex = array.length, temporaryValue, randomIndex; // While there remain elements to shuffle... while (0 !== currentIndex) { // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; // And swap it with the current element. temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; }, genPaytable: function(counts) { firebase.database().ref("payouts/"+cdr.game.type).once("value", function(snap) { var pt = snap.val(); var hands = Object.keys(pt.hands); var newpaytable = {}; var sortable = []; for (var i=0; i<hands.length; i++) { var name = hands[i]; var displayName = name.replace(/([a-z0-9])([A-Z0-9])/g, "$1 $2").replace(/([A-Z0-9])([A-Z0-9])/g, "$1 $2"); sortable.push([name, pt.hands[name]]); var pay = []; for (var j=1; j<6; j++) { pay.push(parseInt(pt.hands[name]) * j); } newpaytable[name] = { "hand": displayName, win: pay }; } cdr.paytable = newpaytable; sortable.sort(function(a, b) { return b[1] - a[1]; }); cdr.paytable[sortable[0][0]].win[4] = parseInt(pt.jackpot); console.dir(newpaytable); console.log("New pay table: " + JSON.stringify(newpaytable)); var payleft = $('#payleft'); var payright = $('#payright'); payleft.innerHTML = ""; payright.innerHTML = ""; var keys = Object.keys(cdr.paytable); var half = Math.floor(keys.length / 2); var entry, mypt, win, cnt; for (var i=0; i < half; i++) { mypt = cdr.paytable[sortable[i][0]]; win = mypt.win[cdr.game.bet - 1] || 0; cnt = (counts && counts[sortable[i][0]]!=undefined) ? " X " + counts[sortable[i][0]] : ""; if (counts && cnt==="") win = 0; entry = el('div', 'payline'+i, 'payline', mypt.hand + " <div class='pay'>" + win + cnt + "</"+"div>"); payleft.appendChild(entry); } for (var i=half; i < sortable.length; i++) { mypt = cdr.paytable[sortable[i][0]]; win = mypt.win[cdr.game.bet - 1] || 0; cnt = (counts && counts[sortable[i][0]]!=undefined) ? " X " + counts[sortable[i][0]] : ""; if (counts && cnt==="") win = 0; entry = el('div', 'payline'+i, 'payline', mypt.hand + " <div class='pay'>"+win + cnt+"<"+"/div>"); payright.appendChild(entry); } }); }, newDeck: function() { cdr.deck = []; var suits = ['S', 'C', 'D', 'H']; for (var s=0; s<4; s++) { for (var i=1; i<14; i++) { cdr.deck.push(i + suits[s]); } } var scnt = Math.floor(Math.random() * 10) + 4; for (var i=0; i<scnt; i++) { cdr.deck = cdr.shuffle(cdr.deck); } return cdr.deck; }, login: function(who) { var provider; provider = new firebase.auth.FacebookAuthProvider(); db = firebase.database(); firebase.auth().signInWithPopup(provider).then(function(result) { var token = result.credential.accessToken; var user = result.user; console.dir(user); writeUserData(user.uid, user.displayName, user.email, user.photoURL); db.ref("bank/" + firebase.auth().currentUser.uid).on("value", function(snapshot) { var bank = snapshot.val(); $$("credit").innerHTML = bank.balance; }); }).catch(function(error) { var errorCode = error.code; var errorMessage = error.message; var email = error.email; var credential = error.credential; }); }, writeUserData: function(userId, name, email, imageUrl) { firebase.database().ref('users/' + userId).set({ name: name, email: email, profile_picture : imageUrl }); setCookie("uid", userId); }, makeHands: function() { var hands = $$("hands"); hands.innerHTML = ""; for (var i=1; i<cdr.game.hands; i++) { hands.appendChild(cdr.makeHand(i)); } }, makeHand: function(id) { var suits = ['S', 'C', 'D', 'H']; var hand = el('div', 'hand'+id, 'hand'); var nums = 1, snum = 0; for (var i=0; i<5; i++) { var cnum = i + 1; var suit = suits[3]; var card = el('div', '', 'card card' + cnum + suit, '<figure class="pic">&nbsp;</figure>'); var cardback = el('div', '', 'cardback', '<figure class="pic">&nbsp;</figure>'); var cardwrap = el('div', 'hand'+id+'card'+i, 'cardwrap flipped'); cardwrap.appendChild(card); cardwrap.appendChild(cardback); hand.appendChild(cardwrap); nums++; if (nums > 13) { nums = 1; snum++; if (snum > 3) { snum = 0; } } } hand.appendChild(el('div', 'hand'+id+'result', 'handresult')); return hand; } }; cdr.init(); })(); function el(tag, id, classname, content) { var el = document.createElement(tag); if (id) el.id = id; if (classname) el.className = classname; if (content) el.innerHTML = content; return el; } function $(str) { return document.querySelector(str); } function $$(str) { return document.getElementById(str); } function $$$(str) { return document.querySelectorAll(str); } firebase.auth().onAuthStateChanged(function(user) { if (user) { console.dir(user); // User is signed in. var displayName = user.displayName; var email = user.email; var emailVerified = user.emailVerified; var photoURL = user.photoURL; var isAnonymous = user.isAnonymous; var uid = user.uid; var providerData = user.providerData; $$("loginButton").innerHTML = "LOGOUT"; cdr.game.uid = user.uid; cdr.updateCredits(); } else { // User is signed out. // ... $$("loginButton").innerHTML = "LOGIN"; } }); </script> </body> </html>
chrisrobison/crcasino
poker5.html
HTML
gpl-3.0
41,692
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 18804, 2171, 1027, 1005, 3193, 6442, 1005, 4180, 1027, 1005, 9381, 1027, 5080...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Copyright (C) 2008 Happy Fish / YuQing * * FastDFS may be copied only under the terms of the GNU General * Public License V3, which may be found in the FastDFS source kit. * Please visit the FastDFS Home Page http://www.csource.org/ for more detail. **/ //tracker_nio.h #ifndef _TRACKER_NIO_H #define _TRACKER_NIO_H #include <stdio.h> #include <stdlib.h> #include <string.h> #include "fast_task_queue.h" #ifdef __cplusplus extern "C" { #endif /* * ÿ¸öÏ̵߳ĹܵÀpipe_fds[0]µÄREADʼþµÄ»Øµ÷º¯Êý * ÿ´Î¶Áȡһ¸öint±äÁ¿£¬ÊÇн¨Á¢Á¬½ÓµÄsocketÃèÊö·û£¬Ö®ºó¼ÓÈëµ½IOʼþ¼¯ºÏ * °´Í¨µÀ·Ö·¢µ½ÏàÓ¦¹¤×÷Ïß³ÌÖеȴý¿É¶Áʼþ´¥·¢ºóµ÷ÓÃclient_sock_readº¯Êý½øÐд¦Àí */ void recv_notify_read(int sock, short event, void *arg); /* ½«·¢Ëͱ¨ÎĵÄʼþ¼ÓÈëµ½IOʼþ¼¯ºÏÖÐ */ int send_add_event(struct fast_task_info *pTask); /* ÈÎÎñ½áÊøºóµÄÇåÀíº¯Êý */ void task_finish_clean_up(struct fast_task_info *pTask); #ifdef __cplusplus } #endif #endif
fatedier/studies
fastdfs-5.01/tracker/tracker_nio.h
C
gpl-3.0
937
[ 30522, 1013, 1008, 1008, 1008, 9385, 1006, 1039, 1007, 2263, 3407, 3869, 1013, 9805, 19784, 1008, 1008, 3435, 20952, 2015, 2089, 2022, 15826, 2069, 2104, 1996, 3408, 1997, 1996, 27004, 2236, 1008, 2270, 6105, 1058, 2509, 1010, 2029, 2089, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// queue.h - written and placed in the public domain by Wei Dai //! \file //! \headerfile queue.h //! \brief Classes for an unlimited queue to store bytes #ifndef CRYPTOPP_QUEUE_H #define CRYPTOPP_QUEUE_H #include "cryptlib.h" #include "simple.h" NAMESPACE_BEGIN(CryptoPP) class ByteQueueNode; //! \class ByteQueue //! \brief Data structure used to store byte strings //! \details The queue is implemented as a linked list of byte arrays class CRYPTOPP_DLL ByteQueue : public Bufferless<BufferedTransformation> { public: //! \brief Construct a ByteQueue //! \param nodeSize the initial node size //! \details Internally, ByteQueue uses a ByteQueueNode to store bytes, and \p nodeSize determines the //! size of the ByteQueueNode. A value of 0 indicates the ByteQueueNode should be automatically sized, //! which means a value of 256 is used. ByteQueue(size_t nodeSize=0); //! \brief Copy construct a ByteQueue //! \param copy the other ByteQueue ByteQueue(const ByteQueue &copy); ~ByteQueue(); lword MaxRetrievable() const {return CurrentSize();} bool AnyRetrievable() const {return !IsEmpty();} void IsolatedInitialize(const NameValuePairs &parameters); byte * CreatePutSpace(size_t &size); size_t Put2(const byte *inString, size_t length, int messageEnd, bool blocking); size_t Get(byte &outByte); size_t Get(byte *outString, size_t getMax); size_t Peek(byte &outByte) const; size_t Peek(byte *outString, size_t peekMax) const; size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true); size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const; // these member functions are not inherited void SetNodeSize(size_t nodeSize); lword CurrentSize() const; bool IsEmpty() const; void Clear(); void Unget(byte inByte); void Unget(const byte *inString, size_t length); const byte * Spy(size_t &contiguousSize) const; void LazyPut(const byte *inString, size_t size); void LazyPutModifiable(byte *inString, size_t size); void UndoLazyPut(size_t size); void FinalizeLazyPut(); ByteQueue & operator=(const ByteQueue &rhs); bool operator==(const ByteQueue &rhs) const; bool operator!=(const ByteQueue &rhs) const {return !operator==(rhs);} byte operator[](lword i) const; void swap(ByteQueue &rhs); //! \class Walker //! \brief A ByteQueue iterator class Walker : public InputRejecting<BufferedTransformation> { public: //! \brief Construct a ByteQueue Walker //! \param queue a ByteQueue Walker(const ByteQueue &queue) : m_queue(queue), m_node(NULL), m_position(0), m_offset(0), m_lazyString(NULL), m_lazyLength(0) {Initialize();} lword GetCurrentPosition() {return m_position;} lword MaxRetrievable() const {return m_queue.CurrentSize() - m_position;} void IsolatedInitialize(const NameValuePairs &parameters); size_t Get(byte &outByte); size_t Get(byte *outString, size_t getMax); size_t Peek(byte &outByte) const; size_t Peek(byte *outString, size_t peekMax) const; size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true); size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const; private: const ByteQueue &m_queue; const ByteQueueNode *m_node; lword m_position; size_t m_offset; const byte *m_lazyString; size_t m_lazyLength; }; friend class Walker; private: void CleanupUsedNodes(); void CopyFrom(const ByteQueue &copy); void Destroy(); bool m_autoNodeSize; size_t m_nodeSize; ByteQueueNode *m_head, *m_tail; byte *m_lazyString; size_t m_lazyLength; bool m_lazyStringModifiable; }; //! use this to make sure LazyPut is finalized in event of exception class CRYPTOPP_DLL LazyPutter { public: LazyPutter(ByteQueue &bq, const byte *inString, size_t size) : m_bq(bq) {bq.LazyPut(inString, size);} ~LazyPutter() {try {m_bq.FinalizeLazyPut();} catch(const Exception&) {CRYPTOPP_ASSERT(0);}} protected: LazyPutter(ByteQueue &bq) : m_bq(bq) {} private: ByteQueue &m_bq; }; //! like LazyPutter, but does a LazyPutModifiable instead class LazyPutterModifiable : public LazyPutter { public: LazyPutterModifiable(ByteQueue &bq, byte *inString, size_t size) : LazyPutter(bq) {bq.LazyPutModifiable(inString, size);} }; NAMESPACE_END #ifndef __BORLANDC__ NAMESPACE_BEGIN(std) template<> inline void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b) { a.swap(b); } NAMESPACE_END #endif #endif
GabrielTofvesson/CPPTools
libs/win_crypto++/include/queue.h
C
gpl-3.0
4,691
[ 30522, 1013, 1013, 24240, 1012, 1044, 1011, 2517, 1998, 2872, 1999, 1996, 2270, 5884, 2011, 11417, 18765, 1013, 1013, 999, 1032, 5371, 1013, 1013, 999, 1032, 20346, 8873, 2571, 24240, 1012, 1044, 1013, 1013, 999, 1032, 4766, 4280, 2005, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#ifndef Renderer_Context_h #define Renderer_Context_h #include "RenderState/RenderStateOperations.h" //#include "../Math/Geometry/GeometryOperations.h" #include "Buffers/BuffersOperations.h" #include "VertexArray/VertexArrayOperations.h" #include "ShaderVertexAttributeCollection.h" namespace Aurora { namespace Renderer { using namespace Aurora::Math::Geometry; using namespace Aurora::Renderer::Buffers; using namespace Aurora::Renderer::VertexArray; enum class ClearBuffers { ColorBuffer = 1, DepthBuffer = 2, StencilBuffer = 4, ColorAndDepthBuffer = ColorBuffer | DepthBuffer, All = ColorBuffer | DepthBuffer | StencilBuffer }; template<typename Type> class Context { private: public: Context() = default; virtual ~Context() = default; virtual void MakeCurrent() = 0; //virtual VertexArray<Type> CreateVertexArray(const Mesh &mesh, SharedShaderVertexAttributeCollection shaderAttributes, BufferHint usageHint); }; }; }; #endif
lionadi/Simulator
Simulator/Simulator/Source Code/Aurora/Renderer/Context.h
C
gpl-2.0
1,000
[ 30522, 1001, 2065, 13629, 2546, 17552, 2121, 1035, 6123, 1035, 1044, 1001, 9375, 17552, 2121, 1035, 6123, 1035, 1044, 1001, 2421, 1000, 17552, 9153, 2618, 1013, 17552, 9153, 2618, 25918, 10708, 1012, 1044, 1000, 1013, 1013, 1001, 2421, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
module.exports = function(grunt) { return { js: { files: "src/js/**/*.js", tasks: "js" }, pluginCss: { files: ["src/css/flags.scss", "src/css/intlTelInput.scss"], tasks: "sass:main" }, demoCss: { files: "src/css/demo.scss", tasks: "sass:demo" } }; };
mobwellacademy/librecademy
www/js/dialCodes/grunt/watch.js
JavaScript
gpl-2.0
314
[ 30522, 11336, 1012, 14338, 1027, 3853, 1006, 20696, 1007, 1063, 2709, 1063, 1046, 2015, 1024, 1063, 6764, 1024, 1000, 5034, 2278, 1013, 1046, 2015, 1013, 1008, 1008, 1013, 1008, 1012, 1046, 2015, 1000, 1010, 8518, 1024, 1000, 1046, 2015, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the Apache 2 License. using Microsoft.ServiceFabric.Actors; using System; using System.Collections.Generic; using System.Diagnostics.Tracing; using System.Fabric; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ServiceFabricPersistence { [EventSource(Name = "MyCompany-ServiceFabricEventJournalApplication-ServiceFabricEventJournal")] internal sealed class ActorEventSource : EventSource { public static ActorEventSource Current = new ActorEventSource(); [NonEvent] public void Message(string message, params object[] args) { if (this.IsEnabled()) { string finalMessage = string.Format(message, args); Message(finalMessage); } } [Event(1, Level = EventLevel.Informational, Message = "{0}")] public void Message(string message) { if (this.IsEnabled()) { WriteEvent(1, message); } } [NonEvent] public void ActorMessage(Actor actor, string message, params object[] args) { if (this.IsEnabled()) { string finalMessage = string.Format(message, args); ActorMessage( actor.GetType().ToString(), actor.Id.ToString(), actor.Host.ActivationContext.ApplicationTypeName, actor.Host.ActivationContext.ApplicationName, actor.Host.StatelessServiceInitializationParameters.ServiceTypeName, actor.Host.StatelessServiceInitializationParameters.ServiceName.ToString(), actor.Host.StatelessServiceInitializationParameters.PartitionId, actor.Host.StatelessServiceInitializationParameters.InstanceId, FabricRuntime.GetNodeContext().NodeName, finalMessage); } } [NonEvent] public void ActorMessage<TState>(Actor<TState> actor, string message, params object[] args) where TState : class { if (this.IsEnabled()) { string finalMessage = string.Format(message, args); ActorMessage( actor.GetType().ToString(), actor.Id.ToString(), actor.Host.ActivationContext.ApplicationTypeName, actor.Host.ActivationContext.ApplicationName, actor.Host.StatefulServiceInitializationParameters.ServiceTypeName, actor.Host.StatefulServiceInitializationParameters.ServiceName.ToString(), actor.Host.StatefulServiceInitializationParameters.PartitionId, actor.Host.StatefulServiceInitializationParameters.ReplicaId, FabricRuntime.GetNodeContext().NodeName, finalMessage); } } [Event(2, Level = EventLevel.Informational, Message = "{9}")] private void ActorMessage( string actorType, string actorId, string applicationTypeName, string applicationName, string serviceTypeName, string serviceName, Guid partitionId, long replicaOrInstanceId, string nodeName, string message) { WriteEvent( 2, actorType, actorId, applicationTypeName, applicationName, serviceTypeName, serviceName, partitionId, replicaOrInstanceId, nodeName, message); } [NonEvent] public void ActorHostInitializationFailed(Exception e) { if (this.IsEnabled()) { ActorHostInitializationFailed(e.ToString()); } } [Event(3, Level = EventLevel.Error, Message = "Actor host initialization failed")] private void ActorHostInitializationFailed(string exception) { WriteEvent(3, exception); } } }
yonglehou/Akka.Persistence.ServiceFabric
src/ServiceFabricPersistence/ActorEventSource.cs
C#
apache-2.0
4,304
[ 30522, 1013, 1013, 9385, 1006, 1039, 1007, 7513, 3840, 1012, 2035, 2916, 9235, 1012, 1013, 1013, 7000, 2104, 1996, 15895, 1016, 6105, 1012, 2478, 7513, 1012, 2326, 7011, 23736, 2278, 1012, 5889, 1025, 2478, 2291, 1025, 2478, 2291, 1012, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Copyright (C) 2014-2016 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. RSpec::Matchers.define :have_hosts do |test| match do |cl| def find_server(client, host) client.cluster.instance_variable_get(:@servers).detect do |s| s.address.host == host.host end end def match_host?(server, host) server.address.host == host.host end def match_port?(server, host) server.address.port == host.port || !host.port end def match_address_family?(server, host) address_family(server) == host.address_family end def address_family(server) server.address.socket(2) server.address.instance_variable_get(:@resolver).class end test.hosts.all? do |host| server = find_server(cl, host) match_host?(server, host) && match_port?(server, host) if server #&& #match_address_family?(server, host) if server end failure_message do |client| "With URI: #{test.uri_string}\n" + "Expected that test hosts: #{test.hosts} would match " + "client hosts: #{cl.cluster.instance_variable_get(:@servers)}" end end end RSpec::Matchers.define :match_auth do |test| def match_database?(client, auth) client.options[:database] == auth.database || !auth.database end def match_password?(client, auth) client.options[:password] == auth.password || client.options[:password].nil? && auth.password == '' end match do |client| auth = test.auth return true unless auth client.options[:user] == auth.username && match_password?(client, auth) && match_database?(client, auth) end failure_message do |client| "With URI: #{test.uri_string}\n" + "Expected that test auth: #{test.auth} would match client auth: #{client.options}" end end RSpec::Matchers.define :match_options do |test| match do |client| options = test.options return true unless options options.match?(client.options) end failure_message do |client| "With URI: #{test.uri_string}\n" + "Expected that test options: #{test.options.options} would match client options: #{client.options}" end end module Mongo module ConnectionString class Spec attr_reader :description # Instantiate the new spec. # # @example Create the spec. # Spec.new(file) # # @param [ String ] file The name of the file. # # @since 2.0.0 def initialize(file) file = File.new(file) @spec = YAML.load(ERB.new(file.read).result) file.close @description = File.basename(file) end def tests @tests ||= @spec['tests'].collect do |spec| Test.new(spec) end end end class Test attr_reader :description attr_reader :uri_string def initialize(spec) @spec = spec @description = @spec['description'] @uri_string = @spec['uri'] end def valid? @spec['valid'] end def warn? @spec['warning'] end def hosts @hosts ||= @spec['hosts'].collect do |host| Host.new(host) end end def options @options ||= Options.new(@spec['options']) if @spec['options'] end def client @client ||= Mongo::Client.new(@spec['uri']) end def uri @uri ||= Mongo::URI.new(@spec['uri']) end def auth @auth ||= Auth.new(@spec['auth']) if @spec['auth'] end end class Host MAPPING = { 'ipv4' => Mongo::Address::IPv4, 'ipv6' => Mongo::Address::IPv6, 'unix' => Mongo::Address::Unix } attr_reader :host attr_reader :port def initialize(spec) @spec = spec @host = @spec['host'] @port = @spec['port'] end def address_family MAPPING[@spec['type']] end end class Auth attr_reader :username attr_reader :password attr_reader :database def initialize(spec) @spec = spec @username = @spec['username'] @password = @spec['password'] @database = @spec['db'] end def to_s "username: #{username}, password: #{password}, database: #{database}" end end class Options MAPPINGS = { 'replicaset' => :replica_set, 'authmechanism' => :auth_mech } attr_reader :options def initialize(options) @options = options end def match?(opts) @options.keys.all? do |k| opts[MAPPINGS[k]] == @options[k] || Mongo::URI::AUTH_MECH_MAP[@options[k]] == opts[MAPPINGS[k]] end end end end end
estolfo/mongo-ruby-driver
spec/support/connection_string.rb
Ruby
apache-2.0
5,298
[ 30522, 1001, 9385, 1006, 1039, 1007, 2297, 1011, 2355, 12256, 3995, 18939, 1010, 4297, 1012, 1001, 1001, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 30524, 15943, 1013, 6105, 1011, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (9-Debian) on Thu Sep 28 23:13:23 GMT 2017 --> <title>Uses of Class dollar.internal.runtime.script.parser.scope.ScriptScope (dollar-script 0.4.5195 API)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="date" content="2017-09-28"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../../../script.js"></script> <script type="text/javascript" src="../../../../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif]--> <script type="text/javascript" src="../../../../../../../jquery/jquery-1.10.2.js"></script> <script type="text/javascript" src="../../../../../../../jquery/jquery-ui.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class dollar.internal.runtime.script.parser.scope.ScriptScope (dollar-script 0.4.5195 API)"; } } catch(err) { } //--> var pathtoroot = "../../../../../../../";loadScripts(document, 'script');</script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="fixedNav"> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?dollar/internal/runtime/script/parser/scope/class-use/ScriptScope.html" target="_top">Frames</a></li> <li><a href="ScriptScope.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <ul class="navListSearch"> <li><span>SEARCH:&nbsp;</span> <input type="text" id="search" value=" " disabled="disabled"> <input type="reset" id="reset" value=" " disabled="disabled"> </li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> </div> <div class="navPadding">&nbsp;</div> <script type="text/javascript"><!-- $('.navPadding').css('padding-top', $('.fixedNav').css("height")); //--> </script> <div class="header"> <h2 title="Uses of Class dollar.internal.runtime.script.parser.scope.ScriptScope" class="title">Uses of Class<br>dollar.internal.runtime.script.parser.scope.ScriptScope</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <th class="colFirst" scope="row"><a href="#dollar.internal.runtime.script">dollar.internal.runtime.script</a></th> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <th class="colFirst" scope="row"><a href="#dollar.internal.runtime.script.api">dollar.internal.runtime.script.api</a></th> <td class="colLast">&nbsp;</td> </tr> <tr class="altColor"> <th class="colFirst" scope="row"><a href="#dollar.internal.runtime.script.parser.scope">dollar.internal.runtime.script.parser.scope</a></th> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="dollar.internal.runtime.script"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a> in <a href="../../../../../../../dollar/internal/runtime/script/package-summary.html">dollar.internal.runtime.script</a></h3> <table class="useSummary" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../dollar/internal/runtime/script/package-summary.html">dollar.internal.runtime.script</a> with parameters of type <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">DollarUtilFactory.</span><code><span class="memberNameLink"><a href="../../../../../../../dollar/internal/runtime/script/DollarUtilFactory.html#setRootScope-dollar.internal.runtime.script.parser.scope.ScriptScope-">setRootScope</a></span>&#8203;(@NotNull <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a>&nbsp;rootScope)</code></th> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="dollar.internal.runtime.script.api"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a> in <a href="../../../../../../../dollar/internal/runtime/script/api/package-summary.html">dollar.internal.runtime.script.api</a></h3> <table class="useSummary" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../dollar/internal/runtime/script/api/package-summary.html">dollar.internal.runtime.script.api</a> with parameters of type <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Method</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <th class="colSecond" scope="row"><span class="typeNameLabel">DollarUtil.</span><code><span class="memberNameLink"><a href="../../../../../../../dollar/internal/runtime/script/api/DollarUtil.html#setRootScope-dollar.internal.runtime.script.parser.scope.ScriptScope-">setRootScope</a></span>&#8203;(@NotNull <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a>&nbsp;rootScope)</code></th> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="dollar.internal.runtime.script.parser.scope"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a> in <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/package-summary.html">dollar.internal.runtime.script.parser.scope</a></h3> <table class="useSummary" summary="Use table, listing subclasses, and an explanation"> <caption><span>Subclasses of <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">ScriptScope</a> in <a href="../../../../../../../dollar/internal/runtime/script/parser/scope/package-summary.html">dollar.internal.runtime.script.parser.scope</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colSecond" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>class&nbsp;</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../../../dollar/internal/runtime/script/parser/scope/FileScope.html" title="class in dollar.internal.runtime.script.parser.scope">FileScope</a></span></code></th> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>class&nbsp;</code></td> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../../../../dollar/internal/runtime/script/parser/scope/PureScope.html" title="class in dollar.internal.runtime.script.parser.scope">PureScope</a></span></code></th> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../dollar/internal/runtime/script/parser/scope/ScriptScope.html" title="class in dollar.internal.runtime.script.parser.scope">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?dollar/internal/runtime/script/parser/scope/class-use/ScriptScope.html" target="_top">Frames</a></li> <li><a href="ScriptScope.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2017. All rights reserved.</small></p> </body> </html>
neilellis/dollar
docs/dev/dollar-script/apidocs/dollar/internal/runtime/script/parser/scope/class-use/ScriptScope.html
HTML
apache-2.0
12,366
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ************************* * "CLASS": Player * *************************/ function Player(x, y){ /* ### ATTRIBUTES ### */ Entity.call(this, x, y); this.vx = 0; this.vy = 0; this.currentMaxHealth = 2; this.health = 2; this.sprite = new Sprite('res/spritesheet.png', [0, 0], [32,32] , 12, [0,1,2,3,4,5,6,7]); this.speed = STARTING_PLAYER_SPEED; this.isBlocking = false; this.blockRadius = (PLAYER_SPRITE_WIDTH/2) + BLOCK_RADIUS; this.radius = PLAYER_SPRITE_WIDTH/2; this.handle = PLAYER_HANDLE; // the ability to turn better this.teleportRange = 100; this.bulletRange = 180; this.fireDelay = 3*1000000; // in microseconds /* METHODS */ this.checkBoundaries = function(){ if(this.x + this.sprite.width >= canvas.width){ this.x = canvas.width - this.sprite.width; this.vx /= 2; } else if(this.x <= 0){ this.x = 0; this.vx /= 2; } if(this.y + this.sprite.height >= canvas.height){ this.y = canvas.height - this.sprite.height; this.vy /= 2; } else if(this.y <= 0){ this.y = 0; this.vy /= 2; } } this.update = function(dt){ this.sprite.update(dt); this.checkEnemiesCollision(); this.vx *= PLAYER_FRICTION; this.vy *= PLAYER_FRICTION; this.x += this.vx; this.y += this.vy; this.checkBoundaries(); }; this.render = function(){ renderEntity(this); drawBar(this.x, this.y-12, this.sprite.width, 6, this.health, this.currentMaxHealth, true, "green"); //posx, posy, size, width, state, maxState, horizontal, colorInside }; this.checkEnemiesCollision = function(){ for(var i = 0; i<enemies.length; i++){ var enemy = enemies[i]; if(circleCollision(this, enemy) ){ enemy.destroy(); createExplosion(enemy.x, enemy.y); this.health--; this.checkHealth(); } } }; this.checkHealth = function(){ if(this.health <= 0){ //todo upgrade menu, so game over instead alert("Game over! You survived for " + gameTime.toFixed(2) + " seconds!"); location.reload(true); } } /*this.block = function(){ this.isBlocking = true; var blockX = this.x + (this.sprite.width/2); var blockY = this.y + (this.sprite.height/2); daux.beginPath(); daux.arc(blockX, blockY, this.blockRadius, 0, Math.PI*2, true); daux.stroke(); setTimeout(function(){ daux.clearRect(0, 0, auxcanvas.width, auxcanvas.height); }, 50); setTimeout(function(){ player.isBlocking = false; }, BLOCK_DELAY); };*/ return this; } var PLAYER_START_X = (canvas.width/2) - 32/2; var PLAYER_START_Y = (canvas.height/2) - 32/2; var player = new Player(PLAYER_START_X, PLAYER_START_Y);
CaioIcy/Gladiator
game/js/1.0.0_Player.js
JavaScript
mit
2,609
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1000, 2465, 1000, 1024, 2447, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<html style="Height: 100%"> <head> <title>Home</title> <link rel="stylesheet" href="http://georgethedan.github.io/stylesheets/style/stuff.min.css"> <link rel="stylesheet" href="http://georgethedan.github.io/stylesheets/style.css"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" /> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script> <link href="icon.png" sizes="57x57" rel="apple-touch-icon-precomposed"> <link href="icon@2x.png" sizes="114x114" rel="apple-touch-icon-precomposed"> <meta content="yes" name="apple-mobile-web-app-capable" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <meta content="minimum-scale=1.0, width=device-width, maximum-scale=0.6667, user-scalable=no" name="viewport" /> <meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" /> <title>DOTT</title> <link href="icon-T.png" sizes="72x72" rel="apple-touch-icon-precomposed"> <link href="startup-T.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image"> <link href="startupL-T.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image"> <link href="icon@2x-T.png" sizes="144x144" rel="apple-touch-icon-precomposed"> <link href="startup@2x-T.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"> <link href="startup@2xL-T.png" media="(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image"> <script> document.ontouchmove = function(e) {e.preventDefault()}; </script> </head> <body> <link rel="stylesheet" href="http://georgethedan.github.io/stylesheets/style/stuff.min.css"> <div data-role="page" data-theme="f" id="timetable"> <div data-role="header" data-theme="a"> <h1>Timetable</h1> <a href="http://georgethedan.github.io/mobile/about.html" data-icon="info" class="ui-btn-right" data-theme="f">About</a> <style> #navbar { border: 0 solid red !important; } </style> <div data-role="navbar" id='navbar'> <ul> <li><a data-theme="f" class="ui-btn-active">Week A</a></li> <li><a data-theme="f" onClick='location.replace("http://georgethedan.github.io/mobile/weekb-T")' data-ajax="false">Week B</a></li> </ul> </div> </div><!-- /header --> <div data-role="content" id="timetable1" bgcolor='white'> <table class="mystyle" width='100%' onClick="location.replace('http://georgethedan.github.io/mobile/subjects-T')"> <tr> <th> </th> <th >Monday</th> <th >Tuesday</th> <th >Wednesday</th> <th >Thursday</th> <th >Friday</th> </tr> <tr style='vertical-align:bottom'> <td><center><br/><br/>P1<br/><br/><br/></center></td> <td><center><img src='images/ds.png' align='middle'/><br/>DSO</center></td> <td><center><img src='images/pes.png' align='middle'/><br/>OVAL</center></td> <td><center><img src='images/fs.png' align='middle'/><br/>R701</center></td> <td><center><img src='images/geos.png' align='middle'/><br/>R210</center></td> <td><center><img src='images/ccs.png' align='middle'/><br/>ICL</center></td> </tr> <tr style='vertical-align:bottom'> <td><center><br/><br/>P2<br/><br/><br/></center></td> <td><center><img src='images/scs.png' align='middle'/><br/>R303</center></td> <td><center><img src='images/ms.png' align='middle'/><br/>R503</center></td> <td><center><img src='images/englishs.png' align='middle'/><br/>R107</center></td> <td><center><img src='images/scs.png' align='middle'/><br/>R214</center></td> <td><center><img src='images/geos.png' align='middle'/><br/>R210</center></td> </tr> <tr style='vertical-align:bottom'> <td><center><br/><br/>P3<br/><br/><br/></center></td> <td><center><img src='images/geos.png' align='middle'/><br/>R210</center></td> <td><center><img src='images/ds.png' align='middle'/><br/>DSO</center></td> <td><center><img src='images/scs.png' align='middle'/><br/>R901</center></td> <td><center><img src='images/englishs.png' align='middle'/><br/>R107</center></td> <td><center><img src='images/ms.png' align='middle'/><br/>R503</center></td> </tr> <tr style='vertical-align:bottom'> <td><center><br/><br/>P4<br/><br/><br/></center></td> <td><center><img src='images/englishs.png' align='middle'/><br/>R107</center></td> <td><center><img src='images/scs.png' align='middle'/><br/>R304</center></td> <td><center><img src='images/ms.png' align='middle'/><br/>R503</center></td> <td ><center><img src='images/fs.png' align='middle'/><br/>R701</center></td> <td><center><img src='images/pes.png' align='middle'/><br/>R802</center></td> </tr> <tr style='vertical-align:bottom'> <td><center><br/><br/>P5<br/><br/><br/></center></td> <td><center><img src='images/raves.png' align='middle'/><br/>R214</center></td> <td><center><img src='images/ccs.png' align='middle'/><br/>R705</center></td> <td><center><img src='images/ds.png' align='middle'/><br/>DSO</center></td> <td><center><img src='images/ccs.png' align='middle'/><br/>R705</center></td> <td ><center><img src='images/fs.png' align='middle'/><br/>R701</center></td> </tr> </table> </div><!-- /content --> <div data-role="footer" data-position="fixed"> <h1>Tap on table for subjects</h1> </div> </body> </html>
georgethedan/georgethedan.github.io
ARCHIVE V1.0/weeka-T.html
HTML
mit
5,842
[ 30522, 1026, 16129, 2806, 1027, 30524, 1000, 1028, 1026, 2132, 1028, 1026, 2516, 1028, 2188, 1026, 1013, 2516, 1028, 1026, 4957, 2128, 2140, 1027, 1000, 6782, 21030, 2102, 1000, 17850, 12879, 1027, 1000, 8299, 1024, 1013, 1013, 2577, 23816,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Makefile.in generated by automake 1.13.3 from Makefile.am. # Makefile. Generated from Makefile.in by configure. # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. ##### ##### am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgincludedir = $(includedir)/libtool pkglibdir = $(libdir)/libtool pkglibexecdir = $(libexecdir)/libtool am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = i686-pc-linux-gnu host_triplet = i686-pc-linux-gnu DIST_COMMON = $(srcdir)/libltdl/Makefile.inc INSTALL NEWS README \ AUTHORS ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config-h.in $(top_srcdir)/libltdl/lt__dirent.c \ $(top_srcdir)/libltdl/argz.c $(top_srcdir)/libltdl/lt__strl.c \ $(top_srcdir)/libltdl/config/depcomp $(doc_libtool_TEXINFOS) \ $(top_srcdir)/libltdl/config/mdate-sh \ $(srcdir)/doc/version.texi $(srcdir)/doc/stamp-vti \ $(top_srcdir)/libltdl/config/texinfo.tex $(dist_man1_MANS) \ $(am__include_HEADERS_DIST) $(am__ltdlinclude_HEADERS_DIST) \ $(top_srcdir)/libltdl/config/test-driver COPYING THANKS TODO \ libltdl/config/compile libltdl/config/config.guess \ libltdl/config/config.sub libltdl/config/depcomp \ libltdl/config/install-sh libltdl/config/mdate-sh \ libltdl/config/missing libltdl/config/texinfo.tex \ libltdl/config/ltmain.sh $(top_srcdir)/libltdl/config/compile \ $(top_srcdir)/libltdl/config/config.guess \ $(top_srcdir)/libltdl/config/config.sub \ $(top_srcdir)/libltdl/config/install-sh \ $(top_srcdir)/libltdl/config/ltmain.sh \ $(top_srcdir)/libltdl/config/missing am__append_1 = libltdl/ltdl.h am__append_2 = libltdl/libltdl.la #am__append_3 = libltdl/libltdlc.la am__append_4 = $(CXX_TESTS) # f77demo-static-exec.test might be interactive on MSYS. am__append_5 = $(F77_TESTS) am__append_6 = $(FC_TESTS) subdir = . SUBDIRS = ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libltdl/m4/argz.m4 \ $(top_srcdir)/libltdl/m4/autobuild.m4 \ $(top_srcdir)/libltdl/m4/libtool.m4 \ $(top_srcdir)/libltdl/m4/ltdl.m4 \ $(top_srcdir)/libltdl/m4/ltoptions.m4 \ $(top_srcdir)/libltdl/m4/ltsugar.m4 \ $(top_srcdir)/libltdl/m4/ltversion.m4 \ $(top_srcdir)/libltdl/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libltdl_dld_link_la_DEPENDENCIES = am__dirstamp = $(am__leading_dot)dirstamp am_libltdl_dld_link_la_OBJECTS = libltdl/loaders/dld_link.lo libltdl_dld_link_la_OBJECTS = $(am_libltdl_dld_link_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am__v_lt_1 = libltdl_dld_link_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_dld_link_la_LDFLAGS) \ $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = libltdl_dlopen_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdl_dlopen_la_OBJECTS = libltdl/loaders/dlopen.lo libltdl_dlopen_la_OBJECTS = $(am_libltdl_dlopen_la_OBJECTS) libltdl_dlopen_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_dlopen_la_LDFLAGS) $(LDFLAGS) \ -o $@ libltdl_dyld_la_LIBADD = am_libltdl_dyld_la_OBJECTS = libltdl/loaders/dyld.lo libltdl_dyld_la_OBJECTS = $(am_libltdl_dyld_la_OBJECTS) libltdl_dyld_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_dyld_la_LDFLAGS) $(LDFLAGS) \ -o $@ LIBOBJDIR = libltdl/ am_libltdl_libltdl_la_OBJECTS = \ libltdl/loaders/libltdl_libltdl_la-preopen.lo \ libltdl/libltdl_libltdl_la-lt__alloc.lo \ libltdl/libltdl_libltdl_la-lt_dlloader.lo \ libltdl/libltdl_libltdl_la-lt_error.lo \ libltdl/libltdl_libltdl_la-ltdl.lo \ libltdl/libltdl_libltdl_la-slist.lo libltdl_libltdl_la_OBJECTS = $(am_libltdl_libltdl_la_OBJECTS) libltdl_libltdl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_libltdl_la_LDFLAGS) \ $(LDFLAGS) -o $@ am_libltdl_libltdl_la_rpath = -rpath $(libdir) am__objects_1 = libltdl/loaders/libltdl_libltdlc_la-preopen.lo \ libltdl/libltdl_libltdlc_la-lt__alloc.lo \ libltdl/libltdl_libltdlc_la-lt_dlloader.lo \ libltdl/libltdl_libltdlc_la-lt_error.lo \ libltdl/libltdl_libltdlc_la-ltdl.lo \ libltdl/libltdl_libltdlc_la-slist.lo am_libltdl_libltdlc_la_OBJECTS = $(am__objects_1) libltdl_libltdlc_la_OBJECTS = $(am_libltdl_libltdlc_la_OBJECTS) libltdl_libltdlc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_libltdlc_la_LDFLAGS) \ $(LDFLAGS) -o $@ #am_libltdl_libltdlc_la_rpath = libltdl_load_add_on_la_LIBADD = am_libltdl_load_add_on_la_OBJECTS = libltdl/loaders/load_add_on.lo libltdl_load_add_on_la_OBJECTS = $(am_libltdl_load_add_on_la_OBJECTS) libltdl_load_add_on_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_load_add_on_la_LDFLAGS) \ $(LDFLAGS) -o $@ libltdl_loadlibrary_la_LIBADD = am_libltdl_loadlibrary_la_OBJECTS = libltdl/loaders/loadlibrary.lo libltdl_loadlibrary_la_OBJECTS = $(am_libltdl_loadlibrary_la_OBJECTS) libltdl_loadlibrary_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_loadlibrary_la_LDFLAGS) \ $(LDFLAGS) -o $@ libltdl_shl_load_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdl_shl_load_la_OBJECTS = libltdl/loaders/shl_load.lo libltdl_shl_load_la_OBJECTS = $(am_libltdl_shl_load_la_OBJECTS) libltdl_shl_load_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libltdl_shl_load_la_LDFLAGS) \ $(LDFLAGS) -o $@ SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_$(V)) am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I. depcomp = $(SHELL) $(top_srcdir)/libltdl/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libltdl_dld_link_la_SOURCES) $(libltdl_dlopen_la_SOURCES) \ $(libltdl_dyld_la_SOURCES) $(libltdl_libltdl_la_SOURCES) \ $(libltdl_libltdlc_la_SOURCES) \ $(libltdl_load_add_on_la_SOURCES) \ $(libltdl_loadlibrary_la_SOURCES) \ $(libltdl_shl_load_la_SOURCES) DIST_SOURCES = $(libltdl_dld_link_la_SOURCES) \ $(libltdl_dlopen_la_SOURCES) $(libltdl_dyld_la_SOURCES) \ $(libltdl_libltdl_la_SOURCES) $(libltdl_libltdlc_la_SOURCES) \ $(libltdl_load_add_on_la_SOURCES) \ $(libltdl_loadlibrary_la_SOURCES) \ $(libltdl_shl_load_la_SOURCES) AM_V_DVIPS = $(am__v_DVIPS_$(V)) am__v_DVIPS_ = $(am__v_DVIPS_$(AM_DEFAULT_VERBOSITY)) am__v_DVIPS_0 = @echo " DVIPS " $@; am__v_DVIPS_1 = AM_V_MAKEINFO = $(am__v_MAKEINFO_$(V)) am__v_MAKEINFO_ = $(am__v_MAKEINFO_$(AM_DEFAULT_VERBOSITY)) am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; am__v_MAKEINFO_1 = AM_V_INFOHTML = $(am__v_INFOHTML_$(V)) am__v_INFOHTML_ = $(am__v_INFOHTML_$(AM_DEFAULT_VERBOSITY)) am__v_INFOHTML_0 = @echo " INFOHTML" $@; am__v_INFOHTML_1 = AM_V_TEXI2DVI = $(am__v_TEXI2DVI_$(V)) am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_$(AM_DEFAULT_VERBOSITY)) am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; am__v_TEXI2DVI_1 = AM_V_TEXI2PDF = $(am__v_TEXI2PDF_$(V)) am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_$(AM_DEFAULT_VERBOSITY)) am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; am__v_TEXI2PDF_1 = AM_V_texinfo = $(am__v_texinfo_$(V)) am__v_texinfo_ = $(am__v_texinfo_$(AM_DEFAULT_VERBOSITY)) am__v_texinfo_0 = -q am__v_texinfo_1 = AM_V_texidevnull = $(am__v_texidevnull_$(V)) am__v_texidevnull_ = $(am__v_texidevnull_$(AM_DEFAULT_VERBOSITY)) am__v_texidevnull_0 = > /dev/null am__v_texidevnull_1 = INFO_DEPS = $(srcdir)/doc/libtool.info TEXINFO_TEX = $(top_srcdir)/libltdl/config/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/libltdl/config DVIS = doc/libtool.dvi PDFS = doc/libtool.pdf PSS = doc/libtool.ps HTMLS = doc/libtool.html TEXINFOS = doc/libtool.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man1_MANS) am__include_HEADERS_DIST = libltdl/ltdl.h am__ltdlinclude_HEADERS_DIST = libltdl/libltdl/lt_system.h \ libltdl/libltdl/lt_error.h libltdl/libltdl/lt_dlloader.h HEADERS = $(include_HEADERS) $(ltdlinclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config-h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = .test am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/libltdl/config/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print pkgdatadir = ${datadir}/libtool ACLOCAL = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing aclocal-1.13 AMTAR = $${TAR-tar} AM_DEFAULT_VERBOSITY = 1 AR = ar ARGZ_H = AS = as AUTOCONF = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing autoconf AUTOHEADER = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing autoheader AUTOM4TE = autom4te AUTOMAKE = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing automake-1.13 AUTOTEST = $(AUTOM4TE) --language=autotest AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 CFLAGS = -g -O2 CONFIG_STATUS_DEPENDENCIES = $(top_srcdir)/ChangeLog CONF_SUBDIRS = tests/cdemo tests/demo tests/depdemo tests/f77demo tests/fcdemo tests/mdemo tests/mdemo2 tests/pdemo tests/tagdemo CPP = gcc -E CPPFLAGS = CXX = g++ CXXCPP = g++ -E CXXDEPMODE = depmode=gcc3 CXXFLAGS = -g -O2 CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DIST_MAKEFILE_LIST = tests/cdemo/Makefile tests/demo/Makefile tests/depdemo/Makefile tests/f77demo/Makefile tests/fcdemo/Makefile tests/mdemo/Makefile tests/mdemo2/Makefile tests/pdemo/Makefile tests/tagdemo/Makefile DLLTOOL = false DSYMUTIL = DUMPBIN = ECHO_C = ECHO_N = -n ECHO_T = EGREP = /usr/bin/grep -E EXEEXT = F77 = gfortran FC = gfortran FCFLAGS = -g -O2 FFLAGS = -g -O2 FGREP = /usr/bin/grep -F GCJ = gcj GCJFLAGS = -g -O2 GOC = gccgo GREP = /usr/bin/grep HELP2MAN = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing help2man INSTALL = /usr/bin/ginstall -c INSTALL_DATA = ${INSTALL} -m 644 INSTALL_PROGRAM = ${INSTALL} INSTALL_SCRIPT = ${INSTALL} INSTALL_STRIP_PROGRAM = $(install_sh) -c -s LASTRELEASE = 2.4.1 LD = /usr/i686-linux-gnu/bin/ld LDFLAGS = LIBADD_DL = -ldl LIBADD_DLD_LINK = LIBADD_DLOPEN = -ldl LIBADD_SHL_LOAD = LIBOBJS = ${LIBOBJDIR}lt__strl$U.o LIBS = -ldl LIBTOOL = $(SHELL) $(top_builddir)/libtool LIPO = LN_S = ln -s LTDLOPEN = libltdl LTLIBOBJS = ${LIBOBJDIR}lt__strl$U.lo LT_CONFIG_H = config.h LT_DLLOADERS = libltdl/dlopen.la LT_DLPREOPEN = -dlpreopen libltdl/dlopen.la M4SH = $(AUTOM4TE) --language=m4sh MAKEINFO = ${SHELL} /usr/src/libtool/libtool/libltdl/config/missing makeinfo MANIFEST_TOOL = : MKDIR_P = /usr/bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o ORDER = | OTOOL = OTOOL64 = PACKAGE = libtool PACKAGE_BUGREPORT = bug-libtool@gnu.org PACKAGE_NAME = GNU Libtool PACKAGE_STRING = GNU Libtool 2.4.2 PACKAGE_TARNAME = libtool PACKAGE_URL = http://www.gnu.org/software/libtool/ PACKAGE_VERSION = 2.4.2 PATH_SEPARATOR = : RANLIB = ranlib RC = SED = /usr/bin/sed SET_MAKE = SHELL = /bin/sh STRIP = strip TIMESTAMP = VERSION = 2.4.2 abs_builddir = /usr/src/libtool/libtool abs_srcdir = /usr/src/libtool/libtool abs_top_builddir = /usr/src/libtool/libtool abs_top_srcdir = /usr/src/libtool/libtool ac_ct_AR = ar ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_DUMPBIN = ac_ct_F77 = gfortran ac_ct_FC = gfortran aclocaldir = ${datadir}/aclocal am__include = include am__leading_dot = . am__quote = am__tar = $${TAR-tar} chof - "$$tardir" am__untar = $${TAR-tar} xf - bindir = ${exec_prefix}/bin build = i686-pc-linux-gnu build_alias = build_cpu = i686 build_os = linux-gnu build_vendor = pc builddir = . datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} host = i686-pc-linux-gnu host_alias = host_cpu = i686 host_os = linux-gnu host_vendor = pc htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info install_sh = ${SHELL} /usr/src/libtool/libtool/libltdl/config/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale localstatedir = ${prefix}/var mandir = ${datarootdir}/man mkdir_p = $(MKDIR_P) oldincludedir = /usr/include package_revision = 1.3337 pdfdir = ${docdir} prefix = /usr/local program_transform_name = s,x,x, psdir = ${docdir} sbindir = ${exec_prefix}/sbin sharedstatedir = ${prefix}/com srcdir = . sys_symbol_underscore = no sysconfdir = ${prefix}/etc target_alias = to_host_file_cmd = func_convert_file_noop to_tool_file_cmd = func_convert_file_noop top_build_prefix = top_builddir = . top_srcdir = . ACLOCAL_AMFLAGS = -I libltdl/m4 # -I$(srcdir) is needed for user that built libltdl with a sub-Automake # (not as a sub-package!) using 'nostdinc': AM_CPPFLAGS = -DLT_CONFIG_H='<$(LT_CONFIG_H)>' -DLTDL -I. -I$(srcdir) \ -Ilibltdl -I$(srcdir)/libltdl -I$(srcdir)/libltdl/libltdl AM_LDFLAGS = -no-undefined DIST_SUBDIRS = . $(CONF_SUBDIRS) # Use `$(srcdir)' for the benefit of non-GNU makes: this is # how libtoolize.in appears in our dependencies. EXTRA_DIST = bootstrap $(srcdir)/libtoolize.in $(auxdir)/ltmain.m4sh \ $(auxdir)/mkstamp $(sh_files) ChangeLog.1996 ChangeLog.1997 \ ChangeLog.1998 ChangeLog.1999 ChangeLog.2000 ChangeLog.2001 \ ChangeLog.2002 ChangeLog.2003 ChangeLog.2004 ChangeLog.2005 \ ChangeLog.2006 ChangeLog.2007 ChangeLog.2008 ChangeLog.2009 \ ChangeLog.2010 $(m4dir)/ltversion.in \ $(srcdir)/$(m4dir)/ltversion.m4 $(srcdir)/$(auxdir)/ltmain.sh \ libtoolize.m4sh libltdl/lt__dirent.c libltdl/lt__strl.c \ libltdl/COPYING.LIB libltdl/configure.ac libltdl/Makefile.am \ libltdl/aclocal.m4 libltdl/Makefile.in libltdl/configure \ libltdl/config-h.in libltdl/README libltdl/argz_.h \ libltdl/argz.c $(srcdir)/libltdl/stamp-mk \ $(m4dir)/lt~obsolete.m4 $(srcdir)/doc/notes.txt \ $(edit_readme_alpha) $(srcdir)/$(TESTSUITE) $(TESTSUITE_AT) \ $(srcdir)/tests/package.m4 $(srcdir)/tests/defs.in \ tests/defs.m4sh $(COMMON_TESTS) $(CXX_TESTS) $(F77_TESTS) \ $(FC_TESTS) $(INTERACTIVE_TESTS) BUILT_SOURCES = libtool libtoolize libltdl/$(ARGZ_H) CLEANFILES = libtool libtoolize libtoolize.tmp $(auxdir)/ltmain.tmp \ $(m4dir)/ltversion.tmp libltdl/libltdl.la libltdl/libltdlc.la \ libltdl/libdlloader.la $(LIBOBJS) $(LTLIBOBJS) MOSTLYCLEANFILES = libltdl/argz.h libltdl/argz.h-t DISTCLEANFILES = libtool.dvi tests/atconfig tests/defs MAINTAINERCLEANFILES = $(dist_man1_MANS) include_HEADERS = $(am__append_1) noinst_LTLIBRARIES = $(LT_DLLOADERS) $(am__append_3) lib_LTLIBRARIES = $(am__append_2) EXTRA_LTLIBRARIES = libltdl/dlopen.la libltdl/dld_link.la \ libltdl/dyld.la libltdl/load_add_on.la libltdl/loadlibrary.la \ libltdl/shl_load.la auxdir = libltdl/config m4dir = libltdl/m4 # Using `cd' in backquotes may print the directory name, use this instead: lt__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd MKSTAMP = $(SHELL) $(srcdir)/$(auxdir)/mkstamp timestamp = set dummy `$(MKSTAMP) $(srcdir)`; shift; \ case $(VERSION) in \ *[acegikmoqsuwy]) TIMESTAMP=" $$1 $$2" ;; \ *) TIMESTAMP="" ;; \ esac rebuild = rebuild=:; $(timestamp); correctver=$$1 # ---------- # # Bootstrap. # # ---------- # sh_files = $(auxdir)/general.m4sh $(auxdir)/getopt.m4sh bootstrap_edit = sed \ -e 's,@MACRO_VERSION\@,$(VERSION),g' \ -e "s,@MACRO_REVISION\@,$$correctver,g" \ -e "s,@MACRO_SERIAL\@,$$serial,g" \ -e 's,@PACKAGE\@,$(PACKAGE),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ -e "s,@package_revision\@,$$correctver,g" \ -e 's,@PACKAGE_STRING\@,$(PACKAGE_NAME) $(VERSION),g' \ -e 's,@PACKAGE_TARNAME\@,$(PACKAGE),g' \ -e 's,@PACKAGE_VERSION\@,$(VERSION),g' \ -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \ -e 's,@VERSION\@,$(VERSION),g' LTDL_BOOTSTRAP_DEPS = $(srcdir)/libltdl/aclocal.m4 \ $(srcdir)/libltdl/stamp-mk \ $(srcdir)/libltdl/configure \ $(srcdir)/libltdl/config-h.in configure_edit = sed \ -e 's,@aclocal_DATA\@,$(aclocalfiles),g' \ -e 's,@aclocaldir\@,$(aclocaldir),g' \ -e 's,@datadir\@,$(datadir),g' \ -e 's,@EGREP\@,$(EGREP),g' \ -e 's,@FGREP\@,$(FGREP),g' \ -e 's,@GREP\@,$(GREP),g' \ -e 's,@host_triplet\@,$(host_triplet),g' \ -e 's,@LN_S\@,$(LN_S),g' \ -e "s,@pkgconfig_files\@,$(auxfiles),g" \ -e 's,@pkgdatadir\@,$(pkgdatadir),g' \ -e "s,@pkgltdl_files\@,$(ltdldatafiles),g" \ -e 's,@prefix\@,$(prefix),g' \ -e 's,@SED\@,$(SED),g' # The libtool distributor and the standalone libtool script. bin_SCRIPTS = libtoolize libtool LTDL_VERSION_INFO = -version-info 10:0:3 ltdlincludedir = $(includedir)/libltdl ltdlinclude_HEADERS = libltdl/libltdl/lt_system.h \ libltdl/libltdl/lt_error.h \ libltdl/libltdl/lt_dlloader.h libltdl_libltdl_la_SOURCES = libltdl/libltdl/lt__alloc.h \ libltdl/libltdl/lt__dirent.h \ libltdl/libltdl/lt__glibc.h \ libltdl/libltdl/lt__private.h \ libltdl/libltdl/lt__strl.h \ libltdl/libltdl/lt_dlloader.h \ libltdl/libltdl/lt_error.h \ libltdl/libltdl/lt_system.h \ libltdl/libltdl/slist.h \ libltdl/loaders/preopen.c \ libltdl/lt__alloc.c \ libltdl/lt_dlloader.c \ libltdl/lt_error.c \ libltdl/ltdl.c \ libltdl/ltdl.h \ libltdl/slist.c libltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS) libltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN) libltdl_libltdl_la_LIBADD = $(LTLIBOBJS) libltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(LTLIBOBJS) libltdl_libltdlc_la_SOURCES = $(libltdl_libltdl_la_SOURCES) libltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS) libltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN) libltdl_libltdlc_la_LIBADD = $(libltdl_libltdl_la_LIBADD) libltdl_libltdlc_la_DEPENDENCIES = $(libltdl_libltdl_la_DEPENDENCIES) libltdl_dlopen_la_SOURCES = libltdl/loaders/dlopen.c libltdl_dlopen_la_LDFLAGS = -module -avoid-version libltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN) libltdl_dld_link_la_SOURCES = libltdl/loaders/dld_link.c libltdl_dld_link_la_LDFLAGS = -module -avoid-version libltdl_dld_link_la_LIBADD = -ldld libltdl_dyld_la_SOURCES = libltdl/loaders/dyld.c libltdl_dyld_la_LDFLAGS = -module -avoid-version libltdl_load_add_on_la_SOURCES = libltdl/loaders/load_add_on.c libltdl_load_add_on_la_LDFLAGS = -module -avoid-version libltdl_loadlibrary_la_SOURCES = libltdl/loaders/loadlibrary.c libltdl_loadlibrary_la_LDFLAGS = -module -avoid-version libltdl_shl_load_la_SOURCES = libltdl/loaders/shl_load.c libltdl_shl_load_la_LDFLAGS = -module -avoid-version libltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD) sub_aclocal_m4_deps = \ $(srcdir)/libltdl/configure.ac \ $(m4dir)/libtool.m4 \ $(m4dir)/ltoptions.m4 \ $(m4dir)/ltdl.m4 \ $(srcdir)/$(m4dir)/ltversion.m4 \ $(m4dir)/ltsugar.m4 \ $(m4dir)/argz.m4 \ $(m4dir)/lt~obsolete.m4 sub_configure_deps = $(sub_aclocal_m4_deps) $(srcdir)/libltdl/aclocal.m4 info_TEXINFOS = doc/libtool.texi doc_libtool_TEXINFOS = doc/PLATFORMS doc/fdl.texi doc/notes.texi dist_man1_MANS = $(srcdir)/doc/libtool.1 $(srcdir)/doc/libtoolize.1 update_mans = \ PATH=".$(PATH_SEPARATOR)$$PATH"; export PATH; \ $(HELP2MAN) --output=$@ # These are required by libtoolize and must be executable when installed. # The timestamps on these files must be preserved carefully so we install, # uninstall and set executable with custom rules here. auxexefiles = config/compile config/config.guess config/config.sub \ config/depcomp config/install-sh config/missing auxfiles = $(auxexefiles) config/ltmain.sh # Everything that gets picked up by aclocal is automatically distributed, # this is the list of macro files we install on the user's system. aclocalfiles = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 m4/ltoptions.m4 \ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 ltdldatafiles = libltdl/COPYING.LIB \ libltdl/README \ libltdl/Makefile.inc \ libltdl/Makefile.am \ libltdl/configure.ac \ libltdl/aclocal.m4 \ libltdl/Makefile.in \ libltdl/config-h.in \ libltdl/configure \ libltdl/argz_.h \ libltdl/argz.c \ libltdl/loaders/dld_link.c \ libltdl/loaders/dlopen.c \ libltdl/loaders/dyld.c \ libltdl/loaders/load_add_on.c \ libltdl/loaders/loadlibrary.c \ libltdl/loaders/shl_load.c \ libltdl/lt__dirent.c \ libltdl/lt__strl.c \ $(libltdl_libltdl_la_SOURCES) edit_readme_alpha = $(auxdir)/edit-readme-alpha # The testsuite files are evaluated in the order given here. TESTSUITE = tests/testsuite TESTSUITE_AT = tests/testsuite.at \ tests/getopt-m4sh.at \ tests/libtoolize.at \ tests/help.at \ tests/duplicate_members.at \ tests/duplicate_conv.at \ tests/duplicate_deps.at \ tests/flags.at \ tests/inherited_flags.at \ tests/convenience.at \ tests/link-order.at \ tests/link-order2.at \ tests/fail.at \ tests/shlibpath.at \ tests/runpath-in-lalib.at \ tests/static.at \ tests/export.at \ tests/search-path.at \ tests/indirect_deps.at \ tests/archive-in-archive.at \ tests/exeext.at \ tests/execute-mode.at \ tests/bindir.at \ tests/cwrapper.at \ tests/deplib-in-subdir.at \ tests/infer-tag.at \ tests/localization.at \ tests/nocase.at \ tests/install.at \ tests/versioning.at \ tests/destdir.at \ tests/old-m4-iface.at \ tests/am-subdir.at \ tests/lt_dlexit.at \ tests/lt_dladvise.at \ tests/lt_dlopen.at \ tests/lt_dlopen_a.at \ tests/lt_dlopenext.at \ tests/ltdl-libdir.at \ tests/ltdl-api.at \ tests/dlloader-api.at \ tests/loadlibrary.at \ tests/lalib-syntax.at \ tests/resident.at \ tests/slist.at \ tests/need_lib_prefix.at \ tests/standalone.at \ tests/subproject.at \ tests/nonrecursive.at \ tests/recursive.at \ tests/template.at \ tests/ctor.at \ tests/exceptions.at \ tests/early-libtool.at \ tests/with-pic.at \ tests/no-executables.at \ tests/deplibs-ident.at \ tests/configure-iface.at \ tests/stresstest.at \ tests/cmdline_wrap.at \ tests/pic_flag.at \ tests/darwin.at \ tests/dumpbin-symbols.at \ tests/deplibs-mingw.at \ tests/sysroot.at # Be sure to reexport important environment variables: TESTS_ENVIRONMENT = MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" \ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS)" LD="$(LD)" LDFLAGS="$(LDFLAGS)" \ LIBS="$(LIBS)" LN_S="$(LN_S)" NM="$(NM)" RANLIB="$(RANLIB)" \ AR="$(AR)" \ M4SH="$(M4SH)" SED="$(SED)" STRIP="$(STRIP)" lt_INSTALL="$(INSTALL)" \ MANIFEST_TOOL="$(MANIFEST_TOOL)" \ OBJEXT="$(OBJEXT)" EXEEXT="$(EXEEXT)" \ SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" CXXCPP="$(CXXCPP)" \ F77="$(F77)" FFLAGS="$(FFLAGS)" \ FC="$(FC)" FCFLAGS="$(FCFLAGS)" \ GCJ="$(GCJ)" GCJFLAGS="$(GCJFLAGS)" \ lt_cv_to_host_file_cmd="$(to_host_file_cmd)" \ lt_cv_to_tool_file_cmd="$(to_tool_file_cmd)" BUILDCHECK_ENVIRONMENT = _lt_pkgdatadir="$(abs_top_srcdir)" \ LIBTOOLIZE="$(abs_top_builddir)/libtoolize" \ LIBTOOL="$(abs_top_builddir)/libtool" \ tst_aclocaldir="$(abs_top_srcdir)/libltdl/m4" INSTALLCHECK_ENVIRONMENT = \ LIBTOOLIZE="$(bindir)/`echo libtoolize | sed '$(program_transform_name)'`" \ LIBTOOL="$(bindir)/`echo libtool | sed '$(program_transform_name)'`" \ LTDLINCL="-I$(includedir)" \ LIBLTDL="$(libdir)/libltdl.la" \ tst_aclocaldir="$(aclocaldir)" CD_TESTDIR = abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; cd tests testsuite_deps = tests/atconfig $(srcdir)/$(TESTSUITE) testsuite_deps_uninstalled = $(testsuite_deps) libltdl/libltdlc.la \ $(bin_SCRIPTS) $(LTDL_BOOTSTRAP_DEPS) # !WARNING! Don't add any new tests here, we are migrating to an # Autotest driven framework, please add new test cases # using the new framework above. When the migration is # complete this section should be removed. CXX_TESTS = \ tests/tagdemo-static.test \ tests/tagdemo-static-make.test \ tests/tagdemo-static-exec.test \ tests/tagdemo-conf.test \ tests/tagdemo-make.test \ tests/tagdemo-exec.test \ tests/tagdemo-shared.test \ tests/tagdemo-shared-make.test \ tests/tagdemo-shared-exec.test \ tests/tagdemo-undef.test \ tests/tagdemo-undef-make.test \ tests/tagdemo-undef-exec.test F77_TESTS = \ tests/f77demo-static.test \ tests/f77demo-static-make.test \ tests/f77demo-static-exec.test \ tests/f77demo-conf.test \ tests/f77demo-make.test \ tests/f77demo-exec.test \ tests/f77demo-shared.test \ tests/f77demo-shared-make.test \ tests/f77demo-shared-exec.test FC_TESTS = \ tests/fcdemo-static.test \ tests/fcdemo-static-make.test \ tests/fcdemo-static-exec.test \ tests/fcdemo-conf.test \ tests/fcdemo-make.test \ tests/fcdemo-exec.test \ tests/fcdemo-shared.test \ tests/fcdemo-shared-make.test \ tests/fcdemo-shared-exec.test COMMON_TESTS = \ tests/link.test \ tests/link-2.test \ tests/nomode.test \ tests/objectlist.test \ tests/quote.test \ tests/sh.test \ tests/suffix.test \ tests/tagtrace.test \ tests/cdemo-static.test \ tests/cdemo-static-make.test \ tests/cdemo-static-exec.test \ tests/demo-static.test \ tests/demo-static-make.test \ tests/demo-static-exec.test \ tests/demo-static-inst.test \ tests/demo-static-unst.test \ tests/depdemo-static.test \ tests/depdemo-static-make.test \ tests/depdemo-static-exec.test \ tests/depdemo-static-inst.test \ tests/depdemo-static-unst.test \ tests/mdemo-static.test \ tests/mdemo-static-make.test \ tests/mdemo-static-exec.test \ tests/mdemo-static-inst.test \ tests/mdemo-static-unst.test \ tests/cdemo-conf.test \ tests/cdemo-make.test \ tests/cdemo-exec.test \ tests/demo-conf.test \ tests/demo-make.test \ tests/demo-exec.test \ tests/demo-inst.test \ tests/demo-unst.test \ tests/demo-deplibs.test \ tests/depdemo-conf.test \ tests/depdemo-make.test \ tests/depdemo-exec.test \ tests/depdemo-inst.test \ tests/depdemo-unst.test \ tests/mdemo-conf.test \ tests/mdemo-make.test \ tests/mdemo-exec.test \ tests/mdemo-inst.test \ tests/mdemo-unst.test \ tests/mdemo-dryrun.test \ tests/mdemo2-conf.test \ tests/mdemo2-make.test \ tests/mdemo2-exec.test \ tests/pdemo-conf.test \ tests/pdemo-make.test \ tests/pdemo-exec.test \ tests/pdemo-inst.test \ tests/demo-nofast.test \ tests/demo-nofast-make.test \ tests/demo-nofast-exec.test \ tests/demo-nofast-inst.test \ tests/demo-nofast-unst.test \ tests/depdemo-nofast.test \ tests/depdemo-nofast-make.test \ tests/depdemo-nofast-exec.test \ tests/depdemo-nofast-inst.test \ tests/depdemo-nofast-unst.test \ tests/demo-pic.test \ tests/demo-pic-make.test \ tests/demo-pic-exec.test \ tests/demo-nopic.test \ tests/demo-nopic-make.test \ tests/demo-nopic-exec.test \ tests/cdemo-shared.test \ tests/cdemo-shared-make.test \ tests/cdemo-shared-exec.test \ tests/mdemo-shared.test \ tests/mdemo-shared-make.test \ tests/mdemo-shared-exec.test \ tests/mdemo-shared-inst.test \ tests/mdemo-shared-unst.test \ tests/cdemo-undef.test \ tests/cdemo-undef-make.test \ tests/cdemo-undef-exec.test # Actually, only demo-relink and depdemo-relink require interaction, # but they depend on the other tests being run beforehand. INTERACTIVE_TESTS = tests/demo-shared.test tests/demo-shared-make.test \ tests/demo-shared-exec.test tests/demo-shared-inst.test \ tests/demo-hardcode.test tests/demo-relink.test \ tests/demo-noinst-link.test tests/demo-shared-unst.test \ tests/depdemo-shared.test tests/depdemo-shared-make.test \ tests/depdemo-shared-exec.test tests/depdemo-shared-inst.test \ tests/depdemo-relink.test tests/depdemo-shared-unst.test \ $(am__append_5) NONINTERACTIVE_TESTS = $(COMMON_TESTS) $(am__append_4) $(am__append_6) TESTS = $(NONINTERACTIVE_TESTS) $(INTERACTIVE_TESTS) # For distclean, we may have to fake Makefiles in the test directories # so that descending in DIST_SUBDIRS works. # Hide the additional dependency from automake so it still outputs the rule. distclean_recursive = distclean-recursive all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .dvi .lo .log .o .obj .ps .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/libltdl/Makefile.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(srcdir)/libltdl/Makefile.inc: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config-h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config-h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libltdl/loaders/$(am__dirstamp): @$(MKDIR_P) libltdl/loaders @: > libltdl/loaders/$(am__dirstamp) libltdl/loaders/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libltdl/loaders/$(DEPDIR) @: > libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/loaders/dld_link.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/$(am__dirstamp): @$(MKDIR_P) libltdl @: > libltdl/$(am__dirstamp) libltdl/dld_link.la: $(libltdl_dld_link_la_OBJECTS) $(libltdl_dld_link_la_DEPENDENCIES) $(EXTRA_libltdl_dld_link_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_dld_link_la_LINK) $(libltdl_dld_link_la_OBJECTS) $(libltdl_dld_link_la_LIBADD) $(LIBS) libltdl/loaders/dlopen.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/dlopen.la: $(libltdl_dlopen_la_OBJECTS) $(libltdl_dlopen_la_DEPENDENCIES) $(EXTRA_libltdl_dlopen_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_dlopen_la_LINK) $(libltdl_dlopen_la_OBJECTS) $(libltdl_dlopen_la_LIBADD) $(LIBS) libltdl/loaders/dyld.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/dyld.la: $(libltdl_dyld_la_OBJECTS) $(libltdl_dyld_la_DEPENDENCIES) $(EXTRA_libltdl_dyld_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_dyld_la_LINK) $(libltdl_dyld_la_OBJECTS) $(libltdl_dyld_la_LIBADD) $(LIBS) libltdl/loaders/libltdl_libltdl_la-preopen.lo: \ libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libltdl/$(DEPDIR) @: > libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdl_la-lt__alloc.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdl_la-lt_dlloader.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdl_la-lt_error.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdl_la-ltdl.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdl_la-slist.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl.la: $(libltdl_libltdl_la_OBJECTS) $(libltdl_libltdl_la_DEPENDENCIES) $(EXTRA_libltdl_libltdl_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_libltdl_la_LINK) $(am_libltdl_libltdl_la_rpath) $(libltdl_libltdl_la_OBJECTS) $(libltdl_libltdl_la_LIBADD) $(LIBS) libltdl/loaders/libltdl_libltdlc_la-preopen.lo: \ libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdlc_la-lt__alloc.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdlc_la-lt_dlloader.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdlc_la-lt_error.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdlc_la-ltdl.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdl_libltdlc_la-slist.lo: libltdl/$(am__dirstamp) \ libltdl/$(DEPDIR)/$(am__dirstamp) libltdl/libltdlc.la: $(libltdl_libltdlc_la_OBJECTS) $(libltdl_libltdlc_la_DEPENDENCIES) $(EXTRA_libltdl_libltdlc_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_libltdlc_la_LINK) $(am_libltdl_libltdlc_la_rpath) $(libltdl_libltdlc_la_OBJECTS) $(libltdl_libltdlc_la_LIBADD) $(LIBS) libltdl/loaders/load_add_on.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/load_add_on.la: $(libltdl_load_add_on_la_OBJECTS) $(libltdl_load_add_on_la_DEPENDENCIES) $(EXTRA_libltdl_load_add_on_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_load_add_on_la_LINK) $(libltdl_load_add_on_la_OBJECTS) $(libltdl_load_add_on_la_LIBADD) $(LIBS) libltdl/loaders/loadlibrary.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/loadlibrary.la: $(libltdl_loadlibrary_la_OBJECTS) $(libltdl_loadlibrary_la_DEPENDENCIES) $(EXTRA_libltdl_loadlibrary_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_loadlibrary_la_LINK) $(libltdl_loadlibrary_la_OBJECTS) $(libltdl_loadlibrary_la_LIBADD) $(LIBS) libltdl/loaders/shl_load.lo: libltdl/loaders/$(am__dirstamp) \ libltdl/loaders/$(DEPDIR)/$(am__dirstamp) libltdl/shl_load.la: $(libltdl_shl_load_la_OBJECTS) $(libltdl_shl_load_la_DEPENDENCIES) $(EXTRA_libltdl_shl_load_la_DEPENDENCIES) libltdl/$(am__dirstamp) $(AM_V_CCLD)$(libltdl_shl_load_la_LINK) $(libltdl_shl_load_la_OBJECTS) $(libltdl_shl_load_la_LIBADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f libltdl/*.$(OBJEXT) -rm -f libltdl/*.lo -rm -f libltdl/loaders/*.$(OBJEXT) -rm -f libltdl/loaders/*.lo distclean-compile: -rm -f *.tab.c include libltdl/$(DEPDIR)/argz.Plo include libltdl/$(DEPDIR)/libltdl_libltdl_la-lt__alloc.Plo include libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_dlloader.Plo include libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_error.Plo include libltdl/$(DEPDIR)/libltdl_libltdl_la-ltdl.Plo include libltdl/$(DEPDIR)/libltdl_libltdl_la-slist.Plo include libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt__alloc.Plo include libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_dlloader.Plo include libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_error.Plo include libltdl/$(DEPDIR)/libltdl_libltdlc_la-ltdl.Plo include libltdl/$(DEPDIR)/libltdl_libltdlc_la-slist.Plo include libltdl/$(DEPDIR)/lt__dirent.Plo include libltdl/$(DEPDIR)/lt__strl.Plo include libltdl/loaders/$(DEPDIR)/dld_link.Plo include libltdl/loaders/$(DEPDIR)/dlopen.Plo include libltdl/loaders/$(DEPDIR)/dyld.Plo include libltdl/loaders/$(DEPDIR)/libltdl_libltdl_la-preopen.Plo include libltdl/loaders/$(DEPDIR)/libltdl_libltdlc_la-preopen.Plo include libltdl/loaders/$(DEPDIR)/load_add_on.Plo include libltdl/loaders/$(DEPDIR)/loadlibrary.Plo include libltdl/loaders/$(DEPDIR)/shl_load.Plo .c.o: $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ $(am__mv) $$depbase.Tpo $$depbase.Po # $(AM_V_CC)source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(COMPILE) -c -o $@ $< .c.obj: $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ $(am__mv) $$depbase.Tpo $$depbase.Po # $(AM_V_CC)source='$<' object='$@' libtool=no \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ $(am__mv) $$depbase.Tpo $$depbase.Plo # $(AM_V_CC)source='$<' object='$@' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LTCOMPILE) -c -o $@ $< libltdl/loaders/libltdl_libltdl_la-preopen.lo: libltdl/loaders/preopen.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/loaders/libltdl_libltdl_la-preopen.lo -MD -MP -MF libltdl/loaders/$(DEPDIR)/libltdl_libltdl_la-preopen.Tpo -c -o libltdl/loaders/libltdl_libltdl_la-preopen.lo `test -f 'libltdl/loaders/preopen.c' || echo '$(srcdir)/'`libltdl/loaders/preopen.c $(AM_V_at)$(am__mv) libltdl/loaders/$(DEPDIR)/libltdl_libltdl_la-preopen.Tpo libltdl/loaders/$(DEPDIR)/libltdl_libltdl_la-preopen.Plo # $(AM_V_CC)source='libltdl/loaders/preopen.c' object='libltdl/loaders/libltdl_libltdl_la-preopen.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/loaders/libltdl_libltdl_la-preopen.lo `test -f 'libltdl/loaders/preopen.c' || echo '$(srcdir)/'`libltdl/loaders/preopen.c libltdl/libltdl_libltdl_la-lt__alloc.lo: libltdl/lt__alloc.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdl_la-lt__alloc.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdl_la-lt__alloc.Tpo -c -o libltdl/libltdl_libltdl_la-lt__alloc.lo `test -f 'libltdl/lt__alloc.c' || echo '$(srcdir)/'`libltdl/lt__alloc.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdl_la-lt__alloc.Tpo libltdl/$(DEPDIR)/libltdl_libltdl_la-lt__alloc.Plo # $(AM_V_CC)source='libltdl/lt__alloc.c' object='libltdl/libltdl_libltdl_la-lt__alloc.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdl_la-lt__alloc.lo `test -f 'libltdl/lt__alloc.c' || echo '$(srcdir)/'`libltdl/lt__alloc.c libltdl/libltdl_libltdl_la-lt_dlloader.lo: libltdl/lt_dlloader.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdl_la-lt_dlloader.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_dlloader.Tpo -c -o libltdl/libltdl_libltdl_la-lt_dlloader.lo `test -f 'libltdl/lt_dlloader.c' || echo '$(srcdir)/'`libltdl/lt_dlloader.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_dlloader.Tpo libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_dlloader.Plo # $(AM_V_CC)source='libltdl/lt_dlloader.c' object='libltdl/libltdl_libltdl_la-lt_dlloader.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdl_la-lt_dlloader.lo `test -f 'libltdl/lt_dlloader.c' || echo '$(srcdir)/'`libltdl/lt_dlloader.c libltdl/libltdl_libltdl_la-lt_error.lo: libltdl/lt_error.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdl_la-lt_error.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_error.Tpo -c -o libltdl/libltdl_libltdl_la-lt_error.lo `test -f 'libltdl/lt_error.c' || echo '$(srcdir)/'`libltdl/lt_error.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_error.Tpo libltdl/$(DEPDIR)/libltdl_libltdl_la-lt_error.Plo # $(AM_V_CC)source='libltdl/lt_error.c' object='libltdl/libltdl_libltdl_la-lt_error.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdl_la-lt_error.lo `test -f 'libltdl/lt_error.c' || echo '$(srcdir)/'`libltdl/lt_error.c libltdl/libltdl_libltdl_la-ltdl.lo: libltdl/ltdl.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdl_la-ltdl.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdl_la-ltdl.Tpo -c -o libltdl/libltdl_libltdl_la-ltdl.lo `test -f 'libltdl/ltdl.c' || echo '$(srcdir)/'`libltdl/ltdl.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdl_la-ltdl.Tpo libltdl/$(DEPDIR)/libltdl_libltdl_la-ltdl.Plo # $(AM_V_CC)source='libltdl/ltdl.c' object='libltdl/libltdl_libltdl_la-ltdl.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdl_la-ltdl.lo `test -f 'libltdl/ltdl.c' || echo '$(srcdir)/'`libltdl/ltdl.c libltdl/libltdl_libltdl_la-slist.lo: libltdl/slist.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdl_la-slist.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdl_la-slist.Tpo -c -o libltdl/libltdl_libltdl_la-slist.lo `test -f 'libltdl/slist.c' || echo '$(srcdir)/'`libltdl/slist.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdl_la-slist.Tpo libltdl/$(DEPDIR)/libltdl_libltdl_la-slist.Plo # $(AM_V_CC)source='libltdl/slist.c' object='libltdl/libltdl_libltdl_la-slist.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdl_la-slist.lo `test -f 'libltdl/slist.c' || echo '$(srcdir)/'`libltdl/slist.c libltdl/loaders/libltdl_libltdlc_la-preopen.lo: libltdl/loaders/preopen.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/loaders/libltdl_libltdlc_la-preopen.lo -MD -MP -MF libltdl/loaders/$(DEPDIR)/libltdl_libltdlc_la-preopen.Tpo -c -o libltdl/loaders/libltdl_libltdlc_la-preopen.lo `test -f 'libltdl/loaders/preopen.c' || echo '$(srcdir)/'`libltdl/loaders/preopen.c $(AM_V_at)$(am__mv) libltdl/loaders/$(DEPDIR)/libltdl_libltdlc_la-preopen.Tpo libltdl/loaders/$(DEPDIR)/libltdl_libltdlc_la-preopen.Plo # $(AM_V_CC)source='libltdl/loaders/preopen.c' object='libltdl/loaders/libltdl_libltdlc_la-preopen.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/loaders/libltdl_libltdlc_la-preopen.lo `test -f 'libltdl/loaders/preopen.c' || echo '$(srcdir)/'`libltdl/loaders/preopen.c libltdl/libltdl_libltdlc_la-lt__alloc.lo: libltdl/lt__alloc.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdlc_la-lt__alloc.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt__alloc.Tpo -c -o libltdl/libltdl_libltdlc_la-lt__alloc.lo `test -f 'libltdl/lt__alloc.c' || echo '$(srcdir)/'`libltdl/lt__alloc.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt__alloc.Tpo libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt__alloc.Plo # $(AM_V_CC)source='libltdl/lt__alloc.c' object='libltdl/libltdl_libltdlc_la-lt__alloc.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdlc_la-lt__alloc.lo `test -f 'libltdl/lt__alloc.c' || echo '$(srcdir)/'`libltdl/lt__alloc.c libltdl/libltdl_libltdlc_la-lt_dlloader.lo: libltdl/lt_dlloader.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdlc_la-lt_dlloader.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_dlloader.Tpo -c -o libltdl/libltdl_libltdlc_la-lt_dlloader.lo `test -f 'libltdl/lt_dlloader.c' || echo '$(srcdir)/'`libltdl/lt_dlloader.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_dlloader.Tpo libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_dlloader.Plo # $(AM_V_CC)source='libltdl/lt_dlloader.c' object='libltdl/libltdl_libltdlc_la-lt_dlloader.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdlc_la-lt_dlloader.lo `test -f 'libltdl/lt_dlloader.c' || echo '$(srcdir)/'`libltdl/lt_dlloader.c libltdl/libltdl_libltdlc_la-lt_error.lo: libltdl/lt_error.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdlc_la-lt_error.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_error.Tpo -c -o libltdl/libltdl_libltdlc_la-lt_error.lo `test -f 'libltdl/lt_error.c' || echo '$(srcdir)/'`libltdl/lt_error.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_error.Tpo libltdl/$(DEPDIR)/libltdl_libltdlc_la-lt_error.Plo # $(AM_V_CC)source='libltdl/lt_error.c' object='libltdl/libltdl_libltdlc_la-lt_error.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdlc_la-lt_error.lo `test -f 'libltdl/lt_error.c' || echo '$(srcdir)/'`libltdl/lt_error.c libltdl/libltdl_libltdlc_la-ltdl.lo: libltdl/ltdl.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdlc_la-ltdl.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdlc_la-ltdl.Tpo -c -o libltdl/libltdl_libltdlc_la-ltdl.lo `test -f 'libltdl/ltdl.c' || echo '$(srcdir)/'`libltdl/ltdl.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdlc_la-ltdl.Tpo libltdl/$(DEPDIR)/libltdl_libltdlc_la-ltdl.Plo # $(AM_V_CC)source='libltdl/ltdl.c' object='libltdl/libltdl_libltdlc_la-ltdl.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdlc_la-ltdl.lo `test -f 'libltdl/ltdl.c' || echo '$(srcdir)/'`libltdl/ltdl.c libltdl/libltdl_libltdlc_la-slist.lo: libltdl/slist.c $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libltdl/libltdl_libltdlc_la-slist.lo -MD -MP -MF libltdl/$(DEPDIR)/libltdl_libltdlc_la-slist.Tpo -c -o libltdl/libltdl_libltdlc_la-slist.lo `test -f 'libltdl/slist.c' || echo '$(srcdir)/'`libltdl/slist.c $(AM_V_at)$(am__mv) libltdl/$(DEPDIR)/libltdl_libltdlc_la-slist.Tpo libltdl/$(DEPDIR)/libltdl_libltdlc_la-slist.Plo # $(AM_V_CC)source='libltdl/slist.c' object='libltdl/libltdl_libltdlc_la-slist.lo' libtool=yes \ # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ # $(AM_V_CC_no)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libltdl/libltdl_libltdlc_la-slist.lo `test -f 'libltdl/slist.c' || echo '$(srcdir)/'`libltdl/slist.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf libltdl/.libs libltdl/_libs -rm -rf libltdl/loaders/.libs libltdl/loaders/_libs distclean-libtool: -rm -f libtool config.lt doc/$(am__dirstamp): @$(MKDIR_P) doc @: > doc/$(am__dirstamp) $(srcdir)/doc/libtool.info: doc/libtool.texi $(srcdir)/doc/version.texi $(doc_libtool_TEXINFOS) $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $@ $(srcdir)/doc/libtool.texi; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc doc/libtool.dvi: doc/libtool.texi $(srcdir)/doc/version.texi $(doc_libtool_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/libtool.texi' || echo '$(srcdir)/'`doc/libtool.texi doc/libtool.pdf: doc/libtool.texi $(srcdir)/doc/version.texi $(doc_libtool_TEXINFOS) doc/$(am__dirstamp) $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ `test -f 'doc/libtool.texi' || echo '$(srcdir)/'`doc/libtool.texi doc/libtool.html: doc/libtool.texi $(srcdir)/doc/version.texi $(doc_libtool_TEXINFOS) doc/$(am__dirstamp) $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I doc -I $(srcdir)/doc \ -o $(@:.html=.htp) `test -f 'doc/libtool.texi' || echo '$(srcdir)/'`doc/libtool.texi; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/doc/version.texi: $(srcdir)/doc/stamp-vti $(srcdir)/doc/stamp-vti: doc/libtool.texi $(top_srcdir)/configure test -f doc/$(am__dirstamp) || $(MAKE) $(AM_MAKEFLAGS) doc/$(am__dirstamp) @(dir=.; test -f ./doc/libtool.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/libltdl/config/mdate-sh $$dir/doc/libtool.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/doc/version.texi \ || (echo "Updating $(srcdir)/doc/version.texi"; \ cp vti.tmp $(srcdir)/doc/version.texi) -@rm -f vti.tmp @cp $(srcdir)/doc/version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f $(srcdir)/doc/stamp-vti $(srcdir)/doc/version.texi .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf doc/libtool.t2d doc/libtool.t2p clean-aminfo: -test -z "doc/libtool.dvi doc/libtool.pdf doc/libtool.ps doc/libtool.html" \ || rm -rf doc/libtool.dvi doc/libtool.pdf doc/libtool.ps doc/libtool.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-man1: $(dist_man1_MANS) @$(NORMAL_INSTALL) @list1='$(dist_man1_MANS)'; \ list2=''; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-ltdlincludeHEADERS: $(ltdlinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ltdlincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ltdlincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ltdlincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(ltdlincludedir)" || exit $$?; \ done uninstall-ltdlincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ltdlincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) #.test$(EXEEXT).log: # @p='$<'; \ # $(am__set_b); \ # $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ # --log-file $$b.log --trs-file $$b.trs \ # $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ # "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(INFO_DEPS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) \ $(HEADERS) config.h all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(LIBOBJS)" || rm -f $(LIBOBJS) -test -z "$(LTLIBOBJS)" || rm -f $(LTLIBOBJS) -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f doc/$(am__dirstamp) -rm -f libltdl/$(DEPDIR)/$(am__dirstamp) -rm -f libltdl/$(am__dirstamp) -rm -f libltdl/loaders/$(DEPDIR)/$(am__dirstamp) -rm -f libltdl/loaders/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-aminfo clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf libltdl/$(DEPDIR) libltdl/loaders/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: $(DVIS) html: html-recursive html-am: $(HTMLS) info: info-recursive info-am: $(INFO_DEPS) install-data-am: install-data-local install-includeHEADERS \ install-info-am install-ltdlincludeHEADERS install-man install-dvi: install-dvi-recursive install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-binSCRIPTS install-libLTLIBRARIES install-html: install-html-recursive install-html-am: $(HTMLS) @$(NORMAL_INSTALL) @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-recursive install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-recursive install-ps-am: $(PSS) @$(NORMAL_INSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: installcheck-local maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf libltdl/$(DEPDIR) libltdl/loaders/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf: pdf-recursive pdf-am: $(PDFS) ps: ps-recursive ps-am: $(PSS) uninstall-am: uninstall-binSCRIPTS uninstall-dvi-am uninstall-html-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES uninstall-ltdlincludeHEADERS \ uninstall-man uninstall-pdf-am uninstall-ps-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ am--refresh check check-TESTS check-am check-local clean \ clean-aminfo clean-cscope clean-generic clean-libLTLIBRARIES \ clean-libtool clean-local clean-noinstLTLIBRARIES cscope \ cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-info dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-ltdlincludeHEADERS install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installcheck-local installdirs installdirs-am maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ mostlyclean-vti pdf pdf-am ps ps-am recheck tags tags-am \ uninstall uninstall-am uninstall-binSCRIPTS uninstall-dvi-am \ uninstall-hook uninstall-html-am uninstall-includeHEADERS \ uninstall-info-am uninstall-libLTLIBRARIES \ uninstall-ltdlincludeHEADERS uninstall-man uninstall-man1 \ uninstall-pdf-am uninstall-ps-am $(srcdir)/$(m4dir)/ltversion.m4: $(m4dir)/ltversion.in configure.ac ChangeLog @target='$(srcdir)/$(m4dir)/ltversion.m4'; $(rebuild); \ if test -f "$$target"; then \ set dummy `sed -n '/^# serial /p' "$$target"`; shift; \ actualver=1.$$3; \ test "$$actualver" = "$$correctver" && rebuild=false; \ fi; \ for prereq in $?; do \ case $$prereq in *ChangeLog | *configure.ac);; *) rebuild=:;; esac; \ done; \ if $$rebuild; then \ cd $(srcdir); \ rm -f $(m4dir)/ltversion.tmp; \ serial=`echo "$$correctver" | sed 's,^1[.],,g'`; \ echo $(bootstrap_edit) \ $(srcdir)/$(m4dir)/ltversion.in \> $(srcdir)/$(m4dir)/ltversion.m4; \ $(bootstrap_edit) \ $(m4dir)/ltversion.in > $(m4dir)/ltversion.tmp; \ chmod a-w $(m4dir)/ltversion.tmp; \ mv -f $(m4dir)/ltversion.tmp $(m4dir)/ltversion.m4; \ fi $(srcdir)/$(auxdir)/ltmain.sh: $(sh_files) $(auxdir)/ltmain.m4sh configure.ac ChangeLog @target='$(srcdir)/$(auxdir)/ltmain.sh'; $(rebuild); \ if test -f "$$target"; then \ eval `sed -n '/^package_revision=/p' "$$target"`; \ actualver=$$package_revision; \ test "$$actualver" = "$$correctver" && rebuild=false; \ fi; \ for prereq in $?; do \ case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ done; \ if $$rebuild; then \ cd $(srcdir); \ rm -f $(auxdir)/ltmain.in $(auxdir)/ltmain.tmp \ $(auxdir)/ltmain.sh; \ echo $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \ \> $(auxdir)/ltmain.in; \ $(M4SH) -B $(auxdir) $(auxdir)/ltmain.m4sh \ > $(auxdir)/ltmain.in; \ echo $(bootstrap_edit) \ $(srcdir)/$(auxdir)/ltmain.in "> $$target"; \ $(bootstrap_edit) -e '/^: \$${.*="@.*@"}$$/d' \ $(auxdir)/ltmain.in > $(auxdir)/ltmain.tmp; \ rm -f $(auxdir)/ltmain.in; \ chmod a-w $(auxdir)/ltmain.tmp; \ mv -f $(auxdir)/ltmain.tmp $(auxdir)/ltmain.sh; \ fi $(srcdir)/libtoolize.in: $(sh_files) libtoolize.m4sh Makefile.am cd $(srcdir); \ rm -f libtoolize.in libtoolize.tmp; \ $(M4SH) -B $(auxdir) libtoolize.m4sh > libtoolize.tmp; \ $(bootstrap_edit) libtoolize.tmp > libtoolize.in; \ rm -f libtoolize.tmp $(srcdir)/libltdl/Makefile.am: $(srcdir)/libltdl/Makefile.inc cd $(srcdir); \ in=libltdl/Makefile.inc; out=libltdl/Makefile.am; \ rm -f $$out; \ ( $(SED) -n '1,/^.. DO NOT REMOVE THIS LINE -- /p' $$in; \ { echo 'ACLOCAL_AMFLAGS = -I m4'; \ echo 'AUTOMAKE_OPTIONS = foreign'; \ echo 'AM_CPPFLAGS ='; \ echo 'AM_LDFLAGS ='; \ echo 'BUILT_SOURCES ='; \ echo 'include_HEADERS ='; \ echo 'noinst_LTLIBRARIES ='; \ echo 'lib_LTLIBRARIES ='; \ echo 'EXTRA_LTLIBRARIES ='; \ echo 'EXTRA_DIST ='; \ echo 'CLEANFILES ='; \ echo 'MOSTLYCLEANFILES ='; \ }; \ $(SED) -n '/^.. DO NOT REMOVE THIS LINE -- /,$$p' $$in | \ $(SED) -e 's,libltdl_,,; s,libltdl/,,; s,: libltdl/,: ,' \ -e 's,\$$(libltdl_,$$(,' \ ) | \ $(SED) -e '/^.. DO NOT REMOVE THIS LINE -- /d' \ -e '1s,^\(.. Makefile.\)inc.*,\1am -- Process this file with automake to produce Makefile.in,' > $$out; chmod a-w $(srcdir)/libltdl/Makefile.am all-local: $(LTDL_BOOTSTRAP_DEPS) libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status rm -f libtoolize.tmp libtoolize $(configure_edit) \ $(srcdir)/libtoolize.in > libtoolize.tmp chmod a+x libtoolize.tmp chmod a-w libtoolize.tmp mv -f libtoolize.tmp libtoolize # We used to do this with a 'stamp-vcl' file, but non-gmake builds # would rerun configure on every invocation, so now we manually # check the version numbers from the build rule when necessary. libtool: $(top_builddir)/config.status $(srcdir)/$(auxdir)/ltmain.sh ChangeLog @target=libtool; $(rebuild); \ if test -f "$$target"; then \ set dummy `./$$target --version | sed 1q`; actualver="$$5"; \ test "$$actualver" = "$$correctver" && rebuild=false; \ fi; \ for prereq in $?; do \ case $$prereq in *ChangeLog);; *) rebuild=:;; esac; \ done; \ if $$rebuild; then \ echo $(SHELL) ./config.status $$target; \ cd $(top_builddir) && $(SHELL) ./config.status $$target; \ fi .PHONY: configure-subdirs configure-subdirs distdir: $(DIST_MAKEFILE_LIST) tests/cdemo/Makefile tests/demo/Makefile tests/depdemo/Makefile tests/f77demo/Makefile tests/fcdemo/Makefile tests/mdemo/Makefile tests/mdemo2/Makefile tests/pdemo/Makefile tests/tagdemo/Makefile : dir=`echo $@ | sed 's,^[^/]*$$,.,;s,/[^/]*$$,,'`; \ test -d $$dir || mkdir $$dir || exit 1; \ abs_srcdir=`$(lt__cd) $(srcdir) && pwd`; \ (cd $$dir && $$abs_srcdir/$$dir/configure --with-dist) || exit 1 # We need the following in order to create an <argz.h> when the system # doesn't have one that works with the given compiler. all-local $(lib_OBJECTS): libltdl/$(ARGZ_H) libltdl/argz.h: libltdl/argz_.h $(mkinstalldirs) . libltdl/ cp $(srcdir)/libltdl/argz_.h $@-t mv $@-t $@ $(srcdir)/libltdl/Makefile.in: $(srcdir)/libltdl/Makefile.am \ $(srcdir)/libltdl/aclocal.m4 cd $(srcdir)/libltdl && $(AUTOMAKE) Makefile $(srcdir)/libltdl/stamp-mk: $(srcdir)/libltdl/Makefile.in cd $(srcdir)/libltdl && \ sed -e 's,config/mdate-sh,,' -e 's,config/texinfo.tex,,' \ -e 's,config/mkinstalldirs,,' \ < Makefile.in > Makefile.inT && \ mv -f Makefile.inT Makefile.in echo stamp > $@ $(srcdir)/libltdl/aclocal.m4: $(sub_aclocal_m4_deps) cd $(srcdir)/libltdl && $(ACLOCAL) -I m4 $(srcdir)/libltdl/configure: $(sub_configure_deps) cd $(srcdir)/libltdl && $(AUTOCONF) $(srcdir)/libltdl/config-h.in: $(sub_configure_deps) cd $(srcdir)/libltdl && $(AUTOHEADER) touch $@ all-local: $(srcdir)/doc/notes.txt $(srcdir)/doc/notes.txt: $(srcdir)/doc/notes.texi cd $(srcdir)/doc && \ $(MAKEINFO) --no-headers $(MAKEINFOFLAGS) -o notes.txt notes.texi $(srcdir)/doc/libtool.1: $(srcdir)/$(auxdir)/ltmain.sh $(update_mans) --help-option=--help-all libtool $(srcdir)/doc/libtoolize.1: $(srcdir)/libtoolize.in $(update_mans) libtoolize install-data-local: libltdl/Makefile.in @$(NORMAL_INSTALL) -rm -rf $(DESTDIR)$(pkgdatadir)/* $(mkinstalldirs) $(DESTDIR)$(aclocaldir) @list='$(aclocalfiles)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) '$(srcdir)/$(m4dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \ $(INSTALL_DATA) "$(srcdir)/$(m4dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \ done $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/config @list='$(auxexefiles)' && for p in $$list; do \ echo " $(INSTALL_SCRIPT) '$(srcdir)/libltdl/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \ $(INSTALL_SCRIPT) "$(srcdir)/libltdl/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done $(INSTALL_DATA) "$(srcdir)/libltdl/config/ltmain.sh" "$(DESTDIR)$(pkgdatadir)/config/ltmain.sh" $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl/libltdl $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/libltdl/loaders @list='$(ltdldatafiles)' && for p in $$list; do \ echo " $(INSTALL_DATA) '$(srcdir)/$$p' '$(DESTDIR)$(pkgdatadir)/$$p'"; \ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(pkgdatadir)/$$p"; \ done -chmod a+x $(DESTDIR)$(pkgdatadir)/libltdl/configure uninstall-hook: @$(NORMAL_UNINSTALL) @list='$(ltdldatafiles) $(auxfiles)'; for f in $$list; do \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done @for p in $(aclocalfiles); do \ f=`echo "$$p" | sed 's|^.*/||'`; \ echo " rm -f '$(DESTDIR)$(aclocaldir)/$$f'"; \ rm -f "$(DESTDIR)$(aclocaldir)/$$f"; \ done dist-hook: case $(VERSION) in \ *[a-z]) $(SHELL) $(srcdir)/$(edit_readme_alpha) $(distdir)/README ;; \ esac for macro in LT_INIT AC_PROG_LIBTOOL AM_PROG_LIBTOOL; do \ if grep $$macro $(srcdir)/aclocal.m4 $(srcdir)/libltdl/aclocal.m4; then \ echo "Bogus $$macro macro contents in an aclocal.m4 file." >&2; \ exit 1; \ else :; fi; \ done # Use `$(srcdir)' for the benefit of non-GNU makes: this is # how `testsuite' appears in our dependencies. $(srcdir)/$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT) Makefile.am cd $(srcdir)/tests && \ $(AUTOTEST) `echo $(TESTSUITE_AT) | sed 's,tests/,,g'` -o testsuite.tmp && \ mv -f testsuite.tmp testsuite $(srcdir)/tests/package.m4: $(srcdir)/configure.ac Makefile.am { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [GNU Libtool])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [libtool])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [2.4.2])'; \ echo 'm4_define([AT_PACKAGE_STRING], [GNU Libtool 2.4.2])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [bug-libtool@gnu.org])'; \ echo 'm4_define([AT_PACKAGE_URL], [http://www.gnu.org/software/libtool/])'; \ } | $(bootstrap_edit) > $(srcdir)/tests/package.m4 tests/atconfig: $(top_builddir)/config.status $(SHELL) ./config.status tests/atconfig # Hook the test suite into the check rule check-local: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) # Run the test suite on the *installed* tree. installcheck-local: $(testsuite_deps) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(INSTALLCHECK_ENVIRONMENT) $(TESTSUITEFLAGS) \ AUTOTEST_PATH="$(exec_prefix)/bin" check-noninteractive-old: $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(NONINTERACTIVE_TESTS)' check-interactive-old: $(MAKE) $(AM_MAKEFLAGS) check-TESTS TESTS='$(INTERACTIVE_TESTS)' # Run only noninteractive parts of the new testsuite. check-noninteractive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k !interactive INNER_TESTSUITEFLAGS=",!interactive" \ $(TESTSUITEFLAGS) # Run only interactive parts of the new testsuite. check-interactive-new: $(testsuite_deps_uninstalled) $(CD_TESTDIR); \ CONFIG_SHELL="$(SHELL)" $(SHELL) $$abs_srcdir/$(TESTSUITE) \ $(TESTS_ENVIRONMENT) $(BUILDCHECK_ENVIRONMENT) \ -k interactive -k recursive INNER_TESTSUITEFLAGS=",interactive" \ $(TESTSUITEFLAGS) check-interactive: check-interactive-old check-interactive-new check-noninteractive: check-noninteractive-old check-noninteractive-new # We need to remove any file droppings left behind by testsuite clean-local: clean-local-legacy -$(CD_TESTDIR); \ test -f $$abs_srcdir/$(TESTSUITE) && \ $(SHELL) $$abs_srcdir/$(TESTSUITE) --clean tests/tagdemo-undef-exec.log: tests/tagdemo-undef-make.log tests/tagdemo-undef-make.log: tests/tagdemo-undef.log tests/tagdemo-undef.log: tests/tagdemo-shared-exec.log tests/tagdemo-shared-exec.log: tests/tagdemo-shared-make.log tests/tagdemo-shared-make.log: tests/tagdemo-shared.log tests/tagdemo-shared.log: tests/tagdemo-exec.log tests/tagdemo-exec.log: tests/tagdemo-make.log tests/tagdemo-make.log: tests/tagdemo-conf.log tests/tagdemo-conf.log: tests/tagdemo-static-exec.log tests/tagdemo-static-exec.log: tests/tagdemo-static-make.log tests/tagdemo-static-make.log: tests/tagdemo-static.log tests/f77demo-shared-exec.log: tests/f77demo-shared-make.log tests/f77demo-shared-make.log: tests/f77demo-shared.log tests/f77demo-shared.log: tests/f77demo-exec.log tests/f77demo-exec.log: tests/f77demo-make.log tests/f77demo-make.log: tests/f77demo-conf.log tests/f77demo-conf.log: tests/f77demo-static-exec.log tests/f77demo-static-exec.log: tests/f77demo-static-make.log tests/f77demo-static-make.log: tests/f77demo-static.log tests/fcdemo-shared-exec.log: tests/fcdemo-shared-make.log tests/fcdemo-shared-make.log: tests/fcdemo-shared.log tests/fcdemo-shared.log: tests/fcdemo-exec.log tests/fcdemo-exec.log: tests/fcdemo-make.log tests/fcdemo-make.log: tests/fcdemo-conf.log tests/fcdemo-conf.log: tests/fcdemo-static-exec.log tests/fcdemo-static-exec.log: tests/fcdemo-static-make.log tests/fcdemo-static-make.log: tests/fcdemo-static.log tests/cdemo-undef-exec.log: tests/cdemo-undef-make.log tests/cdemo-undef-make.log: tests/cdemo-undef.log tests/cdemo-undef.log: | tests/cdemo-shared-exec.log tests/cdemo-shared-exec.log: tests/cdemo-shared-make.log tests/cdemo-shared-make.log: tests/cdemo-shared.log tests/cdemo-shared.log: | tests/cdemo-exec.log tests/cdemo-exec.log: tests/cdemo-make.log tests/cdemo-make.log: tests/cdemo-conf.log tests/cdemo-conf.log: | tests/cdemo-static-exec.log tests/cdemo-static-exec.log: tests/cdemo-static-make.log tests/cdemo-static-make.log: tests/cdemo-static.log tests/demo-shared-unst.log: tests/demo-noinst-link.log tests/demo-noinst-link.log: tests/demo-relink.log tests/demo-relink.log: tests/demo-hardcode.log tests/demo-hardcode.log: tests/demo-shared-inst.log tests/demo-shared-inst.log: tests/demo-shared-exec.log tests/demo-shared-exec.log: tests/demo-shared-make.log tests/demo-shared-make.log: tests/demo-shared.log tests/demo-shared.log: | tests/demo-nopic-exec.log tests/demo-nopic-exec.log: tests/demo-nopic-make.log tests/demo-nopic-make.log: tests/demo-nopic.log tests/demo-nopic.log: | tests/demo-pic-exec.log tests/demo-pic-exec.log: tests/demo-pic-make.log tests/demo-pic-make.log: tests/demo-pic.log tests/demo-pic.log: | tests/demo-nofast-unst.log tests/demo-nofast-unst.log: tests/demo-nofast-inst.log tests/demo-nofast-inst.log: tests/demo-nofast-exec.log tests/demo-nofast-exec.log: tests/demo-nofast-make.log tests/demo-nofast-make.log: tests/demo-nofast.log tests/demo-nofast.log: | tests/demo-deplibs.log tests/demo-deplibs.log: tests/demo-unst.log tests/demo-unst.log: tests/demo-inst.log tests/demo-inst.log: tests/demo-exec.log tests/demo-exec.log: tests/demo-make.log tests/demo-make.log: tests/demo-conf.log tests/demo-conf.log: | tests/demo-static-unst.log tests/demo-static-unst.log: tests/demo-static-inst.log tests/demo-static-inst.log: tests/demo-static-exec.log tests/demo-static-exec.log: tests/demo-static-make.log tests/demo-static-make.log: tests/demo-static.log tests/depdemo-shared-unst.log: tests/depdemo-relink.log tests/depdemo-relink.log: tests/depdemo-shared-inst.log tests/depdemo-shared-inst.log: tests/depdemo-shared-exec.log tests/depdemo-shared-exec.log: tests/depdemo-shared-make.log tests/depdemo-shared-make.log: tests/depdemo-shared.log tests/depdemo-shared.log: | tests/depdemo-nofast-unst.log tests/depdemo-nofast-unst.log: tests/depdemo-nofast-inst.log tests/depdemo-nofast-inst.log: tests/depdemo-nofast-exec.log tests/depdemo-nofast-exec.log: tests/depdemo-nofast-make.log tests/depdemo-nofast-make.log: tests/depdemo-nofast.log tests/depdemo-nofast.log: | tests/depdemo-unst.log tests/depdemo-unst.log: tests/depdemo-inst.log tests/depdemo-inst.log: tests/depdemo-exec.log tests/depdemo-exec.log: tests/depdemo-make.log tests/depdemo-make.log: tests/depdemo-conf.log tests/depdemo-conf.log: | tests/depdemo-static-unst.log tests/depdemo-static-unst.log: tests/depdemo-static-inst.log tests/depdemo-static-inst.log: tests/depdemo-static-exec.log tests/depdemo-static-exec.log: tests/depdemo-static-make.log tests/depdemo-static-make.log: tests/depdemo-static.log tests/mdemo-shared-unst.log: tests/mdemo-shared-inst.log tests/mdemo-shared-inst.log: tests/mdemo-shared-exec.log tests/mdemo-shared-exec.log: tests/mdemo-shared-make.log tests/mdemo-shared-make.log: tests/mdemo-shared.log tests/mdemo-shared.log: | tests/mdemo-dryrun.log \ tests/mdemo2-exec.log tests/mdemo-dryrun.log: tests/mdemo-unst.log tests/mdemo-unst.log: tests/mdemo-inst.log tests/mdemo-inst.log: tests/mdemo-exec.log tests/mdemo-exec.log: tests/mdemo-make.log tests/mdemo-make.log: tests/mdemo-conf.log tests/mdemo-conf.log: | tests/mdemo-static-unst.log tests/mdemo-static-unst.log: tests/mdemo-static-inst.log tests/mdemo-static-inst.log: tests/mdemo-static-exec.log tests/mdemo-static-exec.log: tests/mdemo-static-make.log tests/mdemo-static-make.log: tests/mdemo-static.log tests/mdemo2-exec.log: tests/mdemo2-make.log tests/mdemo2-make.log: tests/mdemo2-conf.log \ tests/mdemo-dryrun.log tests/pdemo-inst.log: tests/pdemo-exec.log tests/pdemo-exec.log: tests/pdemo-make.log tests/pdemo-make.log: tests/pdemo-conf.log # The defs script shouldn't be recreated whenever the Makefile is # regenerated since the source tree can be read-only. check-recursive: tests/defs tests/defs: $(srcdir)/tests/defs.in rm -f tests/defs.tmp tests/defs; \ $(configure_edit) $(srcdir)/tests/defs.in > tests/defs.tmp; \ mv -f tests/defs.tmp tests/defs # Use `$(srcdir)/tests' for the benefit of non-GNU makes: this is # how defs.in appears in our dependencies. $(srcdir)/tests/defs.in: $(auxdir)/general.m4sh tests/defs.m4sh Makefile.am cd $(srcdir); \ rm -f tests/defs.in; \ $(M4SH) -B $(auxdir) tests/defs.m4sh > tests/defs.in # We need to remove any files that the above tests created. clean-local-legacy: -for dir in $(CONF_SUBDIRS); do \ if test -f $$dir/Makefile; then \ (cd $$dir && $(MAKE) $(AM_MAKEFLAGS) distclean); \ else :; fi; \ done rm -rf _inst _inst-* $(distclean_recursive): fake-distclean-legacy .PHONY: fake-distclean-legacy fake-distclean-legacy: -for dir in $(CONF_SUBDIRS); do \ if test ! -f $$dir/Makefile; then \ $(mkinstalldirs) $$dir; \ echo 'distclean: ; rm -f Makefile' > $$dir/Makefile; \ else :; fi; \ done $(TESTS): tests/defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT:
Distrotech/libtool
Makefile
Makefile
gpl-2.0
119,331
[ 30522, 1001, 2191, 8873, 2571, 1012, 1999, 7013, 2011, 8285, 2863, 3489, 1015, 1012, 2410, 1012, 1017, 2013, 2191, 8873, 2571, 1012, 2572, 1012, 1001, 2191, 8873, 2571, 1012, 7013, 2013, 2191, 8873, 2571, 1012, 1999, 2011, 9530, 8873, 273...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; namespace Org.BouncyCastle.Asn1 { public class DerBoolean : Asn1Object { private readonly byte value; public static readonly DerBoolean False = new DerBoolean(false); public static readonly DerBoolean True = new DerBoolean(true); /** * return a bool from the passed in object. * * @exception ArgumentException if the object cannot be converted. */ public static DerBoolean GetInstance( object obj) { if (obj == null || obj is DerBoolean) { return (DerBoolean) obj; } throw new ArgumentException("illegal object in GetInstance: " + obj.GetType().Name); } /** * return a DerBoolean from the passed in bool. */ public static DerBoolean GetInstance( bool value) { return value ? True : False; } /** * return a Boolean from a tagged object. * * @param obj the tagged object holding the object we want * @param explicitly true if the object is meant to be explicitly * tagged false otherwise. * @exception ArgumentException if the tagged object cannot * be converted. */ public static DerBoolean GetInstance( Asn1TaggedObject obj, bool isExplicit) { Asn1Object o = obj.GetObject(); if (isExplicit || o is DerBoolean) { return GetInstance(o); } return new DerBoolean(((Asn1OctetString)o).GetOctets()); } public DerBoolean( byte[] val) { if (val.Length != 1) throw new ArgumentException("byte value should have 1 byte in it", "val"); // TODO Are there any constraints on the possible byte values? this.value = val[0]; } private DerBoolean( bool value) { this.value = value ? (byte)0xff : (byte)0; } public bool IsTrue { get { return value != 0; } } internal override void Encode( DerOutputStream derOut) { // TODO Should we make sure the byte value is one of '0' or '0xff' here? derOut.WriteEncoded(Asn1Tags.Boolean, new byte[]{ value }); } protected override bool Asn1Equals( Asn1Object asn1Object) { DerBoolean other = asn1Object as DerBoolean; if (other == null) return false; return IsTrue == other.IsTrue; } protected override int Asn1GetHashCode() { return IsTrue.GetHashCode(); } public override string ToString() { return IsTrue ? "TRUE" : "FALSE"; } } }
DSorlov/Sorlov.PowerShell
Sorlov.PowerShell/Lib/BouncyCastle/asn1/DerBoolean.cs
C#
gpl-3.0
2,688
[ 30522, 2478, 2291, 1025, 3415, 15327, 8917, 1012, 8945, 4609, 5666, 23662, 1012, 2004, 2078, 2487, 1063, 2270, 2465, 4315, 5092, 9890, 2319, 1024, 2004, 2078, 2487, 16429, 20614, 1063, 2797, 3191, 2239, 2135, 24880, 3643, 1025, 2270, 10763,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import Ember from "ember"; export default Ember.Object.extend({ targetRoute: null, params: null, isSingleResource: Ember.computed.match( 'targetRoute', /(?:^(?!.*s\b))(?:^(?!index)).*$/ ), hasParams: Ember.computed.bool('params') });
alexanderjeurissen/ember-cli-history-mixin
addon/models/transition.js
JavaScript
mit
254
[ 30522, 12324, 7861, 5677, 2013, 1000, 7861, 5677, 1000, 1025, 9167, 12398, 7861, 5677, 1012, 4874, 1012, 7949, 1006, 1063, 4539, 22494, 2618, 1024, 19701, 1010, 11498, 5244, 1024, 19701, 1010, 26354, 2075, 3917, 2229, 8162, 3401, 1024, 7861...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Evelyna oligantha Poepp. & Endl. SPECIES #### Status SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Elleanthus/Elleanthus oliganthus/ Syn. Evelyna oligantha/README.md
Markdown
apache-2.0
189
[ 30522, 1001, 12903, 2050, 19330, 10762, 8322, 18922, 9397, 1012, 1004, 2203, 2140, 1012, 2427, 1001, 1001, 1001, 1001, 3570, 10675, 1001, 1001, 1001, 1001, 2429, 2000, 1996, 10161, 1997, 2166, 1010, 3822, 2254, 2249, 1001, 1001, 1001, 1001,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*- * Copyright (c) 2014 The FreeBSD Foundation * All rights reserved. * * This software was developed by Semihalf under * the sponsorship of the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ #ifndef _MACHINE_DEBUG_MONITOR_H_ #define _MACHINE_DEBUG_MONITOR_H_ #ifdef DDB #include <machine/db_machdep.h> enum dbg_access_t { HW_BREAKPOINT_X = 0, HW_WATCHPOINT_R = 1, HW_WATCHPOINT_W = 2, HW_WATCHPOINT_RW = HW_WATCHPOINT_R | HW_WATCHPOINT_W, }; #if __ARM_ARCH >= 6 void dbg_monitor_init(void); void dbg_monitor_init_secondary(void); void dbg_show_watchpoint(void); int dbg_setup_watchpoint(db_expr_t, db_expr_t, enum dbg_access_t); int dbg_remove_watchpoint(db_expr_t, db_expr_t); void dbg_resume_dbreg(void); #else /* __ARM_ARCH >= 6 */ static __inline void dbg_show_watchpoint(void) { } static __inline int dbg_setup_watchpoint(db_expr_t addr __unused, db_expr_t size __unused, enum dbg_access_t access __unused) { return (ENXIO); } static __inline int dbg_remove_watchpoint(db_expr_t addr __unused, db_expr_t size __unused) { return (ENXIO); } static __inline void dbg_monitor_init(void) { } static __inline void dbg_monitor_init_secondary(void) { } static __inline void dbg_resume_dbreg(void) { } #endif /* __ARM_ARCH < 6 */ #else /* DDB */ static __inline void dbg_monitor_init(void) { } #endif #endif /* _MACHINE_DEBUG_MONITOR_H_ */
eriknstr/ThinkPad-FreeBSD-setup
FreeBSD/sys/arm/include/debug_monitor.h
C
isc
2,642
[ 30522, 1013, 1008, 1011, 1008, 9385, 1006, 1039, 1007, 2297, 1996, 2489, 5910, 2094, 3192, 1008, 2035, 2916, 9235, 1012, 1008, 1008, 2023, 4007, 2001, 2764, 2011, 4100, 8865, 2546, 2104, 1008, 1996, 12026, 1997, 1996, 2489, 5910, 2094, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* ========================================================================== Shallow Extends Copyright (c) 2014 Alexey Maslennikov ========================================================================== */ 'use strict'; /** * @param {object} JavaScript object. * @returns {boolean} True if object is plain Javascript object. */ function _isPlainObject( object ) { return toString.call( object ) === '[object Object]'; } /** * Copies properties of all sources to the destination object overriding its own * existing properties. When extending from multiple sources, fields of every * next source will override same named fields of previous sources. * * @param {object} destination object. * @returns {bbject} extended destination object. */ function extend( destination ) { destination = destination || {}; for ( var i = 1; i < arguments.length; i++ ) { var source = arguments[i] || {}; for ( var key in source ) { if ( source.hasOwnProperty( key ) ) { var value = source[key]; if ( _isPlainObject( value ) ) { extend( destination[key] = {}, value ); }else { destination[key] = source[key]; } } } } return destination; } // Expose public methods. module.exports = { extend: extend };
imuchnik/cfgov-refresh
src/static/js/modules/util/shallow-extend.js
JavaScript
cc0-1.0
1,290
[ 30522, 1013, 1008, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jsonp({"cep":"26193520","logradouro":"Estrada Santa Teresa","bairro":"Vila Santa Teresa","cidade":"Belford Roxo","uf":"RJ","estado":"Rio de Janeiro"});
lfreneda/cepdb
api/v1/26193520.jsonp.js
JavaScript
cc0-1.0
152
[ 30522, 1046, 3385, 2361, 1006, 1063, 1000, 8292, 2361, 1000, 1024, 1000, 24441, 2683, 19481, 11387, 1000, 1010, 1000, 8833, 12173, 8162, 2080, 1000, 1024, 1000, 26482, 4203, 12409, 1000, 1010, 1000, 21790, 18933, 1000, 1024, 1000, 23840, 42...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php declare(strict_types = 1); namespace Apha\Testing; interface TraceableEventHandler { /** * @return array */ public function getEvents(): array; /** * @return void */ public function clearTraceLog(); }
martyn82/apha
src/main/Apha/Testing/TraceableEventHandler.php
PHP
mit
246
[ 30522, 1026, 1029, 25718, 13520, 1006, 9384, 1035, 4127, 1027, 1015, 1007, 1025, 3415, 15327, 9706, 3270, 1032, 5604, 1025, 8278, 7637, 3085, 18697, 3372, 11774, 3917, 1063, 1013, 1008, 1008, 1008, 1030, 2709, 9140, 1008, 1013, 2270, 3853, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# # Copyright 2014 Jules Cléro # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # This file should contain every project which should be built for host and target add_subdirectory(libDroneVideo) add_subdirectory(libDroneMovement) add_subdirectory(libLineFollowing) add_subdirectory(core)
clero/ar-ghost
cmake/multiplatform_projects.cmake
CMake
apache-2.0
789
[ 30522, 1001, 1001, 9385, 2297, 11044, 18856, 10624, 1001, 1001, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1001, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, 2007, 1996, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2012-2013 Institut National des Sciences Appliquées de Lyon (INSA-Lyon) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package fr.insalyon.citi.golo.cli; import com.beust.jcommander.*; import fr.insalyon.citi.golo.compiler.GoloClassLoader; import fr.insalyon.citi.golo.compiler.GoloCompilationException; import fr.insalyon.citi.golo.compiler.GoloCompiler; import fr.insalyon.citi.golo.compiler.ir.GoloModule; import fr.insalyon.citi.golo.compiler.ir.IrTreeDumper; import fr.insalyon.citi.golo.compiler.parser.ASTCompilationUnit; import fr.insalyon.citi.golo.compiler.parser.GoloParser; import fr.insalyon.citi.golo.compiler.parser.ASTCompilationUnit; import fr.insalyon.citi.golo.compiler.parser.GoloParser; import fr.insalyon.citi.golo.compiler.parser.ParseException; import fr.insalyon.citi.golo.doc.AbstractProcessor; import fr.insalyon.citi.golo.doc.HtmlProcessor; import fr.insalyon.citi.golo.doc.MarkdownProcessor; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.lang.invoke.MethodHandle; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.nio.file.Path; import java.nio.file.Paths; import java.util.LinkedList; import java.util.List; import static java.lang.invoke.MethodHandles.publicLookup; import static java.lang.invoke.MethodType.genericMethodType; import static java.lang.invoke.MethodType.methodType; public class Main { static class GlobalArguments { @Parameter(names = {"--help"}, description = "Prints this message", help = true) boolean help; } @Parameters(commandDescription = "Queries the Golo version") static class VersionCommand { @Parameter(names = "--full", description = "Prints the full information details") boolean full = false; } @Parameters(commandDescription = "Compiles Golo source files") static class CompilerCommand { @Parameter(names = "--output", description = "The compiled classes output directory") String output = "."; @Parameter(description = "Golo source files (*.golo)") List<String> sources = new LinkedList<>(); } @Parameters(commandDescription = "Runs compiled Golo code") static class RunCommand { @Parameter(names = "--module", description = "The Golo module with a main function", required = true) String module; @Parameter(description = "Program arguments") List<String> arguments = new LinkedList<>(); @Parameter(names = "--classpath", variableArity = true, description = "Classpath elements (.jar and directories)") List<String> classpath = new LinkedList<>(); } @Parameters(commandDescription = "Dynamically loads and runs from Golo source files") static class GoloGoloCommand { @Parameter(names = "--files", variableArity = true, description = "Golo source files (the last one has a main function)", required = true) List<String> files = new LinkedList<>(); @Parameter(names = "--args", variableArity = true, description = "Program arguments") List<String> arguments = new LinkedList<>(); @Parameter(names = "--classpath", variableArity = true, description = "Classpath elements (.jar and directories)") List<String> classpath = new LinkedList<>(); } @Parameters(commandDescription = "Diagnosis for the Golo compiler internals") static class DiagnoseCommand { @Parameter(names = "--tool", description = "The diagnosis tool to use: {ast, ir}", validateWith = DiagnoseModeValidator.class) String mode = "ir"; @Parameter(description = "Golo source files (*.golo)") List<String> files = new LinkedList<>(); } public static class DiagnoseModeValidator implements IParameterValidator { @Override public void validate(String name, String value) throws ParameterException { switch (value) { case "ast": case "ir": return; default: throw new ParameterException("Diagnosis tool must be in: {ast, ir}"); } } } @Parameters(commandDescription = "Generate documentation from Golo source files") private static class DocCommand { @Parameter(names = "--format", description = "Documentation output format (html, markdown)", validateWith = DocFormatValidator.class) String format = "html"; @Parameter(names = "--output", description = "The documentation output directory") String output = "."; @Parameter(description = "Golo source files (*.golo)") List<String> sources = new LinkedList<>(); } public static class DocFormatValidator implements IParameterValidator { @Override public void validate(String name, String value) throws ParameterException { switch (value) { case "html": case "markdown": return; default: throw new ParameterException("Output format must be in: {html, markdown}"); } } } public static void main(String... args) throws Throwable { GlobalArguments global = new GlobalArguments(); JCommander cmd = new JCommander(global); cmd.setProgramName("golo"); VersionCommand version = new VersionCommand(); cmd.addCommand("version", version); CompilerCommand goloc = new CompilerCommand(); cmd.addCommand("compile", goloc); RunCommand golo = new RunCommand(); cmd.addCommand("run", golo); GoloGoloCommand gologolo = new GoloGoloCommand(); cmd.addCommand("golo", gologolo); DiagnoseCommand diagnose = new DiagnoseCommand(); cmd.addCommand("diagnose", diagnose); DocCommand doc = new DocCommand(); cmd.addCommand("doc", doc); try { cmd.parse(args); if (global.help || cmd.getParsedCommand() == null) { cmd.usage(); } else { switch (cmd.getParsedCommand()) { case "version": version(version); break; case "compile": compile(goloc); break; case "run": run(golo); break; case "golo": golo(gologolo); break; case "diagnose": diagnose(diagnose); break; case "doc": doc(doc); break; default: throw new AssertionError("WTF?"); } } } catch (ParameterException exception) { System.err.println(exception.getMessage()); System.out.println(); cmd.usage(); } } private static void diagnose(DiagnoseCommand diagnose) { try { switch (diagnose.mode) { case "ast": dumpASTs(diagnose.files); break; case "ir": dumpIRs(diagnose.files); break; default: throw new AssertionError("WTF?"); } } catch (FileNotFoundException e) { System.err.println(e.getMessage()); } catch (GoloCompilationException e) { handleCompilationException(e); } } private static void dumpASTs(List<String> files) throws FileNotFoundException { GoloCompiler compiler = new GoloCompiler(); for (String file : files) { System.out.println(">>> AST for: " + file); ASTCompilationUnit ast = compiler.parse(file, new GoloParser(new FileInputStream(file))); ast.dump("% "); System.out.println(); } } private static void dumpIRs(List<String> files) throws FileNotFoundException { GoloCompiler compiler = new GoloCompiler(); IrTreeDumper dumper = new IrTreeDumper(); for (String file : files) { System.out.println(">>> IR for: " + file); ASTCompilationUnit ast = compiler.parse(file, new GoloParser(new FileInputStream(file))); GoloModule module = compiler.check(ast); dumper.visitModule(module); System.out.println(); } } static void handleCompilationException(GoloCompilationException e) { if (e.getMessage() != null) { System.out.println("[error] " + e.getMessage()); } if (e.getCause() != null) { System.out.println("[error] " + e.getCause().getMessage()); } for (GoloCompilationException.Problem problem : e.getProblems()) { System.out.println("[error] " + problem.getDescription()); } System.exit(1); } private static void version(VersionCommand options) { if (options.full) { System.out.println(Metadata.VERSION + " (build " + Metadata.TIMESTAMP + ")"); } else { System.out.println(Metadata.VERSION); } } private static void compile(CompilerCommand options) { GoloCompiler compiler = new GoloCompiler(); File outputDir = new File(options.output); for (String source : options.sources) { File file = new File(source); try (FileInputStream in = new FileInputStream(file)) { compiler.compileTo(file.getName(), in, outputDir); } catch (IOException e) { System.out.println("[error] " + source + " does not exist or could not be opened."); return; } catch (GoloCompilationException e) { handleCompilationException(e); } } } private static void callRun(Class<?> klass, String[] arguments) throws Throwable { MethodHandle main = publicLookup().findStatic(klass, "main", methodType(void.class, String[].class)); main.invoke(arguments); } private static void run(RunCommand golo) throws Throwable { try { URLClassLoader primaryClassLoader = primaryClassLoader(golo.classpath); Thread.currentThread().setContextClassLoader(primaryClassLoader); Class<?> module = Class.forName(golo.module, true, primaryClassLoader); callRun(module, golo.arguments.toArray(new String[golo.arguments.size()])); } catch (ClassNotFoundException e) { System.out.println("The module " + golo.module + " could not be loaded."); } catch (NoSuchMethodException e) { System.out.println("The module " + golo.module + " does not have a main method with an argument."); } } private static URLClassLoader primaryClassLoader(List<String> classpath) throws MalformedURLException { URL[] urls = new URL[classpath.size()]; int index = 0; for (String element : classpath) { urls[index] = new File(element).toURI().toURL(); index = index + 1; } return new URLClassLoader(urls); } private static void golo(GoloGoloCommand gologolo) throws Throwable { URLClassLoader primaryClassLoader = primaryClassLoader(gologolo.classpath); Thread.currentThread().setContextClassLoader(primaryClassLoader); GoloClassLoader loader = new GoloClassLoader(primaryClassLoader); Class<?> lastClass = null; for (String goloFile : gologolo.files) { File file = new File(goloFile); if (!file.exists()) { System.out.println("Error: " + file + " does not exist."); return; } if (!file.isFile()) { System.out.println("Error: " + file + " is not a file."); return; } try (FileInputStream in = new FileInputStream(file)) { lastClass = loader.load(file.getName(), in); } catch (GoloCompilationException e) { handleCompilationException(e); } } callRun(lastClass, gologolo.arguments.toArray(new String[gologolo.arguments.size()])); } private static void doc(DocCommand options) { AbstractProcessor processor; switch (options.format) { case "markdown": processor = new MarkdownProcessor(); break; case "html": processor = new HtmlProcessor(); break; default: throw new AssertionError("WTF?"); } LinkedList<ASTCompilationUnit> units = new LinkedList<>(); for (String source : options.sources) { try (FileInputStream in = new FileInputStream(source)) { units.add(new GoloParser(in).CompilationUnit()); } catch (IOException e) { System.out.println("[error] " + source + " does not exist or could not be opened."); } catch (ParseException e) { System.out.println("[error] " + source + " has syntax errors: " + e.getMessage()); } } try { processor.process(units, Paths.get(options.output)); } catch (Throwable throwable) { System.out.println("[error] " + throwable.getMessage()); } } }
jeffmaury/golo-lang
src/main/java/fr/insalyon/citi/golo/cli/Main.java
Java
apache-2.0
12,772
[ 30522, 1013, 1008, 1008, 9385, 2262, 1011, 2286, 17126, 2120, 4078, 4163, 10439, 3669, 4226, 2229, 2139, 10241, 1006, 16021, 2050, 1011, 10241, 1007, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package java.lang; import org.checkerframework.dataflow.qual.Pure; import org.checkerframework.dataflow.qual.SideEffectFree; import org.checkerframework.checker.lock.qual.*; import org.checkerframework.checker.initialization.qual.*; public class Object { public Object() { throw new RuntimeException("skeleton method"); } public boolean equals(@GuardSatisfied Object this,@GuardSatisfied Object a1) { throw new RuntimeException("skeleton method"); } public String toString(@GuardSatisfied Object this) { throw new RuntimeException("skeleton method"); } public final void wait(Object this, long a1, int a2) throws InterruptedException { throw new RuntimeException("skeleton method"); } public final void wait(Object this) throws InterruptedException { throw new RuntimeException("skeleton method"); } private static native void registerNatives(); public final native Class<? extends Object> getClass(@GuardSatisfied Object this); public native int hashCode(@GuardSatisfied Object this); protected native Object clone(@GuardSatisfied Object this) throws CloneNotSupportedException; public final native void notify(); public final native void notifyAll(); public final native void wait(long timeout) throws InterruptedException; protected void finalize() throws Throwable { throw new RuntimeException("skeleton method"); } }
Jianchu/checker-framework
checker/jdk/lock/src/java/lang/Object.java
Java
gpl-2.0
1,357
[ 30522, 7427, 9262, 1012, 11374, 1025, 12324, 8917, 1012, 4638, 2121, 15643, 6198, 1012, 2951, 12314, 1012, 24209, 2389, 1012, 5760, 1025, 12324, 8917, 1012, 4638, 2121, 15643, 6198, 1012, 2951, 12314, 1012, 24209, 2389, 1012, 2217, 12879, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#ifndef F_CPU #define F_CPU 1000000UL #endif #define USART_BAUDRATE 4800 #define BAUD_PRESCALE (((F_CPU/(USART_BAUDRATE*16UL)))-1) #include <avr/io.h> #include <avr/interrupt.h> #include <ctype.h> #include <math.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <util/delay.h> enum direction {FORWARD, BACKWARD}; #define ACK 0x7E //*********************** Timer *********************************** void start_timer() { cli(); TIMSK1 = (1 << TOIE1); TCCR1B |= ((0 << CS12) | (1 << CS11) | (0 << CS10)); sei(); } void stop_timer() { cli(); TCCR1B &= ((0 << CS12) | (0 << CS11) | (0 << CS10)); PORTC &= (0 << PC3); // make sure led is off when stopped sei(); } // timer interrupt, if timer is running this will toggle the led when timer counter overflows ISR(TIMER1_OVF_vect) { cli(); PORTC ^= (1 << PC3); sei(); } /* * sends char to serial monitor */ void sendChar(char c) { // Wait until buffer is empty while (!(UCSR0A & (1 << UDRE0))) {} // Return the data from the RX buffer UDR0 = c; } /* * Send message to serial monitor */ void sendMessage(char msg[]) { for (int i = 0; msg[i]; i++) { sendChar(msg[i]); if (msg[i] == '#') { break; } } } //*************************** UART ***************************** void UART_setup() { /*Set baud rate */ UBRR0H = (BAUD_PRESCALE >> 8); UBRR0L = BAUD_PRESCALE; // Enable receiver and transmitter UCSR0B |= (1 << RXEN0) | (1 << TXEN0); // Set frame: 8data, 1 stp UCSR0C |= (1 << UCSZ01) | (1 << UCSZ00); sendMessage(">> Initializing UART ...\n"); } /* * Receives a character from serial monitor */ char receiveChar() { // Wait until data is received while (!(UCSR0A & (1 << RXC0))) {} // Return the data from the RX buffer return UDR0; } /* * Receives a message from serial monitor */ void receiveMessage(char* message) { int index = 0; char c = receiveChar(); while (isdigit(c) || c == ',' || c == '-') { // Characters allowed to be received message[index++] = c; c = receiveChar(); } message[index] = '\0'; } char* itoa2(int i, char b[]){ char const digit[] = "0123456789"; char* p = b; if(i<0){ *p++ = '-'; i *= -1; } int shifter = i; do{ //Move to where representation ends ++p; shifter = shifter/10; }while(shifter); *p = '\0'; do{ //Move back, inserting digits as u go *--p = digit[i%10]; i = i/10; }while(i); return b; } // WARNING: int should be < 1000 void sendInt(int num) { char num_str[4] = {' ', ' ', ' ', '\0'}; itoa2(num, num_str); sendMessage(num_str); sendMessage("\n"); } //************************ Control car *********************************** // initialize pwm for enablers void initialize_pwm() { TCCR0A = (1 << WGM00) | (1 << WGM01) | (1 << COM0A1) | (1 << COM0B1); TCCR0B = (1 << CS00) | (1 << CS02); } void init_wheels() { sendMessage(">> Initializing wheels ...\n"); // Set left wheels as output DDRD |= (1 << PD2); DDRD |= (1 << PD4); // Set right wheels as output DDRC |= (1 << PC2); DDRC |= (1 << PC0); // Set enabler left as output DDRD |= (1 << PD5); // Set enabler right as output DDRD |= (1 << PD6); initialize_pwm(); } void power_left_wheel(enum direction dir, uint8_t duty) { if (duty < 0 || duty > 255) { return; } switch (dir) { case FORWARD: sendMessage("Powering left wheel forward by: "); sendInt(duty); PORTD |= (1 << PD2); PORTD &= ~(1 << PD4); break; case BACKWARD: sendMessage("Powering left wheel backward by: "); sendInt(duty); PORTD |= (1 << PD4); PORTD &= ~(1 << PD2); break; default: PORTD &= ~(1 << PD2); PORTD &= ~(1 << PD4); } OCR0B = duty; } void power_right_wheel(enum direction dir, uint8_t duty) { if (duty < 0 || duty > 255) { return; } switch (dir) { case FORWARD: sendMessage("Powering right wheel forward by: "); sendInt(duty); PORTC |= (1 << PC2); PORTC &= ~(1 << PC0); break; case BACKWARD: sendMessage("Powering right wheel backward by: "); sendInt(duty); PORTC |= (1 << PC0); PORTC &= ~(1 << PC2); break; default: PORTC &= ~(1 << PC2); PORTC &= ~(1 << PC0); } OCR0A = duty; } /* * Set the speed and direction of each wheel. +ive is forward, -ve is backward */ void set_wheels(int left_wheel, int right_wheel){ if (left_wheel < 0) { power_left_wheel(BACKWARD, -left_wheel); } else { power_left_wheel(FORWARD, left_wheel); } if (right_wheel < 0) { power_right_wheel(BACKWARD, -right_wheel); } else { power_right_wheel(FORWARD, right_wheel); } } //**************************** SPI ************************************** // spi functions void spi_init_slave (void) { sendMessage(">> Initializing slave\n"); DDRB=(1 << 6); //MISO as OUTPUT SPCR=(1 << SPE); //Enable SPI } //Function to send and receive data unsigned char spi_tranceiver (unsigned char data) { SPDR = data; //Load data into buffer while(!(SPSR & (1<<SPIF) )); //Wait until transmission complete return(SPDR); //Return received data } void *get_message(char *message) { int index = 0; char c = spi_tranceiver(ACK); while (c != '#') { message[index++] = c; c = spi_tranceiver(ACK); } message[index] = '\0'; } //***************************** Text parsing ***************************** /* * Char to int */ int ctoi(char d) { char str[2]; str[0] = d; str[1] = '\0'; return (int) strtol(str, NULL, 10); } /* * Parses a string of integers */ int parseInt(char* integer_str) { int sign = 1; int length = strlen(integer_str); int i = 0; if (integer_str[0] == '-') { sign = -1; i = 1; } int input_int = 0; if (length >= 3) { input_int = 1; } for (i; i < length; i++) { input_int += ctoi(integer_str[i]) * pow(10, length - 1 - i); } return (input_int*sign); } void parse_message(char *msg, int *nums) { int msg_index = 0; int num_index = 0; int k = 0; char c; char num[5]; do { c = (char) msg[msg_index++]; if (c == ',' || c == '#') { num[num_index] = '\0'; nums[k++] = parseInt(num); num[0] = '\0'; num[1] = '\0', num[2] = '\0'; num_index = 0; } else { num[num_index++] = c; } } while (c != '#'); } int main(void) { UART_setup(); init_wheels(); spi_init_slave(); unsigned char data, msg[16]; while(1) { sendMessage("\nAwaiting message\n"); int index = 0; do { data = spi_tranceiver(ACK); msg[index++] = data; } while (data != '#'); sendMessage("Received message: "); sendMessage(msg); sendChar('\n'); int nums[2] = {0, 0}; parse_message(msg, nums); set_wheels(nums[0], nums[1]); } }
EliHar/mr_robot
atm.c
C
mit
6,832
[ 30522, 1001, 2065, 13629, 2546, 1042, 1035, 17368, 1001, 9375, 1042, 1035, 17368, 6694, 8889, 2692, 5313, 1001, 2203, 10128, 1001, 9375, 3915, 5339, 1035, 8670, 6784, 11657, 17295, 2692, 1001, 9375, 8670, 6784, 1035, 3653, 15782, 2571, 1006...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
//NOT_CREATE_META_DATA #ifndef __SOC_NORMAL_MAPPING_H__ #define __SOC_NORMAL_MAPPING_H__ float3 UnpackNormal(float3 normalMapXYZ, float3 normal, float3 tangent) { float3 binormal = normalize( cross(normal, tangent) ); float3x3 TBN = float3x3(normalize(tangent), normalize(binormal), normalize(normal)); float3 tangentNormal = normalize(normalMapXYZ * 2.0f - 1.0f); return mul(TBN, tangentNormal); } #endif
Jin02/SOCEngine
SOCEngine/SOCEngine/ShaderCodes/NormalMapping.h
C
mit
415
[ 30522, 1013, 1013, 2025, 1035, 3443, 1035, 18804, 1035, 2951, 1001, 2065, 13629, 2546, 1035, 1035, 27084, 1035, 3671, 1035, 12375, 1035, 1044, 1035, 1035, 1001, 9375, 1035, 1035, 27084, 1035, 3671, 1035, 12375, 1035, 1044, 1035, 1035, 14257...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// (C) Copyright 2015 Martin Dougiamas // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import { Component, OnDestroy } from '@angular/core'; import { Platform, NavParams } from 'ionic-angular'; import { TranslateService } from '@ngx-translate/core'; import { CoreEventsProvider } from '@providers/events'; import { CoreSitesProvider } from '@providers/sites'; import { AddonMessagesProvider } from '../../providers/messages'; import { CoreDomUtilsProvider } from '@providers/utils/dom'; import { CoreUtilsProvider } from '@providers/utils/utils'; import { CoreAppProvider } from '@providers/app'; import { AddonPushNotificationsDelegate } from '@addon/pushnotifications/providers/delegate'; /** * Component that displays the list of discussions. */ @Component({ selector: 'addon-messages-discussions', templateUrl: 'addon-messages-discussions.html', }) export class AddonMessagesDiscussionsComponent implements OnDestroy { protected newMessagesObserver: any; protected readChangedObserver: any; protected cronObserver: any; protected appResumeSubscription: any; protected loadingMessages: string; protected siteId: string; loaded = false; loadingMessage: string; discussions: any; discussionUserId: number; pushObserver: any; search = { enabled: false, showResults: false, results: [], loading: '', text: '' }; constructor(private eventsProvider: CoreEventsProvider, sitesProvider: CoreSitesProvider, translate: TranslateService, private messagesProvider: AddonMessagesProvider, private domUtils: CoreDomUtilsProvider, navParams: NavParams, private appProvider: CoreAppProvider, platform: Platform, utils: CoreUtilsProvider, pushNotificationsDelegate: AddonPushNotificationsDelegate) { this.search.loading = translate.instant('core.searching'); this.loadingMessages = translate.instant('core.loading'); this.siteId = sitesProvider.getCurrentSiteId(); // Update discussions when new message is received. this.newMessagesObserver = eventsProvider.on(AddonMessagesProvider.NEW_MESSAGE_EVENT, (data) => { if (data.userId) { const discussion = this.discussions.find((disc) => { return disc.message.user == data.userId; }); if (typeof discussion == 'undefined') { this.loaded = false; this.refreshData().finally(() => { this.loaded = true; }); } else { // An existing discussion has a new message, update the last message. discussion.message.message = data.message; discussion.message.timecreated = data.timecreated; } } }, this.siteId); // Update discussions when a message is read. this.readChangedObserver = eventsProvider.on(AddonMessagesProvider.READ_CHANGED_EVENT, (data) => { if (data.userId) { const discussion = this.discussions.find((disc) => { return disc.message.user == data.userId; }); if (typeof discussion != 'undefined') { // A discussion has been read reset counter. discussion.unread = false; // Discussions changed, invalidate them. this.messagesProvider.invalidateDiscussionsCache(); } } }, this.siteId); // Update discussions when cron read is executed. this.cronObserver = eventsProvider.on(AddonMessagesProvider.READ_CRON_EVENT, (data) => { this.refreshData(); }, this.siteId); // Refresh the view when the app is resumed. this.appResumeSubscription = platform.resume.subscribe(() => { if (!this.loaded) { return; } this.loaded = false; this.refreshData(); }); this.discussionUserId = navParams.get('discussionUserId') || false; // If a message push notification is received, refresh the view. this.pushObserver = pushNotificationsDelegate.on('receive').subscribe((notification) => { // New message received. If it's from current site, refresh the data. if (utils.isFalseOrZero(notification.notif) && notification.site == this.siteId) { this.refreshData(); } }); } /** * Component loaded. */ ngOnInit(): void { if (this.discussionUserId) { // There is a discussion to load, open the discussion in a new state. this.gotoDiscussion(this.discussionUserId); } this.fetchData().then(() => { if (!this.discussionUserId && this.discussions.length > 0) { // Take first and load it. this.gotoDiscussion(this.discussions[0].message.user, undefined, true); } }); } /** * Refresh the data. * * @param {any} [refresher] Refresher. * @return {Promise<any>} Promise resolved when done. */ refreshData(refresher?: any): Promise<any> { return this.messagesProvider.invalidateDiscussionsCache().then(() => { return this.fetchData().finally(() => { if (refresher) { // Actions to take if refresh comes from the user. this.eventsProvider.trigger(AddonMessagesProvider.READ_CHANGED_EVENT, undefined, this.siteId); refresher.complete(); } }); }); } /** * Fetch discussions. * * @return {Promise<any>} Promise resolved when done. */ protected fetchData(): Promise<any> { this.loadingMessage = this.loadingMessages; this.search.enabled = this.messagesProvider.isSearchMessagesEnabled(); return this.messagesProvider.getDiscussions().then((discussions) => { // Convert to an array for sorting. const discussionsSorted = []; for (const userId in discussions) { discussions[userId].unread = !!discussions[userId].unread; discussionsSorted.push(discussions[userId]); } this.discussions = discussionsSorted.sort((a, b) => { return b.message.timecreated - a.message.timecreated; }); }).catch((error) => { this.domUtils.showErrorModalDefault(error, 'addon.messages.errorwhileretrievingdiscussions', true); }).finally(() => { this.loaded = true; }); } /** * Clear search and show discussions again. */ clearSearch(): void { this.loaded = false; this.search.showResults = false; this.search.text = ''; // Reset searched string. this.fetchData().finally(() => { this.loaded = true; }); } /** * Search messages cotaining text. * * @param {string} query Text to search for. * @return {Promise<any>} Resolved when done. */ searchMessage(query: string): Promise<any> { this.appProvider.closeKeyboard(); this.loaded = false; this.loadingMessage = this.search.loading; return this.messagesProvider.searchMessages(query).then((searchResults) => { this.search.showResults = true; this.search.results = searchResults; }).catch((error) => { this.domUtils.showErrorModalDefault(error, 'addon.messages.errorwhileretrievingmessages', true); }).finally(() => { this.loaded = true; }); } /** * Navigate to a particular discussion. * * @param {number} discussionUserId Discussion Id to load. * @param {number} [messageId] Message to scroll after loading the discussion. Used when searching. * @param {boolean} [onlyWithSplitView=false] Only go to Discussion if split view is on. */ gotoDiscussion(discussionUserId: number, messageId?: number, onlyWithSplitView: boolean = false): void { this.discussionUserId = discussionUserId; const params = { discussion: discussionUserId, onlyWithSplitView: onlyWithSplitView }; if (messageId) { params['message'] = messageId; } this.eventsProvider.trigger(AddonMessagesProvider.SPLIT_VIEW_LOAD_EVENT, params, this.siteId); } /** * Component destroyed. */ ngOnDestroy(): void { this.newMessagesObserver && this.newMessagesObserver.off(); this.readChangedObserver && this.readChangedObserver.off(); this.cronObserver && this.cronObserver.off(); this.appResumeSubscription && this.appResumeSubscription.unsubscribe(); this.pushObserver && this.pushObserver.unsubscribe(); } }
jleyva/moodlemobile2
src/addon/messages/components/discussions/discussions.ts
TypeScript
apache-2.0
9,547
[ 30522, 1013, 1013, 1006, 1039, 1007, 9385, 2325, 3235, 8788, 25107, 3022, 1013, 1013, 1013, 1013, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1013, 1013, 2017, 2089, 2025, 2224, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
(function() { 'use strict'; angular .module('gpmrApp') .factory('PasswordResetInit', PasswordResetInit); PasswordResetInit.$inject = ['$resource']; function PasswordResetInit($resource) { var service = $resource('api/account/reset_password/init', {}, {}); return service; } })();
chrislovecnm/gpmr
pet-race-ui/src/main/webapp/app/services/auth/password-reset-init.service.js
JavaScript
apache-2.0
336
[ 30522, 1006, 3853, 1006, 1007, 1063, 1005, 2224, 9384, 1005, 1025, 16108, 1012, 11336, 1006, 1005, 14246, 2213, 2527, 9397, 1005, 1007, 1012, 4713, 1006, 1005, 20786, 6072, 20624, 3490, 2102, 1005, 1010, 20786, 6072, 20624, 3490, 2102, 1007...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/******************************************************************************* * Copyright (c) 2014 Open Door Logistics (www.opendoorlogistics.com) * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License v3 * which accompanies this distribution, and is available at http://www.gnu.org/licenses/lgpl.txt ******************************************************************************/ package com.opendoorlogistics.core.scripts.execution.dependencyinjection; import java.awt.Dimension; import javax.swing.JPanel; import com.opendoorlogistics.api.HasApi; import com.opendoorlogistics.api.components.ComponentControlLauncherApi.ControlLauncherCallback; import com.opendoorlogistics.api.components.ComponentExecutionApi.ClosedStatusObservable; import com.opendoorlogistics.api.components.ComponentExecutionApi.ModalDialogResult; import com.opendoorlogistics.api.components.ODLComponent; import com.opendoorlogistics.api.components.ProcessingApi; import com.opendoorlogistics.api.distances.DistancesConfiguration; import com.opendoorlogistics.api.distances.ODLCostMatrix; import com.opendoorlogistics.api.geometry.LatLong; import com.opendoorlogistics.api.geometry.ODLGeom; import com.opendoorlogistics.api.tables.ODLDatastore; import com.opendoorlogistics.api.tables.ODLTable; import com.opendoorlogistics.api.tables.ODLTableReadOnly; import com.opendoorlogistics.core.tables.decorators.datastores.dependencies.DataDependencies; public interface DependencyInjector extends ProcessingApi, HasApi { String getBatchKey(); ModalDialogResult showModalPanel(JPanel panel,String title, ModalDialogResult ...buttons); ModalDialogResult showModalPanel(JPanel panel,String title,Dimension minSize, ModalDialogResult ...buttons); <T extends JPanel & ClosedStatusObservable> void showModalPanel(T panel, String title); ODLCostMatrix calculateDistances(DistancesConfiguration request, ODLTableReadOnly... tables); ODLGeom calculateRouteGeom(DistancesConfiguration request, LatLong from, LatLong to); void addInstructionDependencies(String instructionId, DataDependencies dependencies); void submitControlLauncher(String instructionId,ODLComponent component,ODLDatastore<? extends ODLTable> parametersTableCopy, String reportTopLabel,ControlLauncherCallback cb); }
PGWelch/com.opendoorlogistics
com.opendoorlogistics.core/src/com/opendoorlogistics/core/scripts/execution/dependencyinjection/DependencyInjector.java
Java
lgpl-3.0
2,349
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: post-index title: Todas as Postagens excerpt: "Uma lista de posts" ---
msmagnanijr/msmagnanijr.github.io
posts/index.md
Markdown
mit
83
[ 30522, 1011, 1011, 1011, 9621, 1024, 2695, 1011, 5950, 2516, 1024, 28681, 3022, 2004, 22981, 3619, 28142, 1024, 1000, 8529, 2050, 2862, 2050, 2139, 8466, 1000, 1011, 1011, 1011, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.github.mikephil.charting.data.realm.implementation; import com.github.mikephil.charting.data.RadarData; import com.github.mikephil.charting.data.realm.base.RealmUtils; import com.github.mikephil.charting.interfaces.datasets.IRadarDataSet; import java.util.List; import io.realm.RealmObject; import io.realm.RealmResults; /** * Created by Philipp Jahoda on 19/12/15. */ public class RealmRadarData extends RadarData{ public RealmRadarData(RealmResults<? extends RealmObject> result, String xValuesField, List<IRadarDataSet> dataSets) { super(RealmUtils.toXVals(result, xValuesField), dataSets); } }
BD-ITAC/BD-ITAC
mobile/Alertas/MPChartLib/src/main/java/com/github/mikephil/charting/data/realm/implementation/RealmRadarData.java
Java
mit
633
[ 30522, 7427, 4012, 1012, 21025, 2705, 12083, 1012, 3505, 21850, 2140, 1012, 17918, 1012, 2951, 1012, 8391, 1012, 7375, 1025, 12324, 4012, 1012, 21025, 2705, 12083, 1012, 3505, 21850, 2140, 1012, 17918, 1012, 2951, 1012, 7217, 2850, 2696, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<html lang="en"> <head> <title>IP2K-Opts - Using as</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Using as"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="IP2K_002dDependent.html#IP2K_002dDependent" title="IP2K-Dependent"> <link rel="next" href="IP2K_002dSyntax.html#IP2K_002dSyntax" title="IP2K-Syntax"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This file documents the GNU Assembler "as". Copyright (C) 1991-2014 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="IP2K-Opts"></a> <a name="IP2K_002dOpts"></a> <p> Next:&nbsp;<a rel="next" accesskey="n" href="IP2K_002dSyntax.html#IP2K_002dSyntax">IP2K-Syntax</a>, Up:&nbsp;<a rel="up" accesskey="u" href="IP2K_002dDependent.html#IP2K_002dDependent">IP2K-Dependent</a> <hr> </div> <h4 class="subsection">9.19.1 IP2K Options</h4> <p><a name="index-options_002c-IP2K-1148"></a><a name="index-IP2K-options-1149"></a> The Ubicom IP2K version of <code>as</code> has a few machine dependent options: <dl> <dt><code>-mip2022ext</code><dd><a name="index-g_t_0040samp_007b_002dmip2022ext_007d-option_002c-IP2022-1150"></a><a name="index-architecture-options_002c-IP2022-1151"></a><a name="index-IP2K-architecture-options-1152"></a><code>as</code> can assemble the extended IP2022 instructions, but it will only do so if this is specifically allowed via this command line option. <br><dt><code>-mip2022</code><dd><a name="index-g_t_0040samp_007b_002dmip2022_007d-option_002c-IP2K-1153"></a><a name="index-architecture-options_002c-IP2K-1154"></a><a name="index-IP2K-architecture-options-1155"></a>This option restores the assembler's default behaviour of not permitting the extended IP2022 instructions to be assembled. </dl> </body></html>
ExploreEmbedded/Tit-Windows
tools/doc/binutils/as.html/IP2K_002dOpts.html
HTML
bsd-3-clause
2,844
[ 30522, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 2516, 1028, 12997, 2475, 2243, 1011, 23569, 2015, 1011, 2478, 2004, 1026, 1013, 2516, 1028, 1026, 18804, 8299, 1011, 1041, 15549, 2615, 1027, 1000, 4180, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# test construction of bytearray from different objects try: from uarray import array except ImportError: try: from array import array except ImportError: print("SKIP") raise SystemExit # arrays print(bytearray(array('b', [1, 2]))) print(bytearray(array('h', [0x101, 0x202])))
kerneltask/micropython
tests/basics/bytearray_construct_array.py
Python
mit
314
[ 30522, 1001, 3231, 2810, 1997, 24880, 2906, 9447, 2013, 2367, 5200, 3046, 1024, 2013, 25423, 11335, 2100, 12324, 9140, 3272, 12324, 2121, 29165, 1024, 3046, 1024, 2013, 9140, 12324, 9140, 3272, 12324, 2121, 29165, 1024, 6140, 1006, 1000, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using UnityEngine; using System.Collections; using UnityEngine.Networking; public class PickupSpawner : NetworkBehaviour { public GameObject pistol; public GameObject shotgun; public GameObject cannon; private GameObject pickup; private bool[] canSpawn; private float[] spawnTimes; public float waitBetweenSpawns = 20; // Use this for initialization void Start () { spawnTimes = new float[this.transform.childCount]; canSpawn = new bool[this.transform.childCount]; for (int i = 0; i < this.transform.childCount; i++) { spawnTimes[i] = Time.time - waitBetweenSpawns; canSpawn[i] = true; } } // Update is called once per frame void Update () { for (int i = 0; i < this.transform.childCount; i++) { if (canSpawn[i] == false && this.transform.GetChild(i).transform.childCount == 0) { canSpawn[i] = true; spawnTimes[i] = Time.time + waitBetweenSpawns; } if (spawnTimes[i] < Time.time && canSpawn[i]) { CmdSpawnPickup(i); canSpawn[i] = false; } } } [Command] void CmdSpawnPickup(int i) { int rand = Random.Range(1, 100); //if (rand < 35) //{ // pickup = (GameObject)Instantiate(pistol, this.transform.GetChild(i).transform.position, Quaternion.identity); //} if (rand < 70) { pickup = (GameObject)Instantiate(shotgun, this.transform.GetChild(i).transform.position, Quaternion.identity); } else if (rand <= 100) { pickup = (GameObject)Instantiate(cannon, this.transform.GetChild(i).transform.position, Quaternion.identity); } pickup.transform.parent = this.transform.GetChild(i).transform; pickup.transform.position = pickup.transform.parent.position; NetworkServer.Spawn(pickup); } }
szucs2020/SpaceGame
Assets/Scripts/Pickups/PickupSpawner.cs
C#
mit
1,993
[ 30522, 2478, 8499, 13159, 3170, 1025, 2478, 2291, 1012, 6407, 1025, 2478, 8499, 13159, 3170, 1012, 14048, 1025, 2270, 2465, 15373, 13102, 10376, 3678, 1024, 2897, 4783, 3270, 25500, 3126, 1063, 2270, 2208, 16429, 20614, 8779, 1025, 2270, 22...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package ca.uhn.hapi.fhir.docs; /*- * #%L * HAPI FHIR - Docs * %% * Copyright (C) 2014 - 2022 Smile CDR, Inc. * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import ca.uhn.fhir.context.FhirVersionEnum; import ca.uhn.fhir.to.FhirTesterMvcConfig; import ca.uhn.fhir.to.TesterConfig; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; // START SNIPPET: file /** * This spring config file configures the web testing module. It serves two * purposes: * 1. It imports FhirTesterMvcConfig, which is the spring config for the * tester itself * 2. It tells the tester which server(s) to talk to, via the testerConfig() * method below */ @Configuration @Import(FhirTesterMvcConfig.class) public class FhirTesterConfig { /** * This bean tells the testing webpage which servers it should configure itself * to communicate with. In this example we configure it to talk to the local * server, as well as one public server. If you are creating a project to * deploy somewhere else, you might choose to only put your own server's * address here. * * Note the use of the ${serverBase} variable below. This will be replaced with * the base URL as reported by the server itself. Often for a simple Tomcat * (or other container) installation, this will end up being something * like "http://localhost:8080/hapi-fhir-jpaserver-example". If you are * deploying your server to a place with a fully qualified domain name, * you might want to use that instead of using the variable. */ @Bean public TesterConfig testerConfig() { TesterConfig retVal = new TesterConfig(); retVal .addServer() .withId("home") .withFhirVersion(FhirVersionEnum.DSTU2) .withBaseUrl("${serverBase}/fhir") .withName("Local Tester") .addServer() .withId("hapi") .withFhirVersion(FhirVersionEnum.DSTU2) .withBaseUrl("http://fhirtest.uhn.ca/baseDstu2") .withName("Public HAPI Test Server"); /* * Use the method below to supply a client "factory" which can be used * if your server requires authentication */ // retVal.setClientFactory(clientFactory); return retVal; } } // END SNIPPET: file
aemay2/hapi-fhir
hapi-fhir-docs/src/main/java/ca/uhn/hapi/fhir/docs/FhirTesterConfig.java
Java
apache-2.0
2,800
[ 30522, 7427, 6187, 1012, 7910, 2078, 1012, 5292, 8197, 1012, 1042, 11961, 1012, 9986, 2015, 1025, 1013, 1008, 1011, 1008, 1001, 1003, 1048, 1008, 5292, 8197, 1042, 11961, 1011, 9986, 2015, 1008, 1003, 1003, 1008, 9385, 1006, 1039, 1007, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* This file is part of SUPPL - the supplemental library for DOS Copyright (C) 1996-2000 Steffen Kaiser This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $RCSfile: eestrcon.c,v $ $Locker: $ $Name: $ $State: Exp $ char *EStrConcat(int argcnt, ...) Concats up to argcnt strings together and malloc() a buffer that will receive the result. If one of the string == NULL, this string is ignored. On failure, the program is terminated with the "out of memory" error. Return: the malloc'ed buffer ob(ject): EStrConcat su(bsystem): error ty(pe): H sh(ort description): Concat several strings together lo(ng description): Concats several strings together, by using the \tok{StrConcat()} function, and terminates the program on failure with the error message: "Out of memory" pr(erequistes): re(lated to): StrConcat se(condary subsystems): dynstr in(itialized by): wa(rning): bu(gs): va(lue): constructed dynamic string fi(le): eestrcon.c */ #include "initsupl.loc" #ifndef _MICROC_ #include <string.h> #include <stdarg.h> #include <stdlib.h> #endif #include "dynstr.h" #include "msgs.h" #include "suppldbg.h" #ifdef RCS_Version static char const rcsid[] = "$Id: eestrcon.c,v 1.1 2006/06/17 03:25:02 blairdude Exp $"; #endif #ifdef _MICROC_ register char *EStrConcat(int argcnt) { unsigned cnt, *poi; unsigned Xcnt, *Xpoi; unsigned length; char *h, *p; DBG_ENTER1 cnt = nargs(); DBG_ENTER2("EStrConcat", "error") DBG_ARGUMENTS( ("argcnt=%u cnt=%u", argcnt, cnt) ) Xpoi = poi = cnt * 2 - 2 + &argcnt; Xcnt = cnt = min(cnt, *poi); for(length = 1; cnt--;) if(*--poi) length += strlen(*poi); chkHeap if((h = p = malloc(length)) == 0) Esuppl_noMem(); chkHeap while(Xcnt--) if(*--Xpoi) p = stpcpy(p, *Xpoi); chkHeap DBG_RETURN_S( h) } #else /* !_MICROC_ */ char *EStrConcat(int argcnt, ...) { va_list strings; char *p, *s; size_t length, l; DBG_ENTER("EStrConcat", Suppl_error) DBG_ARGUMENTS( ("argcnt=%u cnt=%u", argcnt, argcnt) ) va_start(strings, argcnt); chkHeap p = Estrdup(""); chkHeap length = 1; while(argcnt--) { s = va_arg(strings, char *); if(s && *s) { l = length - 1; Eresize(p, length += strlen(s)); strcpy(p + l, s); } } va_end(strings); chkHeap DBG_RETURN_S( p) } #endif /* _MICROC_ */
joyent/sdcboot
freedos/source/command/suppl/src/eestrcon.c
C
mpl-2.0
2,977
[ 30522, 1013, 1008, 2023, 5371, 2003, 2112, 1997, 10514, 9397, 2140, 1011, 1996, 27024, 3075, 2005, 9998, 9385, 1006, 1039, 1007, 2727, 1011, 2456, 26261, 18032, 15676, 2023, 3075, 2003, 2489, 4007, 1025, 2017, 2064, 2417, 2923, 3089, 8569, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*body > section > section > section > div > section > div > div.row > div > div*/ fieldset.contact { position: relative; left: 6%; } .input { position: relative; z-index: 1; display: inline-block; margin: 1em; max-width: 350px; width: calc(100% - 2em); vertical-align: top; } .input .title { width: 85%; } .input .title, .input.input-secondary.title { max-width: 100%; width: 92%; } .input.input-secondary.title.input-filled { left: 5%; } .input_field { position: relative; display: block; float: right; padding: 0.8em; width: 60%; border: none; border-radius: 0; background: #f0f0f0; color: #aaa; font-weight: bold; -webkit-appearance: none; /* for box shadows to show on iOS */ } .input_field:focus { outline: none; } .submit-project { left: 13%; position: relative; } .input_label { display: inline-block; float: right; padding: 0 1em; width: 40%; color: #6a7989; font-weight: bold; font-size: 70.25%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .input_label-content { position: relative; display: block; padding: 1.6em 0; width: 100%; } .graphic { position: absolute; top: 0; left: 0; fill: none; } .icon { color: #ddd; font-size: 150%; } .input-secondary { margin: 0.75rem 0 0 1.4rem; } .input_field-secondary { width: 100%; background: transparent; padding: 1.3rem 0 0 0; margin-bottom: 2em; color: #006400; font-size: 1.5em; } textarea.input_field-secondary { left: 2%; height: 50px; background: transparent; padding: 0.3em 0 0 0.3rem; margin-bottom: 2em; border: #023A31 solid 3px; } textarea.input_field-secondary::before { content: 'Talk to us!'; position: absolute; } textarea.input_field-secondary::after { width: 100%; height: 7px; content: 'Talk to us!'; position: absolute; left: 0; top: 100%; } textarea.input_field-secondary:active { } .contact-form textarea { width: 96%; height: 120px; padding: 1.5%; background-color: transparent; margin: 1% 0 0 1.4rem; border: 0.1rem solid #023A31; border-bottom: 1rem solid #023A31; color: darkgreen; font-size: 1.75rem; font-weight: 600; /*line-height: ;*/ -webkit-transition: -webkit-transform 0.3s, all 1s; transition: transform 0.3s, all 1s; } .contact-form textarea.ng-valid.ng-dirty:active, .contact-form textarea.ng-valid.ng-dirty:focus { border-top: #78FA89; border-right: #78FA89; border-left: #78FA89; border-bottom: 0.25rem solid #023A31; } .contact-form textarea:focus, .contact-form textarea:active { border-bottom: none; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transition: -webkit-transform 0.3s, all 1s; transition: transform 0.3s, all 1s; } .input_label-secondary { width: 100%; position: absolute; text-align: left; font-size: 1em; padding: 10px 0 5px; pointer-events: none; } .input_label-secondary::after { content: ''; position: absolute; width: 100%; height: 7px; background: #023A31; left: 0; top: 100%; -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; -webkit-transition: -webkit-transform 0.3s, background-color 0.3s; transition: transform 0.3s, background-color 0.3s; } .input_label-content-secondary { padding: 0; -webkit-transform-origin: 0 0; transform-origin: 0 0; -webkit-transition: -webkit-transform 0.3s, color 0.3s; transition: transform 0.3s, color 0.3s; } .input_field-secondary:focus + .input_label-secondary::after, .input-filled .input_label-secondary::after { background: #006400; -webkit-transform: scale3d(1.25, 0.25, 1); transform: scale3d(1.25, 0.25, 1); } .input_field-secondary:focus + .input_label-secondary .input_label-content-secondary, .input-filled .input_label-secondary .input_label-content-secondary { color: #006400; -webkit-transform: translateY(3.0em) scale3d(0.955, 0.955, 1.5); transform: translateY(3.0em) scale3d(0.955, 0.955, 1.5); } span.input.input-secondary .title { max-width: 100%; } .input_label.input_label-secondary .title { /*left: 10%;*/ } .grow.btn-contact { position: relative; left: 2%; margin-top: 3%; } .grow.btn-contact:hover { background: rgba(240, 240, 240, 0.8); border-color: #023a31; color: #023a31; -webkit-transition: -webkit-transform 0.3s, all 0.5s; transition: transform 0.3s, all 0.5s; } .tab-pane { padding: 4%; }
mapping-slc/mapping-slc
modules/contacts/client/css/form-fields.css
CSS
mit
4,847
[ 30522, 1013, 1008, 2303, 1028, 2930, 1028, 2930, 1028, 2930, 1028, 4487, 2615, 1028, 2930, 1028, 4487, 2615, 1028, 4487, 2615, 1012, 5216, 1028, 4487, 2615, 1028, 4487, 2615, 1008, 1013, 4249, 3388, 1012, 3967, 1063, 2597, 1024, 5816, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (C) 2012 Samsung Electronics. * huangshr<huangshr@allwinnertech.com> * * This program is free software,you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/kernel.h> #include <linux/io.h> #include <linux/init.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/mm.h> #include <linux/slab.h> #include <asm/firmware.h> #include <linux/secure/te_protocol.h> #include <mach/hardware.h> #include <mach/sunxi-smc.h> #include <linux/spinlock_types.h> #include "./pm/mem_hwspinlock.h" DEFINE_SPINLOCK(smc_lock); uint32_t sunxi_do_smc(uint32_t arg0, uint32_t arg1, uint32_t arg2, uint32_t arg3) { struct smc_param param; spin_lock(&smc_lock); param.a0 = arg0; param.a1 = arg1; param.a2 = arg2; param.a3 = arg3; sunxi_smc_call(&param); spin_unlock(&smc_lock); return param.a0; } static u32 sunxi_sec_read_reg(void __iomem *reg) { u32 value; u32 phys_addr; phys_addr = (u32)reg > (u32)IO_ADDRESS(0) ? ((u32)reg - (u32)IO_ADDRESS(0)) : (u32)reg; value = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_READ_REG,phys_addr, 0); return value; } static u32 sunxi_sec_write_reg(u32 value, void __iomem *reg) { u32 ret; u32 phys_addr; phys_addr = (u32)reg > (u32)IO_ADDRESS(0) ? ((u32)reg - (u32)IO_ADDRESS(0)) : (u32)reg; ret = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_WRITE_REG, phys_addr, value); return ret; } static u32 sunxi_sec_send_command(u32 arg0, u32 arg1, u32 arg2, u32 arg3) { u32 ret; ret = sunxi_do_smc(arg0, arg1, arg2, arg3); return ret; } static u32 sunxi_load_arisc(void *image, u32 image_size, void *para, u32 para_size, u32 para_offset) { u32 ret; struct tee_load_arisc_param *param; if ((image == NULL) || (image_size == 0) || (para == NULL) || (para_size == 0)) { return -EINVAL; } /* allocte param buffer */ param = kzalloc(sizeof(struct tee_load_arisc_param), GFP_KERNEL); if (param == NULL) { pr_err("%s: allocate param buffer failed\n", __func__); return -ENOMEM; } /* initialize params */ if ((u32)image > (u32)IO_ADDRESS(0)) { /* sram memory */ param->image_phys = (u32)image - (u32)IO_ADDRESS(0); } else { /* dram memory */ param->image_phys = (u32)virt_to_phys(image); } param->image_size = image_size; if ((u32)para > (u32)IO_ADDRESS(0)) { /* sram memory */ param->para_phys = (u32)para - (u32)IO_ADDRESS(0); } else { /* dram memory */ param->para_phys = (u32)virt_to_phys(para); } param->para_size = para_size; param->para_offset = para_offset; /* do smc call */ ret = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_LOAD_ARISC, (u32)virt_to_phys(param), 0); kfree(param); return ret; } static u32 sunxi_sec_set_secondary_entry(void *entry) { u32 ret; ret = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_SET_SMP_BOOTENTRY, (u32)entry, 0); return ret; } static u32 sunxi_sec_suspend(void) { u32 ret; ret = sunxi_do_smc(TEE_SMC_PM_SUSPEND, 0, 0, 0); return ret; } /* * note: the function main to get monitor vector to save for resume */ static u32 sunxi_sec_suspend_prepare(void) { u32 ret; ret = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_SUSPEND_PAREPER, 0, 0); return ret; } /* brief * arg0: command type as TEE_SMC_PLAFORM_OPERATION * arg1: set standby status mode.(clear or get or set) * arg2: standby reg physical address. * arg3: value to set when set. */ static u32 sunxi_sec_set_standby_status(u32 command_type, u32 setting_type, u32 addr, u32 val) { u32 ret_val = 0; u32 phys_addr; phys_addr = (u32)addr > (u32)IO_ADDRESS(0) ? ((u32)addr - (u32)IO_ADDRESS(0)) : (u32)addr; switch(setting_type){ case TE_SMC_STANDBY_STATUS_CLEAR: ret_val = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_READ_REG, phys_addr, 0); #ifndef CONFIG_ARCH_SUN8IW7P1 if (!hwspin_lock_timeout(MEM_RTC_REG_HWSPINLOCK, 20000)) { #endif ret_val = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_STANDBY_STATUS_CLEAR, phys_addr, ret_val); #ifndef CONFIG_ARCH_SUN8IW7P1 hwspin_unlock(MEM_RTC_REG_HWSPINLOCK); } #endif break; case TE_SMC_STANDBY_STATUS_SET: #ifndef CONFIG_ARCH_SUN8IW7P1 if (!hwspin_lock_timeout(MEM_RTC_REG_HWSPINLOCK, 20000)) { #endif ret_val = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_STANDBY_STATUS_SET, phys_addr, val); #ifndef CONFIG_ARCH_SUN8IW7P1 hwspin_unlock(MEM_RTC_REG_HWSPINLOCK); } #endif asm volatile ("dsb"); asm volatile ("isb"); break; case TE_SMC_STANDBY_STATUS_GET: #ifndef CONFIG_ARCH_SUN8IW7P1 if (!hwspin_lock_timeout(MEM_RTC_REG_HWSPINLOCK, 20000)) { #endif ret_val = sunxi_do_smc(TEE_SMC_PLAFORM_OPERATION, TE_SMC_STANDBY_STATUS_GET, phys_addr, val); #ifndef CONFIG_ARCH_SUN8IW7P1 hwspin_unlock(MEM_RTC_REG_HWSPINLOCK); } #endif break; default: break; } return ret_val; } static const struct firmware_ops sunxi_firmware_ops = { .read_reg = sunxi_sec_read_reg, .write_reg = sunxi_sec_write_reg, .send_command = sunxi_sec_send_command, .load_arisc = sunxi_load_arisc, .set_secondary_entry = sunxi_sec_set_secondary_entry, .suspend_prepare = sunxi_sec_suspend_prepare, .suspend = sunxi_sec_suspend, .set_standby_status = sunxi_sec_set_standby_status, }; void __init sunxi_firmware_init(void) { register_firmware_ops(&sunxi_firmware_ops); }
tank0412/linux-3.4-sunxi
arch/arm/mach-sunxi/firmware.c
C
gpl-2.0
5,408
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2262, 19102, 8139, 1012, 1008, 15469, 4095, 2099, 1026, 15469, 4095, 2099, 1030, 2035, 10105, 3678, 15007, 1012, 4012, 1028, 1008, 1008, 2023, 2565, 2003, 2489, 4007, 1010, 2017, 2064, 2417, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Aranea * Copyright (c) 2011-2012, Quoc-Viet Nguyen * See LICENSE file for copyright and license details. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <fcntl.h> #include <sys/socket.h> #include <sys/stat.h> #include <aranea/aranea.h> #define CGI_EXT_LEN_ ((int)sizeof(CGI_EXT) - 1) /** Buffer for CGI environment variables */ #define CGI_BUFF g_buff int cgi_hit(const char *name, const int len) { if (len > CGI_EXT_LEN_) { if (memcmp(name + len - CGI_EXT_LEN_, CGI_EXT, CGI_EXT_LEN_) == 0) { return 1; } } return 0; } /** Check if file is executable. * HTTP error code is set to client->response.status_code. */ static int cgi_is_executable(const char *path, struct client_t *client) { struct stat st; if (access(path, X_OK) != 0) { client->response.status_code = HTTP_STATUS_FORBIDDEN; return -1; } if (stat(path, &st) == -1) { A_ERR("stat: %s", strerror(errno)); client->response.status_code = HTTP_STATUS_SERVERERROR; return -1; } if (S_ISDIR(st.st_mode)) { client->response.status_code = HTTP_STATUS_FORBIDDEN; return -1; } return 0; } #define CGI_ADD_ENV_(env, cnt, buf, ...) \ do { \ *env = buf; \ len = sizeof(CGI_BUFF) - (buf - CGI_BUFF); \ if (len > 0) { \ len = snprintf(buf, len, __VA_ARGS__); \ buf += len + 1; /* skip NULL */ \ ++env; \ ++cnt; \ } \ } while (0) /** Generate CGI environment from HTTP request. * Values are saved in g_buff (g_cgienv) */ static int cgi_gen_env(const struct request_t *req, char **env) { int cnt, len; char *buf; cnt = 0; buf = CGI_BUFF; #ifdef CGI_DOCUMENT_ROOT CGI_ADD_ENV_(env, cnt, buf, "DOCUMENT_ROOT=%s", g_config.root); #endif #ifdef CGI_REQUEST_METHOD CGI_ADD_ENV_(env, cnt, buf, "REQUEST_METHOD=%s", req->method); #endif #ifdef CGI_REQUEST_URI CGI_ADD_ENV_(env, cnt, buf, "REQUEST_URI=%s", req->url); #endif if (req->query_string) { CGI_ADD_ENV_(env, cnt, buf, "QUERY_STRING=%s", req->query_string); } if (req->header[HEADER_CONTENTTYPE]) { CGI_ADD_ENV_(env, cnt, buf, "CONTENT_TYPE=%s", req->header[HEADER_CONTENTTYPE]); } if (req->header[HEADER_CONTENTLENGTH]) { CGI_ADD_ENV_(env, cnt, buf, "CONTENT_LENGTH=%s", req->header[HEADER_CONTENTLENGTH]); } #ifdef CGI_HTTP_COOKIE if (req->header[HEADER_COOKIE]) { CGI_ADD_ENV_(env, cnt, buf, "HTTP_COOKIE=%s", req->header[HEADER_COOKIE]); } #endif *env = NULL; return cnt; } #if HAVE_VFORK == 1 # define FORK_() vfork() # define EXIT_(x) _exit(x) #else # define FORK_() fork() # define EXIT_(x) exit(x) #endif /* HAVE_VFORK */ /** Execute file. * HTTP error code is set to client->response.status_code. */ static int cgi_exec(const char *path, struct client_t *client) { char *argv[2]; char *envp[MAX_CGIENV_ITEM]; pid_t pid; int newio; /* set socket back to blocking */ newio = fcntl(client->remote_fd, F_GETFL, NULL); if (newio == -1 || fcntl(client->remote_fd, F_SETFL, newio & (~O_NONBLOCK)) == -1) { A_ERR("fcntl: F_SETFL O_NONBLOCK %s", strerror(errno)); client->response.status_code = HTTP_STATUS_SERVERERROR; return -1; } pid = FORK_(); if (pid < 0) { client->response.status_code = HTTP_STATUS_SERVERERROR; return -1; } if (pid == 0) { /* child */ /* Generate CGI parameters before touching to the buffer */ cgi_gen_env(&client->request, envp); /* Send minimal header */ client->response.status_code = HTTP_STATUS_OK; client->data_length = http_gen_header(&client->response, client->data, sizeof(client->data), 0); if (send(client->remote_fd, client->data, client->data_length, 0) < 0) { EXIT_(1); } /* Tie CGI's stdin to the socket */ if (client->flags & CLIENT_FLAG_POST) { if (dup2(client->remote_fd, STDIN_FILENO) < 0) { EXIT_(1); } } /* Tie CGI's stdout to the socket */ if (dup2(client->remote_fd, STDOUT_FILENO) < 0) { EXIT_(1); } /* close unused FDs */ server_close_fds(); /* No error log */ newio = open("/dev/null", O_WRONLY); if (newio != STDERR_FILENO) { dup2(newio, STDERR_FILENO); close(newio); } /* Execute cgi script */ argv[0] = (char *)path; argv[1] = NULL; execve(path, argv, envp); EXIT_(1); /* exec error */ } /* parent */ client->state = STATE_NONE; /* Remove this client */ return 0; } int cgi_process(struct client_t *client, const char *path) { if (cgi_is_executable(path, client) != 0) { return -1; } if (client->flags & CLIENT_FLAG_HEADERONLY) { client->response.status_code = HTTP_STATUS_OK; client->data_length = http_gen_header(&client->response, client->data, sizeof(client->data), HTTP_FLAG_END); client->state = STATE_SEND_HEADER; return 0; } return cgi_exec(path, client); } /* vim: set ts=4 sw=4 expandtab: */
nqv/aranea
src/cgi.c
C
mit
5,878
[ 30522, 1013, 1008, 19027, 22084, 1008, 9385, 1006, 1039, 1007, 2249, 1011, 2262, 1010, 22035, 2278, 1011, 19710, 16577, 1008, 2156, 6105, 5371, 2005, 9385, 1998, 6105, 4751, 1012, 1008, 1013, 1001, 2421, 1026, 2358, 20617, 1012, 1044, 1028,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * * @author Reense Meetsma, 2015 * @copyright Reense Meetsma under the MIT License, which can be found in the LICENSE.txt File. * * This file will be required by mvc-example/index.php, and contains all the logic * Our application contains. */ /** * We start a sessin here, so that we can use it every file we require/include * after this one. */ session_start(); class mvcExample { /** * The default controller ,we might set * This to a different one later. */ private $_controller = 'example'; /** * We call the init function in the controller * we require above here. */ private $_method = 'init'; /** * The parameters we are sending with the method, we * are calling above here. */ private $_parameters = []; /** * This method is being called by the index.php file in mvc-example/. */ public function init() { /** * url is an array that contains all the parts of the URL, in an array. * If someone goes to mvc-example/example/helloworld/, * $url will look like this: * $url[0] => 'example' * $url[1] => 'helloworld'. */ $url = $this->parseURL(); /** * Here we check if the first parameter contains a valid controller. * If the first parameter is 'example', and the file mvc-example/application/controllers/exampleController.php * exists, we set the _controller paramter to the first parameter, and then unset the first parameter, * for later use. * */ if(file_exists('application/controllers/'. $url[0].'Controller.php')) { $this->_controller = $url[0]; unset($url[0]); } /** * We then require the controller. If the above if statement was a valid one, * And set the $this->_controller, than it will require the controller with the * $url[0] parameter. But if it didn't, it will require the default one, we declared * before the class, which is the exampleController. */ require_once 'application/controllers/'.$this->_controller.'Controller.php'; /** * Create a new instance of the class we created above. The file mvc-example/application/controllers/exampleController.php * Contains the class example, which we instantiate here. */ $this->_controller = new $this->_controller; /** * If there are any parameters, (besides $url[0], which if it would have exists, was unset on line 61), we * fill _parameters with that. We use a shorthanded if statement, but if you don't understand it, it basicly * says, that if url isset, and not false, we fill the parameters with array_values($url) (which will just re-order the array to * be 0 1 2, because we deleted the $url[0] it would've been 1 2 3). But if it's false, it will just stay an empty array. */ $this->_parameters = $url ? array_values($url) : []; /** * call_user_func_array is a function that will create a class instance, and call a method inside of that, * with a specific set of parameters. The _controller is the one we defined first, which will be example by default, * but if there was a custom one, it will be the one in the $url[0] parameter. The method is by default 'init'. * If there were any other parameters, it will send them with it. * This is a shorthanded function of * $this->_controller->this->_method($this->_parameters). * */ call_user_func_array([$this->_controller, $this->_method], [$this->_parameters]); } /** * @return string */ private function parseURL() { /** * If there is a url set, we parse it. * if the URL would be mvc-example/test/foo/bar/?e=g than the last parameter would be ?e=g. */ if(isset($_GET['url'])) { return $url = explode('/',filter_var(rtrim($_GET['url'], '/'),FILTER_SANITIZE_URL)); } } }
TheRinseM/mvc-example
application/core/mvcExample.php
PHP
mit
3,662
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1008, 1030, 3166, 2128, 16700, 6010, 2863, 1010, 2325, 1008, 1030, 9385, 2128, 16700, 6010, 2863, 2104, 1996, 10210, 6105, 1010, 2029, 2064, 2022, 2179, 1999, 1996, 6105, 1012, 19067, 2102, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * FreeRDP: A Remote Desktop Protocol Implementation * Glyph Cache * * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <freerdp/config.h> #include <stdio.h> #include <winpr/crt.h> #include <winpr/assert.h> #include <winpr/stream.h> #include <freerdp/log.h> #include <freerdp/cache/pointer.h> #include "pointer.h" #define TAG FREERDP_TAG("cache.pointer") static BOOL pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer); static const rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index); static void pointer_free(rdpContext* context, rdpPointer* pointer) { if (pointer) { IFCALL(pointer->Free, context, pointer); if (pointer->xorMaskData) { free(pointer->xorMaskData); pointer->xorMaskData = NULL; } if (pointer->andMaskData) { free(pointer->andMaskData); pointer->andMaskData = NULL; } free(pointer); } } static BOOL update_pointer_position(rdpContext* context, const POINTER_POSITION_UPDATE* pointer_position) { rdpPointer* pointer; if (!context || !context->graphics || !context->graphics->Pointer_Prototype || !pointer_position) return FALSE; if (!context->settings->GrabMouse) return TRUE; pointer = context->graphics->Pointer_Prototype; return IFCALLRESULT(TRUE, pointer->SetPosition, context, pointer_position->xPos, pointer_position->yPos); } static BOOL update_pointer_system(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer_system) { rdpPointer* pointer; if (!context || !context->graphics || !context->graphics->Pointer_Prototype || !pointer_system) return FALSE; pointer = context->graphics->Pointer_Prototype; switch (pointer_system->type) { case SYSPTR_NULL: return IFCALLRESULT(TRUE, pointer->SetNull, context); case SYSPTR_DEFAULT: return IFCALLRESULT(TRUE, pointer->SetDefault, context); default: WLog_ERR(TAG, "Unknown system pointer type (0x%08" PRIX32 ")", pointer_system->type); } return TRUE; } static BOOL upate_pointer_copy_andxor(rdpPointer* pointer, const BYTE* andMaskData, size_t lengthAndMask, const BYTE* xorMaskData, size_t lengthXorMask) { pointer->lengthAndMask = 0; pointer->lengthXorMask = 0; WINPR_ASSERT(pointer); if (lengthAndMask && andMaskData) { BYTE* tmp; pointer->lengthAndMask = lengthAndMask; tmp = (BYTE*)realloc(pointer->andMaskData, lengthAndMask); if (!tmp) return FALSE; pointer->andMaskData = tmp; CopyMemory(pointer->andMaskData, andMaskData, lengthAndMask); } if (lengthXorMask && xorMaskData) { BYTE* tmp; pointer->lengthXorMask = lengthXorMask; tmp = (BYTE*)realloc(pointer->xorMaskData, lengthXorMask); if (!tmp) return FALSE; pointer->xorMaskData = tmp; CopyMemory(pointer->xorMaskData, xorMaskData, lengthXorMask); } return TRUE; } static BOOL update_pointer_color(rdpContext* context, const POINTER_COLOR_UPDATE* pointer_color) { rdpPointer* pointer; rdpCache* cache; WINPR_ASSERT(context); WINPR_ASSERT(pointer_color); cache = context->cache; WINPR_ASSERT(cache); pointer = Pointer_Alloc(context); if (pointer == NULL) return FALSE; pointer->xorBpp = 24; pointer->xPos = pointer_color->xPos; pointer->yPos = pointer_color->yPos; pointer->width = pointer_color->width; pointer->height = pointer_color->height; if (!upate_pointer_copy_andxor(pointer, pointer_color->andMaskData, pointer_color->lengthAndMask, pointer_color->xorMaskData, pointer_color->lengthXorMask)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->New, context, pointer)) goto out_fail; if (!pointer_cache_put(cache->pointer, pointer_color->cacheIndex, pointer)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->Set, context, pointer)) goto out_fail; return TRUE; out_fail: pointer_free(context, pointer); return FALSE; } static BOOL update_pointer_large(rdpContext* context, const POINTER_LARGE_UPDATE* pointer_large) { rdpPointer* pointer; rdpCache* cache; WINPR_ASSERT(context); WINPR_ASSERT(pointer_large); cache = context->cache; WINPR_ASSERT(cache); pointer = Pointer_Alloc(context); if (pointer == NULL) return FALSE; pointer->xorBpp = pointer_large->xorBpp; pointer->xPos = pointer_large->hotSpotX; pointer->yPos = pointer_large->hotSpotY; pointer->width = pointer_large->width; pointer->height = pointer_large->height; if (!upate_pointer_copy_andxor(pointer, pointer_large->andMaskData, pointer_large->lengthAndMask, pointer_large->xorMaskData, pointer_large->lengthXorMask)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->New, context, pointer)) goto out_fail; if (!pointer_cache_put(cache->pointer, pointer_large->cacheIndex, pointer)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->Set, context, pointer)) goto out_fail; return TRUE; out_fail: pointer_free(context, pointer); return FALSE; } static BOOL update_pointer_new(rdpContext* context, const POINTER_NEW_UPDATE* pointer_new) { rdpPointer* pointer; rdpCache* cache; if (!context || !pointer_new) return FALSE; cache = context->cache; pointer = Pointer_Alloc(context); if (!pointer) return FALSE; pointer->xorBpp = pointer_new->xorBpp; pointer->xPos = pointer_new->colorPtrAttr.xPos; pointer->yPos = pointer_new->colorPtrAttr.yPos; pointer->width = pointer_new->colorPtrAttr.width; pointer->height = pointer_new->colorPtrAttr.height; if (!upate_pointer_copy_andxor( pointer, pointer_new->colorPtrAttr.andMaskData, pointer_new->colorPtrAttr.lengthAndMask, pointer_new->colorPtrAttr.xorMaskData, pointer_new->colorPtrAttr.lengthXorMask)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->New, context, pointer)) goto out_fail; if (!pointer_cache_put(cache->pointer, pointer_new->colorPtrAttr.cacheIndex, pointer)) goto out_fail; if (!IFCALLRESULT(TRUE, pointer->Set, context, pointer)) goto out_fail; return TRUE; out_fail: pointer_free(context, pointer); return FALSE; } static BOOL update_pointer_cached(rdpContext* context, const POINTER_CACHED_UPDATE* pointer_cached) { const rdpPointer* pointer; rdpCache* cache; WINPR_ASSERT(context); WINPR_ASSERT(pointer_cached); cache = context->cache; WINPR_ASSERT(cache); pointer = pointer_cache_get(cache->pointer, pointer_cached->cacheIndex); if (pointer != NULL) return IFCALLRESULT(TRUE, pointer->Set, context, pointer); return FALSE; } const rdpPointer* pointer_cache_get(rdpPointerCache* pointer_cache, UINT32 index) { const rdpPointer* pointer; WINPR_ASSERT(pointer_cache); if (index >= pointer_cache->cacheSize) { WLog_ERR(TAG, "invalid pointer index:%" PRIu32 "", index); return NULL; } WINPR_ASSERT(pointer_cache->entries); pointer = pointer_cache->entries[index]; return pointer; } BOOL pointer_cache_put(rdpPointerCache* pointer_cache, UINT32 index, rdpPointer* pointer) { rdpPointer* prevPointer; WINPR_ASSERT(pointer_cache); if (index >= pointer_cache->cacheSize) { WLog_ERR(TAG, "invalid pointer index:%" PRIu32 "", index); return FALSE; } WINPR_ASSERT(pointer_cache->entries); prevPointer = pointer_cache->entries[index]; pointer_free(pointer_cache->context, prevPointer); pointer_cache->entries[index] = pointer; return TRUE; } void pointer_cache_register_callbacks(rdpUpdate* update) { rdpPointerUpdate* pointer; WINPR_ASSERT(update); WINPR_ASSERT(update->context); pointer = update->pointer; WINPR_ASSERT(pointer); if (!freerdp_settings_get_bool(update->context->settings, FreeRDP_DeactivateClientDecoding)) { pointer->PointerPosition = update_pointer_position; pointer->PointerSystem = update_pointer_system; pointer->PointerColor = update_pointer_color; pointer->PointerLarge = update_pointer_large; pointer->PointerNew = update_pointer_new; pointer->PointerCached = update_pointer_cached; } } rdpPointerCache* pointer_cache_new(rdpContext* context) { rdpPointerCache* pointer_cache; rdpSettings* settings; WINPR_ASSERT(context); settings = context->settings; WINPR_ASSERT(settings); pointer_cache = (rdpPointerCache*)calloc(1, sizeof(rdpPointerCache)); if (!pointer_cache) return NULL; pointer_cache->context = context; pointer_cache->cacheSize = settings->PointerCacheSize; pointer_cache->entries = (rdpPointer**)calloc(pointer_cache->cacheSize, sizeof(rdpPointer*)); if (!pointer_cache->entries) { free(pointer_cache); return NULL; } return pointer_cache; } void pointer_cache_free(rdpPointerCache* pointer_cache) { if (pointer_cache != NULL) { UINT32 i; rdpPointer* pointer; for (i = 0; i < pointer_cache->cacheSize; i++) { pointer = pointer_cache->entries[i]; pointer_free(pointer_cache->context, pointer); } free(pointer_cache->entries); free(pointer_cache); } } POINTER_COLOR_UPDATE* copy_pointer_color_update(rdpContext* context, const POINTER_COLOR_UPDATE* src) { POINTER_COLOR_UPDATE* dst = calloc(1, sizeof(POINTER_COLOR_UPDATE)); if (!dst || !src) goto fail; *dst = *src; if (src->lengthAndMask > 0) { dst->andMaskData = calloc(src->lengthAndMask, sizeof(BYTE)); if (!dst->andMaskData) goto fail; memcpy(dst->andMaskData, src->andMaskData, src->lengthAndMask); } if (src->lengthXorMask > 0) { dst->xorMaskData = calloc(src->lengthXorMask, sizeof(BYTE)); if (!dst->xorMaskData) goto fail; memcpy(dst->xorMaskData, src->xorMaskData, src->lengthXorMask); } return dst; fail: free_pointer_color_update(context, dst); return NULL; } void free_pointer_color_update(rdpContext* context, POINTER_COLOR_UPDATE* pointer) { WINPR_UNUSED(context); if (!pointer) return; free(pointer->xorMaskData); free(pointer->andMaskData); free(pointer); } POINTER_LARGE_UPDATE* copy_pointer_large_update(rdpContext* context, const POINTER_LARGE_UPDATE* src) { POINTER_LARGE_UPDATE* dst = calloc(1, sizeof(POINTER_LARGE_UPDATE)); if (!dst || !src) goto fail; *dst = *src; if (src->lengthAndMask > 0) { dst->andMaskData = calloc(src->lengthAndMask, sizeof(BYTE)); if (!dst->andMaskData) goto fail; memcpy(dst->andMaskData, src->andMaskData, src->lengthAndMask); } if (src->lengthXorMask > 0) { dst->xorMaskData = calloc(src->lengthXorMask, sizeof(BYTE)); if (!dst->xorMaskData) goto fail; memcpy(dst->xorMaskData, src->xorMaskData, src->lengthXorMask); } return dst; fail: free_pointer_large_update(context, dst); return NULL; } void free_pointer_large_update(rdpContext* context, POINTER_LARGE_UPDATE* pointer) { WINPR_UNUSED(context); if (!pointer) return; free(pointer->xorMaskData); free(pointer->andMaskData); free(pointer); } POINTER_NEW_UPDATE* copy_pointer_new_update(rdpContext* context, const POINTER_NEW_UPDATE* src) { POINTER_NEW_UPDATE* dst = calloc(1, sizeof(POINTER_NEW_UPDATE)); if (!dst || !src) goto fail; *dst = *src; if (src->colorPtrAttr.lengthAndMask > 0) { dst->colorPtrAttr.andMaskData = calloc(src->colorPtrAttr.lengthAndMask, sizeof(BYTE)); if (!dst->colorPtrAttr.andMaskData) goto fail; memcpy(dst->colorPtrAttr.andMaskData, src->colorPtrAttr.andMaskData, src->colorPtrAttr.lengthAndMask); } if (src->colorPtrAttr.lengthXorMask > 0) { dst->colorPtrAttr.xorMaskData = calloc(src->colorPtrAttr.lengthXorMask, sizeof(BYTE)); if (!dst->colorPtrAttr.xorMaskData) goto fail; memcpy(dst->colorPtrAttr.xorMaskData, src->colorPtrAttr.xorMaskData, src->colorPtrAttr.lengthXorMask); } return dst; fail: free_pointer_new_update(context, dst); return NULL; } void free_pointer_new_update(rdpContext* context, POINTER_NEW_UPDATE* pointer) { if (!pointer) return; free(pointer->colorPtrAttr.xorMaskData); free(pointer->colorPtrAttr.andMaskData); free(pointer); } POINTER_CACHED_UPDATE* copy_pointer_cached_update(rdpContext* context, const POINTER_CACHED_UPDATE* pointer) { POINTER_CACHED_UPDATE* dst = calloc(1, sizeof(POINTER_CACHED_UPDATE)); if (!dst) goto fail; *dst = *pointer; return dst; fail: free_pointer_cached_update(context, dst); return NULL; } void free_pointer_cached_update(rdpContext* context, POINTER_CACHED_UPDATE* pointer) { WINPR_UNUSED(context); free(pointer); } void free_pointer_position_update(rdpContext* context, POINTER_POSITION_UPDATE* pointer) { WINPR_UNUSED(context); free(pointer); } POINTER_POSITION_UPDATE* copy_pointer_position_update(rdpContext* context, const POINTER_POSITION_UPDATE* pointer) { POINTER_POSITION_UPDATE* dst = calloc(1, sizeof(POINTER_POSITION_UPDATE)); if (!dst || !pointer) goto fail; *dst = *pointer; return dst; fail: free_pointer_position_update(context, dst); return NULL; } void free_pointer_system_update(rdpContext* context, POINTER_SYSTEM_UPDATE* pointer) { WINPR_UNUSED(context); free(pointer); } POINTER_SYSTEM_UPDATE* copy_pointer_system_update(rdpContext* context, const POINTER_SYSTEM_UPDATE* pointer) { POINTER_SYSTEM_UPDATE* dst = calloc(1, sizeof(POINTER_SYSTEM_UPDATE)); if (!dst || !pointer) goto fail; *dst = *pointer; return dst; fail: free_pointer_system_update(context, dst); return NULL; }
FreeRDP/FreeRDP
libfreerdp/cache/pointer.c
C
apache-2.0
14,101
[ 30522, 1013, 1008, 1008, 1008, 2489, 4103, 2361, 1024, 1037, 6556, 15363, 8778, 7375, 1008, 1043, 2135, 8458, 17053, 1008, 1008, 9385, 2249, 7871, 1011, 7213, 2062, 4887, 1026, 7871, 5685, 2890, 1012, 2062, 4887, 1030, 20917, 4014, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*! \file \author Igor Mironchik (igor.mironchik at gmail dot com). Copyright (c) 2017 Igor Mironchik 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 hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef TREE__CAMERA_CONTROLLER_HPP__INCLUDED #define TREE__CAMERA_CONTROLLER_HPP__INCLUDED // Qt include. #include <Qt3DCore/QEntity> // C++ include. #include <memory> QT_BEGIN_NAMESPACE namespace Qt3DRender { class QCamera; } QT_END_NAMESPACE // // CameraController // class CameraControllerPrivate; class CameraController Q_DECL_FINAL : public Qt3DCore::QEntity { Q_OBJECT public: CameraController( Qt3DRender::QCamera * camera, Qt3DCore::QEntity * parent ); ~CameraController(); private slots: void _q_onTriggered( float ); private: friend class CameraControllerPrivate; Q_DISABLE_COPY( CameraController ) std::unique_ptr< CameraControllerPrivate > d; }; // class CameraController #endif // TREE__CAMERA_CONTROLLER_HPP__INCLUDED
igormironchik/3Dtree
3Dtree/camera_controller.hpp
C++
gpl-3.0
1,494
[ 30522, 1013, 1008, 999, 1032, 5371, 1032, 3166, 14661, 14719, 2239, 5428, 2243, 1006, 14661, 1012, 14719, 2239, 5428, 2243, 2012, 20917, 4014, 11089, 4012, 1007, 1012, 9385, 1006, 1039, 1007, 2418, 14661, 14719, 2239, 5428, 2243, 2023, 2565...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package zmarkdown.javaeditor; import org.python.util.PythonInterpreter; import org.python.core.*; /** * * @author firm1 */ public class EMarkdown{ PythonInterpreter interp; public EMarkdown() { interp = new PythonInterpreter(); interp.exec("from markdown import Markdown"); interp.exec("from markdown.extensions.zds import ZdsExtension"); interp.exec("from smileys_definition import smileys"); } public String html(String chaine) { interp.set("text", chaine); interp.exec("render = Markdown(extensions=(ZdsExtension({'inline': False, 'emoticons': smileys}),),safe_mode = 'escape', enable_attributes = False, tab_length = 4, output_format = 'html5', smart_emphasis = True, lazy_ol = True).convert(text)"); PyString render = interp.get("render", PyString.class); return render.toString(); } }
firm1/zmarkdown-editor
src/zmarkdown/javaeditor/EMarkdown.java
Java
mit
1,070
[ 30522, 1013, 1008, 1008, 2000, 2689, 2023, 6105, 20346, 1010, 30524, 12324, 8917, 1012, 18750, 1012, 21183, 4014, 1012, 18750, 18447, 2121, 28139, 3334, 1025, 12324, 8917, 1012, 18750, 1012, 4563, 1012, 1008, 1025, 1013, 1008, 1008, 1008, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Concepts for scale-generator A note about the exercise: as one with a graduate degree in Music Theory and Composition, this one drove me nuts. The way it approached steps and tonality was at a minimum, not standard. Specifically, I think the explanation and solution could be simplified if it addressed the issue of enharmonic equivalence (e.g. C# == Db) and/or used numbers representing scale degrees instead of semitones, or did some combination of both. For example, the `step/3` function really was only dealing with chromatic scales, so as such, there is no notion of "tonic" (in my solution, that argument was ignored entirely). Perhaps the cleanest refactor of that would be to rename the `tonic` argument as `starting_pitch` (since there is no notion of "tonic" when dealing with chromatic scales) and rename the function as `chromatic_step/3`. Another odd implementation in the exercise was that it represented scales as having 13 (!!!) tones, e.g. `~w(A A# B C C# D D# E F F# G G# A)` -- this is highly unusual, and it actually violates the set principles on which music is based (both tonal and atonal). More appropriate (and standard in the literature), would be to reference the octave equivalence using an apostrophe, e.g. `A'` (i.e. A prime), e.g. `~w(A A# B C C# D D# E F F# G G# A')`, but for these exercises, it would be far better to normalize the pitch sets and skip the octave equivalence entirely, i.e. `~w(A A# B C C# D D# E F F# G G#)` (12 tones for the Western chromatic scale) and `~w(C D E F G A B)` (7 tones for all Western modal scales). As I ref'd in my comments: "NOTE: we are manually tacking tonic back on to the end of the scale to meet the "business requirements" of the exercise. Normally, I would not double-list pitches in a scale." ```elixir @spec chromatic_scale(tonic :: String.t()) :: list(String.t()) def chromatic_scale(tonic), do: transpose(@chromatic_scale, String.capitalize(tonic)) ++ [String.capitalize(tonic)] ``` The `++` here is weird conceptually given the problem space and arguably it's weird in the language (I think we can find a better place to teach the `++` operator). ## Approach: ### Enum.slice Here is my (somewhat tortured) solution (esp. the `accumulate_scale` function is not great): ```elixir defmodule ScaleGenerator do # Note: these use only 12 tones so that they can remain cyclical # (whereas the "business logic" described in the instructions refers to scales with 13 pitches). @chromatic_scale ~w(C C# D D# E F F# G G# A A# B) @flat_chromatic_scale ~w(C Db D Eb E F Gb G Ab A Bb B) # Lowercase denotes minor keys defguard is_flat_key(tonic) when tonic in ~w(F Bb Eb Ab Db Gb Cb d g c f bb eb ab) @doc """ Find the note for a given interval (`step`) in a `scale` after the `tonic`. "m": one semitone "M": two semitones (full tone) "A": augmented second (three semitones) Given the `tonic` "D" in the `scale` (C C# D D# E F F# G G# A A# B C), you should return the following notes for the given `step`: "m": D# "M": E "A": F NOTE: we don't really need to know the tonic to figure out the next step... if I were writing the function signatures, I would omit the "tonic" argument entirely. """ @spec step(scale :: list(String.t()), tonic :: String.t(), step :: String.t()) :: list(String.t()) def step(scale, _tonic, "m"), do: Enum.at(scale, 1) def step(scale, _tonic, "M"), do: Enum.at(scale, 2) def step(scale, _tonic, "A"), do: Enum.at(scale, 3) # Convert the given scale so it starts at the given tonic defp transpose(scale, tonic) do index = Enum.find_index(scale, fn x -> x == tonic end) start = Enum.slice(scale, index, 12) remainder = Enum.slice(scale, 0, index) start ++ remainder end @doc """ The chromatic scale is a musical scale with thirteen pitches, each a semitone (half-tone) above or below another. Notes with a sharp (#) are a semitone higher than the note below them, where the next letter note is a full tone except in the case of B and E, which have no sharps. Generate these notes, starting with the given `tonic` and wrapping back around to the note before it, ending with the tonic an octave higher than the original. If the `tonic` is lowercase, capitalize it. "C" should generate: ~w(C C# D D# E F F# G G# A A# B C) NOTE: we are manually tacking tonic back on to the end of the scale to meet the "business requirements" of the exercise. Normally, I would not double-list pitches in a scale. """ @spec chromatic_scale(tonic :: String.t()) :: list(String.t()) def chromatic_scale(tonic), do: transpose(@chromatic_scale, String.capitalize(tonic)) ++ [String.capitalize(tonic)] @doc """ Enharmonic equivalents: sharp notes can also be considered the flat (b) note of the tone above them, e.g. G# ~ Ab, D# ~ Eb, etc. So the notes of a chromatic scale can be represented using flats as: A Bb B C Db D Eb E F Gb G Ab Generate these notes, starting with the given `tonic` and wrapping back around to the note before it, ending with the tonic an octave higher than the original. If the `tonic` is lowercase, capitalize it. "C" should generate: ~w(C Db D Eb E F Gb G Ab A Bb B C) """ @spec flat_chromatic_scale(tonic :: String.t()) :: list(String.t()) def flat_chromatic_scale(tonic), do: transpose(@flat_chromatic_scale, String.capitalize(tonic)) ++ [String.capitalize(tonic)] @doc """ Certain scales will require the use of the flat version, depending on the `tonic` (key) that begins them, which is C in the above examples. For any of the following tonics, use the flat chromatic scale: F Bb Eb Ab Db Gb d g c f bb eb For all others, use the regular chromatic scale. """ @spec find_chromatic_scale(tonic :: String.t()) :: list(String.t()) def find_chromatic_scale(tonic) when is_flat_key(tonic), do: flat_chromatic_scale(tonic) def find_chromatic_scale(tonic), do: chromatic_scale(tonic) @doc """ The `pattern` string will identify the steps between the notes in the scale. For example, the pattern "MMmMMMm" starting on tonic C indicates a C Major scale. You will start with C, make a whole-step (a major 2nd, or "M") up to D, another whole-step ("M") up to E, then a semitone (a minor 2nd, or "m") to F, and so on to get all the notes of the major scale: C D E F G A B C """ @spec scale(tonic :: String.t(), pattern :: String.t()) :: list(String.t()) def scale(tonic, pattern) when is_flat_key(tonic) do tonic = String.capitalize(tonic) accumulate_scale(transpose(@flat_chromatic_scale, tonic), tonic, pattern) end def scale(tonic, pattern) do tonic = String.capitalize(tonic) accumulate_scale(transpose(@chromatic_scale, tonic), tonic, pattern) end # This enumerates over the pattern (converted to a list). It keeps a map accumulator so it can track # both the accumulating scale AND the transposed chromatic scale. # The transposed chromatic scale is only scaffolding and ultimately only the accumulated scale is returned. # TODO: use a tuple accumulator instead of a map defp accumulate_scale(chromatic_scale, tonic, pattern) do acc = Enum.reduce( String.codepoints(pattern), %{scale_acc: [tonic], chromatic: chromatic_scale}, fn x, acc -> next_note = step(acc.chromatic, "", x) %{ scale_acc: acc.scale_acc ++ [next_note], chromatic: transpose(acc.chromatic, next_note) } end ) acc.scale_acc end end ``` ## Concepts: Arguably, this one really can/should be all about `Enum.slice` and `Enum.find_index`... - naming - modules - module attributes - @doc - documentation - @spec - types - String.t() - list(String.t()) - dialyxir - dynamic typing - standard library modules - Kernel - in/2 - `++` - String - codepoints/1 (alternatively: `<<h::binary>>` style matching) - Enum - Enum.slice - Enum.find_index - Enum.reduce - guards - when - custom implementations using `defguard` - types - String.t - lists - maps
exercism/xelixir
reference/exercise-concepts/scale-generator.md
Markdown
mit
8,105
[ 30522, 1001, 8474, 2005, 4094, 1011, 13103, 1037, 3602, 2055, 1996, 6912, 1024, 2004, 2028, 2007, 1037, 4619, 3014, 1999, 2189, 3399, 1998, 5512, 1010, 2023, 2028, 5225, 2033, 12264, 1012, 1996, 2126, 2009, 5411, 4084, 1998, 10228, 23732, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import sys import os import re def human_size_to_byte(number): """ Convert number of these units to bytes, ignore case: b : 512 kB : 1000 K : 1024 mB : 1000*1000 m : 1024*1024 MB : 1000*1000 M : 1024*1024 GB : 1000*1000*1000 G : 1024*1024*1024 TB : 1000*1000*1000*1000 T : 1024*1024*1024*1024 PB : 1000*1000*1000*1000*1000 P : 1024*1024*1024*1024*1024 EB : 1000*1000*1000*1000*1000*1000 E : 1024*1024*1024*1024*1024*1024 ZB : 1000*1000*1000*1000*1000*1000*1000 Z : 1024*1024*1024*1024*1024*1024*1024 YB : 1000*1000*1000*1000*1000*1000*1000*1000 Y : 1024*1024*1024*1024*1024*1024*1024*1024 number is of one of these forms: 123, 123b, 123M, 1G """ mapping = { 'b' : 512 , 'kb' : 1000, 'k' : 1024, 'mb' : 1000**2, 'm' : 1024**2, 'gb' : 1000**3, 'g' : 1024**3, 'tb' : 1000**4, 't' : 1024**4, 'pb' : 1000**5, 'p' : 1024**5, 'eb' : 1000**6, 'e' : 1024**6, 'zb' : 1000**7, 'z' : 1024**7, 'yb' : 1000**8, 'y' : 1024**8, } unit = re.sub('^[0-9]+', '', number) if unit: unit = unit.lower() assert unit in mapping.keys(), "wrong unit %s " % unit amount = int(number[:-len(unit)]) return mapping[unit] * amount else: return int(number) def correct_offset(file): """Due to Python cache issue, the real file offset of the underlying file descriptor may differ, this function can correct it. """ cur = file.seek(0, 1) file.seek(0, 2) file.seek(cur) def open_file(file): if file == '-': return os.fdopen(sys.stdin.fileno(), 'rb') else: return open(file, 'rb') class Locator: """Search from the end of the file backward, locate the starting offset of the specified amount, measured by line, or by byte. """ def __init__(self, ifile, mode, amount, bs=8192): """mode can be 'lines' or 'bytes'""" assert ifile.seekable(), "input file is not seekable" self.orig_pos = ifile.seek(0, 1) self.ifile = ifile self.mode = mode self.amount = amount self.bs = bs def find_line(self, ifile, chunk, amount): """ Find if data chunk contains 'amount' number of lines. Return value: (stat, pos, remaining-amount). If stat is True, pos is the result, otherwise pos is not used, remaining-amount is for the next run. """ count = chunk.count(b'\n') if count <= amount: amount -= count return False, 0, amount else: # found pos = -1 for i in range(count - amount): pos = chunk.index(b'\n', pos+1) pos += 1 diff = len(chunk) - pos pos = ifile.seek(-diff, 1) return True, pos, 0 def find_byte(self, ifile, chunk, amount): """ Find if data chunk contains 'amount' number of bytes. Return value: (stat, pos, remaining-amount). If stat is True, pos is the result, otherwise pos is not used, remaining-amount is for the next run. """ length = len(chunk) if length < amount: amount -= length return False, 0, amount else: # found pos = ifile.seek(-amount, 1) return True, pos, 0 def find(self, ifile, offset, size, amount): """Read 'size' bytes starting from offset to find. Return value: (stat, pos, remaining-amount). If stat is True, pos is the result, otherwise pos is not used, remaining-amount is for the next run. """ try: pos = ifile.seek(offset) except OSError: assert False, "unkown file seeking failure" chunk = ifile.read(size) if self.mode == 'lines': return self.find_line(ifile, chunk, amount) else: return self.find_byte(ifile, chunk, amount) def run(self): """Find the offset of the last 'amount' lines""" ifile = self.ifile amount = self.amount orig_pos = self.orig_pos end = ifile.seek(0, 2) # jump to the end # nothing to process, return the original position total = end - orig_pos if total <= amount: correct_offset(ifile) return orig_pos bs = self.bs # process the last block remaining = total % bs offset = end - remaining stat, pos, amount = self.find(ifile, offset, remaining, amount) while not stat and offset != orig_pos: offset -= bs stat, pos, amount = self.find(ifile, offset, bs, amount) ifile.seek(self.orig_pos) correct_offset(ifile) return pos class Buffer: def __init__(self, amount): self.min = amount self.total = 0 self.data = [] def push(self, pair): self.data.append(pair) self.total += pair[0] def pop(self): pair = self.data.pop(0) self.total -= pair[0] return pair def cut(self): """Pop as many pairs off the head of the self.data as self.is_ready() is True, return a combined result. """ count = 0 data = b'' while self.is_ready(): x, y = self.pop() count += x data += y return count, data def is_satisfied(self): """The minimum amount is satisfied""" return self.total >= self.min def is_ready(self): """The buffer is ready to pop""" return self.total - self.data[0][0] >= self.min class HeadWorkerSL: """Seekable, line mode""" def __init__(self, ifile, ofile, amount, bs=None): self.ifile = ifile self.ofile = ofile self.amount = amount self.bs = bs or 8192 def read(self): return self.ifile.read(self.bs) def transform(self, data): return data.count(b'\n') def is_last(self, count): return count >= self.amount def action(self, data, count): self.ofile.write(data) self.amount -= count def handle_last(self, data): pos = -1 for i in range(self.amount): pos = data.index(b'\n', pos+1) pos += 1 self.ofile.write(data[:pos]) over_read = len(data) - pos try: self.ifile.seek(-over_read, 1) except Exception: pass def run(self): while self.amount: data = self.read() if not data: break count = self.transform(data) if self.is_last(count): self.handle_last(data) break else: self.action(data, count) class HeadWorkerSB(HeadWorkerSL): """Seekable, byte mode""" def transform(self, data): return len(data) def handle_last(self, data): self.ofile.write(data[:self.amount]) over_read = len(data) - self.amount try: self.ifile.seek(-over_read, 1) except Exception: pass class HeadWorkerTL(HeadWorkerSL): """Terminal, line mode""" def read(self): return self.ifile.readline() def action(self, data, count): self.ofile.write(data) self.amount -= 1 self.ofile.flush() def handle_last(self, data): self.ofile.write(data) self.ofile.flush() class HeadWorkerTB(HeadWorkerSB): """Terminal, byte mode""" def read(self): return self.ifile.readline() class HeadWorkerULIT(HeadWorkerSL): """Unseekable, line mode ignore tail""" def __init__(self, ifile, ofile, amount, bs=None): self.ifile = ifile self.ofile = ofile self.amount = amount self.bs = bs or 8192 def read(self): return self.ifile.read(self.bs) def transform(self, data): return data.count(b'\n') def fill(self): """Fill up the buffer with content from self.ifile""" amount = self.amount buffer = Buffer(amount) while True: data = self.read() if not data: break count = self.transform(data) buffer.push((count, data)) if buffer.is_satisfied(): break return buffer def step(self, buffer): """Read and process the self.ifile step by step, return False if nothing left in self.ifile. """ data = self.read() if not data: return False count = self.transform(data) buffer.push((count, data)) if buffer.is_ready(): x, data = buffer.cut() self.proc(data) return True def proc(self, data): self.ofile.write(data) self.ofile.flush() def handle_last(self, buffer): while True: x, data = buffer.pop() if buffer.is_satisfied(): self.proc(data) else: diff = buffer.min - buffer.total lines = data.splitlines(keepends=True) self.ofile.writelines(lines[:-diff]) break self.ofile.flush() def run(self): buffer = self.fill() if buffer.is_satisfied(): while self.step(buffer): pass self.handle_last(buffer) class HeadWorkerTLIT(HeadWorkerULIT): """Terminal, line mode ignore tail""" def read(self): return self.ifile.readline() class HeadWorkerUBIT(HeadWorkerULIT): """Unseekable, byte mode ignore tail""" def transform(self, data): return len(data) def handle_last(self, buffer): while True: x, data = buffer.pop() if buffer.is_satisfied(): self.ofile.write(data) else: diff = buffer.min - buffer.total self.ofile.write(data[:-diff]) break self.ofile.flush() class HeadWorkerTBIT(HeadWorkerUBIT): """Terminal, byte mode ignore tail""" def read(self): return self.ifile.readline() class Mixin: def copy_to_end(self): while True: chunk = self.read() if not chunk: break self.ofile.write(chunk) class TailWorkerSLIH(HeadWorkerSL, Mixin): """Seekable, line mode, ignore head""" def __init__(self, ifile, ofile, amount, bs=None): super(TailWorkerSLIH, self).__init__(ifile, ofile, amount, bs) if amount > 0: self.amount -= 1 def action(self, data, count): self.amount -= count def handle_last(self, data): pos = -1 for i in range(self.amount): pos = data.index(b'\n', pos+1) pos += 1 self.ofile.write(data[pos:]) self.copy_to_end() class TailWorkerSBIH(TailWorkerSLIH): """Seekable, byte mode, ignore head""" def transform(self, data): return len(data) def handle_last(self, data): self.ofile.write(data[self.amount:]) self.copy_to_end() class TailWorkerSB(TailWorkerSLIH): def __init__(self, ifile, ofile, bs=None): self.ifile = ifile self.ofile = ofile self.bs = bs or 8192 def run(self): self.copy_to_end() class TailWorkerULIH(HeadWorkerULIT, Mixin): """Unseekable, line mode ignore head""" def proc(self, data): """Just ignore the data""" def handle_last(self, buffer): while True: x, data = buffer.pop() if not buffer.is_satisfied(): diff = buffer.min - buffer.total self.split_and_proc(data, diff) for x, data in buffer.data: self.ofile.write(data) break def split_and_proc(self, data, diff): lines = data.splitlines(keepends=True) self.ofile.writelines(lines[-diff:]) class TailWorkerUBIH(TailWorkerULIH): """Unseekable, byte mode ignore head""" def read(self): return self.ifile.read(self.bs) def transform(self, data): return len(data) def split_and_proc(self, data, diff): self.ofile.write(data[-diff:]) class TailWorkerTLIH(TailWorkerULIH): """Terminal, line mode ignore head""" def read(self): return self.ifile.readline() class TailWorkerTBIH(TailWorkerTLIH): """Terminal, byte mode ignore head""" def transform(self, data): return len(data) def split_and_proc(self, data, diff): self.ofile.write(data[-diff:]) class TailWorkerTL(TailWorkerSLIH): """Terminal, line mode, ignore head""" def read(self): return self.ifile.readline() def handle_last(self, data): self.copy_to_end() class TailWorkerTB(TailWorkerTL): """Terminal, byte mode, ignore head""" def transform(self, data): return len(data) def handle_last(self, data): self.ofile.write(data[self.amount:]) self.copy_to_end() class GrepNameDetermined(Exception): pass class GrepStatusDetermined(Exception): pass class GrepWorker: # VT100 color code c_fname = b'\x1b[35m' # magenta c_sep = b'\x1b[36m' # cyan c_lnum = b'\x1b[32m' # green c_match = b'\x1b[31m\x1b[1m' # bold red c_off = b'\x1b[0m' # turn off color sep_line = b'--\n' c_sep_line = c_sep + b'--' + c_off + b'\n' def __init__(self, pattern, options, ifile, ofile, bs=None): self.pattern = pattern self.options = options self.ifile = ifile self.ofile = ofile self.bs = bs or 8192 self.nr = 0 # number of records self.fname = self.make_fname(ifile.name) self.status = False # Invert the sense of matching if ('invert' in options and 'file_match' not in options and 'count' not in options): self.on_match, self.on_not_match = self.on_not_match, self.on_match # set on_match method for -q option if 'quiet' in options: self.on_match = self.quiet_on_match # set reader for tty input file if ifile.isatty(): self.read = self.read_tty self.write = self.write_tty # setup color output color = options['color'] if color == 'always' or self.ofile.isatty() and color == 'auto': self.sep_line = self.c_sep_line self.make_fname_str = self.make_color_fname_str self.make_lnum_str = self.make_color_lnum_str self.make_matcher = self.make_color_matcher self.matcher = self.make_matcher(options) def insert_line_number(self, lines, num, sep=b':'): """Insert line number to the head of each line""" num = str(num).encode() num_str = self.make_lnum_str(num, sep) return (b'%s%s' % (num_str, line) for line in lines) def insert_file_name(self, lines, fname, sep=b':'): """Insert file name to the head of each line""" fname_str = self.make_fname_str(fname, sep) return (b'%s%s' % (fname_str, line) for line in lines) def make_lnum_str(self, num, sep): return num + sep def make_fname_str(self, fname, sep): return fname + sep def make_color_lnum_str(self, num, sep): return self.c_lnum + num + self.c_sep + sep + self.c_off def make_color_fname_str(self, fname, sep): return self.c_fname + fname + self.c_sep + sep + self.c_off def quiet_on_match(self, *args, **kargs): raise GrepStatusDetermined def read(self): """Return an enumerate object with line number""" lines = self.ifile.readlines(self.bs) if not lines: return None count = len(lines) res = enumerate(lines, self.nr + 1) self.nr += count return res def read_tty(self): """Read the terminal, line by line""" line = self.ifile.readline() if not line: return None self.nr += 1 return [(self.nr, line)] def make_normal_matcher(self, options): # handle -w option, match word boundary pat = self.pattern if 'word_regexp' in self.options: pat = r'\b%s\b' % pat # handle -i option, ignore case flags = 0 if 'ignore_case' in self.options: flags |= re.IGNORECASE pat = re.compile(pat.encode(), flags) return pat def make_matcher(self, options): pat = self.make_normal_matcher(options) class C: def findall(self, line): return pat.findall(line), line return C() def make_color_matcher(self, options): pat = self.make_normal_matcher(options) c_match = self.c_match c_off = self.c_off class C: def findall(self, line): matches = pat.findall(line) if matches: matches = [c_match + x + c_off for x in matches] line = re.sub(pat, self.apply_color, line) return matches, line def apply_color(self, m): return c_match + m.group() + c_off return C() def make_fname(self, name): """Make a file name for output""" if name == 0: name = '(standard input)'.encode() else: name = str(name).encode() return name def format_output(self, lines, lnum, options, sep=b':'): """Format lines for output""" # handle -n option, show line number if 'line_number' in options: lines = self.insert_line_number(lines, lnum, sep) # insert file name if necessary if options['with_filename']: lines = self.insert_file_name(lines, self.fname, sep) return lines def write(self, lines): self.ofile.writelines(lines) def write_tty(self, lines): """Write to terminal, flush after every write""" self.ofile.writelines(lines) self.ofile.flush() def on_match(self, matches, line, lnum): self.status = True # handle -o option, show only the matched part if 'only_matching' in self.options: lines = (x + b'\n' for x in matches) else: lines = [line] lines = self.format_output(lines, lnum, self.options) self.write(lines) def on_not_match(self, *args, **kargs): return None def run(self): while True: lines_data = self.read() if not lines_data: break for n, line in lines_data: matches, line = self.matcher.findall(line) if matches: self.on_match(matches, line, n) else: self.on_not_match(matches, line, n) return self.status class GrepWorkerAgg(GrepWorker): def __init__(self, *args, **kargs): super(GrepWorkerAgg, self).__init__(*args, **kargs) self.match_count = 0 def format_output(self, lines, options): """Format lines for output""" # insert file name if necessary if options['with_filename']: lines = self.insert_file_name(lines, self.fname) return lines def on_match(self, matches, line, lnum): self.status = True self.match_count += 1 def run(self): status = super(GrepWorkerAgg, self).run() lines = [str(self.match_count).encode() + b'\n'] lines = self.format_output(lines, self.options) self.write(lines) return status class GrepWorkerFileName(GrepWorker): def on_match(self, matches, line, lnum): raise GrepNameDetermined def run(self): try: super(GrepWorkerFileName, self).run() status = False except GrepNameDetermined: self.write([self.fname + b'\n']) status = True return status class GrepWorkerContext(GrepWorker): def __init__(self, *args, **kargs): super(GrepWorkerContext, self).__init__(*args, **kargs) self.before = self.options.get('before', 0) self.after = self.options.get('after', 0) self.b_buf = [] self.a_counter = 0 self.last_written_lnum = 0 def write_separator(self, lnum): last_lnum = self.last_written_lnum first_lnum = self.b_buf[0][0] if self.b_buf else lnum if last_lnum and first_lnum - last_lnum > 1: self.write([self.sep_line]) def on_match(self, matches, line, lnum): # the 'before' buffer may contain more lines than needed, # truncate it before writing the separator in order not # to interfere the line number calculation. if self.before: self.b_buf = self.b_buf[-self.before:] else: self.b_buf.clear() self.write_separator(lnum) self.write_b_buffer() super(GrepWorkerContext, self).on_match(matches, line, lnum) self.last_written_lnum = lnum self.reset_a_counter() def on_not_match(self, matches, line, lnum): if self.a_counter: if 'only_matching' not in self.options: lines = self.format_output([line], lnum, self.options, b'-') self.write(lines) self.last_written_lnum = lnum self.a_counter -= 1 else: self.b_buf.append((lnum, line)) def reset_a_counter(self): self.a_counter = self.after def write_b_buffer(self): """Write out the 'before' buffer""" if not self.b_buf: return # write only when -o option is not presented, if 'only_matching' not in self.options: for lnum, line in self.b_buf: lines = self.format_output([line], lnum, self.options, b'-') self.write(lines) self.last_written_lnum = self.b_buf[-1][0] self.b_buf.clear() def run(self): bs = self.before while True: self.b_buf = self.b_buf[-bs:] lines_data = self.read() if not lines_data: break for n, line in lines_data: matches, line = self.matcher.findall(line) if matches: self.on_match(matches, line, n) else: self.on_not_match(matches, line, n) return self.status def recursive_walk(worker, names, pattern, options): """Process all regular files, descend into directories. When the -q option is provided, the first match will trigger an exception named GrepStatusDetermined.""" def processor(names, pattern, options, worker): status_list = [] for name in names: if os.path.isfile(name): status = worker(name, pattern, options) status_list.append(status) elif os.path.isdir(name): try: sub_names = os.listdir(name) except Exception as e: print(str(e), file=sys.stderr) status_list.append(False) else: sub_names = [os.path.join(name, x) for x in sub_names] names.extend(sub_names) return status_list return walk(worker, names, pattern, options, processor) def walk(worker, names, pattern, options, processor=None): """Each file shall be a regular file. When the -q option is provided, the first match will trigger an exception named GrepStatusDetermined.""" if not processor: def processor(names, pattern, options, worker): status_list = [] for name in names: status = worker(name, pattern, options) status_list.append(status) return status_list try: status_list = processor(names, pattern, options, worker) except GrepStatusDetermined: status_list = [True] if 'quiet' in options: return any(status_list) else: return all(status_list)
iesugrace/pycmd
lib.py
Python
gpl-3.0
24,434
[ 30522, 12324, 25353, 2015, 12324, 9808, 12324, 2128, 13366, 2529, 1035, 2946, 1035, 2000, 1035, 24880, 1006, 2193, 1007, 1024, 1000, 1000, 1000, 10463, 2193, 1997, 2122, 3197, 2000, 27507, 1010, 8568, 2553, 1024, 1038, 1024, 24406, 21677, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>The Mock Class &mdash; Mock 1.0.1 documentation</title> <link rel="stylesheet" href="_static/nature.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: './', VERSION: '1.0.1', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="Mock 1.0.1 documentation" href="index.html" /> <link rel="next" title="Patch Decorators" href="patch.html" /> <link rel="prev" title="Mock - Mocking and Testing Library" href="index.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="patch.html" title="Patch Decorators" accesskey="N">next</a> |</li> <li class="right" > <a href="index.html" title="Mock - Mocking and Testing Library" accesskey="P">previous</a> |</li> <li><a href="index.html">Mock 1.0.1 documentation</a> &raquo;</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="the-mock-class"> <h1>The Mock Class<a class="headerlink" href="#the-mock-class" title="Permalink to this headline">¶</a></h1> <p><cite>Mock</cite> is a flexible mock object intended to replace the use of stubs and test doubles throughout your code. Mocks are callable and create attributes as new mocks when you access them <a class="footnote-reference" href="#id3" id="id1">[1]</a>. Accessing the same attribute will always return the same mock. Mocks record how you use them, allowing you to make assertions about what your code has done to them.</p> <p><a class="reference internal" href="magicmock.html#mock.MagicMock" title="mock.MagicMock"><tt class="xref py py-class docutils literal"><span class="pre">MagicMock</span></tt></a> is a subclass of <cite>Mock</cite> with all the magic methods pre-created and ready to use. There are also non-callable variants, useful when you are mocking out objects that aren&#8217;t callable: <a class="reference internal" href="#mock.NonCallableMock" title="mock.NonCallableMock"><tt class="xref py py-class docutils literal"><span class="pre">NonCallableMock</span></tt></a> and <a class="reference internal" href="magicmock.html#mock.NonCallableMagicMock" title="mock.NonCallableMagicMock"><tt class="xref py py-class docutils literal"><span class="pre">NonCallableMagicMock</span></tt></a></p> <p>The <a class="reference internal" href="patch.html#mock.patch" title="mock.patch"><tt class="xref py py-func docutils literal"><span class="pre">patch()</span></tt></a> decorators makes it easy to temporarily replace classes in a particular module with a <cite>Mock</cite> object. By default <cite>patch</cite> will create a <cite>MagicMock</cite> for you. You can specify an alternative class of <cite>Mock</cite> using the <cite>new_callable</cite> argument to <cite>patch</cite>.</p> <span class="target" id="index-0"></span><span class="target" id="index-1"></span><span class="target" id="index-2"></span><span class="target" id="index-3"></span><span class="target" id="index-4"></span><dl class="class"> <dt id="mock.Mock"> <em class="property">class </em><tt class="descname">Mock</tt><big>(</big><em>spec=None</em>, <em>side_effect=None</em>, <em>return_value=DEFAULT</em>, <em>wraps=None</em>, <em>name=None</em>, <em>spec_set=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.Mock" title="Permalink to this definition">¶</a></dt> <dd><p>Create a new <cite>Mock</cite> object. <cite>Mock</cite> takes several optional arguments that specify the behaviour of the Mock object:</p> <ul> <li><p class="first"><cite>spec</cite>: This can be either a list of strings or an existing object (a class or instance) that acts as the specification for the mock object. If you pass in an object then a list of strings is formed by calling dir on the object (excluding unsupported magic attributes and methods). Accessing any attribute not in this list will raise an <cite>AttributeError</cite>.</p> <p>If <cite>spec</cite> is an object (rather than a list of strings) then <a class="reference internal" href="#mock.Mock.__class__" title="mock.Mock.__class__"><tt class="xref py py-attr docutils literal"><span class="pre">__class__</span></tt></a> returns the class of the spec object. This allows mocks to pass <cite>isinstance</cite> tests.</p> </li> <li><p class="first"><cite>spec_set</cite>: A stricter variant of <cite>spec</cite>. If used, attempting to <em>set</em> or get an attribute on the mock that isn&#8217;t on the object passed as <cite>spec_set</cite> will raise an <cite>AttributeError</cite>.</p> </li> <li><p class="first"><cite>side_effect</cite>: A function to be called whenever the Mock is called. See the <a class="reference internal" href="#mock.Mock.side_effect" title="mock.Mock.side_effect"><tt class="xref py py-attr docutils literal"><span class="pre">side_effect</span></tt></a> attribute. Useful for raising exceptions or dynamically changing return values. The function is called with the same arguments as the mock, and unless it returns <a class="reference internal" href="sentinel.html#mock.DEFAULT" title="mock.DEFAULT"><tt class="xref py py-data docutils literal"><span class="pre">DEFAULT</span></tt></a>, the return value of this function is used as the return value.</p> <p>Alternatively <cite>side_effect</cite> can be an exception class or instance. In this case the exception will be raised when the mock is called.</p> <p>If <cite>side_effect</cite> is an iterable then each call to the mock will return the next value from the iterable. If any of the members of the iterable are exceptions they will be raised instead of returned.</p> <p>A <cite>side_effect</cite> can be cleared by setting it to <cite>None</cite>.</p> </li> <li><p class="first"><cite>return_value</cite>: The value returned when the mock is called. By default this is a new Mock (created on first access). See the <a class="reference internal" href="#mock.Mock.return_value" title="mock.Mock.return_value"><tt class="xref py py-attr docutils literal"><span class="pre">return_value</span></tt></a> attribute.</p> </li> <li><p class="first"><cite>wraps</cite>: Item for the mock object to wrap. If <cite>wraps</cite> is not None then calling the Mock will pass the call through to the wrapped object (returning the real result and ignoring <cite>return_value</cite>). Attribute access on the mock will return a Mock object that wraps the corresponding attribute of the wrapped object (so attempting to access an attribute that doesn&#8217;t exist will raise an <cite>AttributeError</cite>).</p> <p>If the mock has an explicit <cite>return_value</cite> set then calls are not passed to the wrapped object and the <cite>return_value</cite> is returned instead.</p> </li> <li><p class="first"><cite>name</cite>: If the mock has a name then it will be used in the repr of the mock. This can be useful for debugging. The name is propagated to child mocks.</p> </li> </ul> <p>Mocks can also be called with arbitrary keyword arguments. These will be used to set attributes on the mock after it is created. See the <a class="reference internal" href="#mock.Mock.configure_mock" title="mock.Mock.configure_mock"><tt class="xref py py-meth docutils literal"><span class="pre">configure_mock()</span></tt></a> method for details.</p> <dl class="method"> <dt id="mock.Mock.assert_called_with"> <tt class="descname">assert_called_with</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.Mock.assert_called_with" title="Permalink to this definition">¶</a></dt> <dd><p>This method is a convenient way of asserting that calls are made in a particular way:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">test</span><span class="o">=</span><span class="s">&#39;wow&#39;</span><span class="p">)</span> <span class="go">&lt;Mock name=&#39;mock.method()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="o">.</span><span class="n">assert_called_with</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="n">test</span><span class="o">=</span><span class="s">&#39;wow&#39;</span><span class="p">)</span> </pre></div> </div> </dd></dl> <dl class="method"> <dt id="mock.Mock.assert_called_once_with"> <tt class="descname">assert_called_once_with</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.Mock.assert_called_once_with" title="Permalink to this definition">¶</a></dt> <dd><p>Assert that the mock was called exactly once and with the specified arguments.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">,</span> <span class="n">bar</span><span class="o">=</span><span class="s">&#39;baz&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_called_once_with</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">,</span> <span class="n">bar</span><span class="o">=</span><span class="s">&#39;baz&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">,</span> <span class="n">bar</span><span class="o">=</span><span class="s">&#39;baz&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_called_once_with</span><span class="p">(</span><span class="s">&#39;foo&#39;</span><span class="p">,</span> <span class="n">bar</span><span class="o">=</span><span class="s">&#39;baz&#39;</span><span class="p">)</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">AssertionError</span>: <span class="n">Expected to be called once. Called 2 times.</span> </pre></div> </div> </dd></dl> <dl class="method"> <dt id="mock.Mock.assert_any_call"> <tt class="descname">assert_any_call</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.Mock.assert_any_call" title="Permalink to this definition">¶</a></dt> <dd><p>assert the mock has been called with the specified arguments.</p> <p>The assert passes if the mock has <em>ever</em> been called, unlike <a class="reference internal" href="#mock.Mock.assert_called_with" title="mock.Mock.assert_called_with"><tt class="xref py py-meth docutils literal"><span class="pre">assert_called_with()</span></tt></a> and <a class="reference internal" href="#mock.Mock.assert_called_once_with" title="mock.Mock.assert_called_once_with"><tt class="xref py py-meth docutils literal"><span class="pre">assert_called_once_with()</span></tt></a> that only pass if the call is the most recent one.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">arg</span><span class="o">=</span><span class="s">&#39;thing&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="s">&#39;some&#39;</span><span class="p">,</span> <span class="s">&#39;thing&#39;</span><span class="p">,</span> <span class="s">&#39;else&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_any_call</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="n">arg</span><span class="o">=</span><span class="s">&#39;thing&#39;</span><span class="p">)</span> </pre></div> </div> </dd></dl> <dl class="method"> <dt id="mock.Mock.assert_has_calls"> <tt class="descname">assert_has_calls</tt><big>(</big><em>calls</em>, <em>any_order=False</em><big>)</big><a class="headerlink" href="#mock.Mock.assert_has_calls" title="Permalink to this definition">¶</a></dt> <dd><p>assert the mock has been called with the specified calls. The <cite>mock_calls</cite> list is checked for the calls.</p> <p>If <cite>any_order</cite> is False (the default) then the calls must be sequential. There can be extra calls before or after the specified calls.</p> <p>If <cite>any_order</cite> is True then the calls can be in any order, but they must all appear in <a class="reference internal" href="#mock.Mock.mock_calls" title="mock.Mock.mock_calls"><tt class="xref py py-attr docutils literal"><span class="pre">mock_calls</span></tt></a>.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">calls</span> <span class="o">=</span> <span class="p">[</span><span class="n">call</span><span class="p">(</span><span class="mi">2</span><span class="p">),</span> <span class="n">call</span><span class="p">(</span><span class="mi">3</span><span class="p">)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_has_calls</span><span class="p">(</span><span class="n">calls</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">calls</span> <span class="o">=</span> <span class="p">[</span><span class="n">call</span><span class="p">(</span><span class="mi">4</span><span class="p">),</span> <span class="n">call</span><span class="p">(</span><span class="mi">2</span><span class="p">),</span> <span class="n">call</span><span class="p">(</span><span class="mi">3</span><span class="p">)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_has_calls</span><span class="p">(</span><span class="n">calls</span><span class="p">,</span> <span class="n">any_order</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span> </pre></div> </div> </dd></dl> <dl class="method"> <dt id="mock.Mock.assert_never_called"> <tt class="descname">assert_never_called</tt><big>(</big><big>)</big><a class="headerlink" href="#mock.Mock.assert_never_called" title="Permalink to this definition">¶</a></dt> <dd><p>assert the mock has never been called.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">assert_never_called</span><span class="p">()</span> </pre></div> </div> </dd></dl> <dl class="method"> <dt id="mock.Mock.reset_mock"> <tt class="descname">reset_mock</tt><big>(</big><big>)</big><a class="headerlink" href="#mock.Mock.reset_mock" title="Permalink to this definition">¶</a></dt> <dd><p>The reset_mock method resets all the call attributes on a mock object:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="s">&#39;hello&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">called</span> <span class="go">True</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">reset_mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">called</span> <span class="go">False</span> </pre></div> </div> <p>This can be useful where you want to make a series of assertions that reuse the same object. Note that <cite>reset_mock</cite> <em>doesn&#8217;t</em> clear the return value, <a class="reference internal" href="#mock.Mock.side_effect" title="mock.Mock.side_effect"><tt class="xref py py-attr docutils literal"><span class="pre">side_effect</span></tt></a> or any child attributes you have set using normal assignment. Child mocks and the return value mock (if any) are reset as well.</p> </dd></dl> <dl class="method"> <dt id="mock.Mock.mock_add_spec"> <tt class="descname">mock_add_spec</tt><big>(</big><em>spec</em>, <em>spec_set=False</em><big>)</big><a class="headerlink" href="#mock.Mock.mock_add_spec" title="Permalink to this definition">¶</a></dt> <dd><p>Add a spec to a mock. <cite>spec</cite> can either be an object or a list of strings. Only attributes on the <cite>spec</cite> can be fetched as attributes from the mock.</p> <p>If <cite>spec_set</cite> is <cite>True</cite> then only attributes on the spec can be set.</p> </dd></dl> <dl class="method"> <dt id="mock.Mock.attach_mock"> <tt class="descname">attach_mock</tt><big>(</big><em>mock</em>, <em>attribute</em><big>)</big><a class="headerlink" href="#mock.Mock.attach_mock" title="Permalink to this definition">¶</a></dt> <dd><p>Attach a mock as an attribute of this one, replacing its name and parent. Calls to the attached mock will be recorded in the <a class="reference internal" href="#mock.Mock.method_calls" title="mock.Mock.method_calls"><tt class="xref py py-attr docutils literal"><span class="pre">method_calls</span></tt></a> and <a class="reference internal" href="#mock.Mock.mock_calls" title="mock.Mock.mock_calls"><tt class="xref py py-attr docutils literal"><span class="pre">mock_calls</span></tt></a> attributes of this one.</p> </dd></dl> <dl class="method"> <dt id="mock.Mock.configure_mock"> <tt class="descname">configure_mock</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.Mock.configure_mock" title="Permalink to this definition">¶</a></dt> <dd><p>Set attributes on the mock through keyword arguments.</p> <p>Attributes plus return values and side effects can be set on child mocks using standard dot notation and unpacking a dictionary in the method call:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">attrs</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;method.return_value&#39;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s">&#39;other.side_effect&#39;</span><span class="p">:</span> <span class="ne">KeyError</span><span class="p">}</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">configure_mock</span><span class="p">(</span><span class="o">**</span><span class="n">attrs</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">other</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">KeyError</span> </pre></div> </div> <p>The same thing can be achieved in the constructor call to mocks:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">attrs</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;method.return_value&#39;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s">&#39;other.side_effect&#39;</span><span class="p">:</span> <span class="ne">KeyError</span><span class="p">}</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">some_attribute</span><span class="o">=</span><span class="s">&#39;eggs&#39;</span><span class="p">,</span> <span class="o">**</span><span class="n">attrs</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">some_attribute</span> <span class="go">&#39;eggs&#39;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">other</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">KeyError</span> </pre></div> </div> <p><cite>configure_mock</cite> exists to make it easier to do configuration after the mock has been created.</p> </dd></dl> <dl class="method"> <dt id="mock.Mock.__dir__"> <tt class="descname">__dir__</tt><big>(</big><big>)</big><a class="headerlink" href="#mock.Mock.__dir__" title="Permalink to this definition">¶</a></dt> <dd><p><cite>Mock</cite> objects limit the results of <cite>dir(some_mock)</cite> to useful results. For mocks with a <cite>spec</cite> this includes all the permitted attributes for the mock.</p> <p>See <a class="reference internal" href="helpers.html#mock.FILTER_DIR" title="mock.FILTER_DIR"><tt class="xref py py-data docutils literal"><span class="pre">FILTER_DIR</span></tt></a> for what this filtering does, and how to switch it off.</p> </dd></dl> <dl class="method"> <dt id="mock.Mock._get_child_mock"> <tt class="descname">_get_child_mock</tt><big>(</big><em>**kw</em><big>)</big><a class="headerlink" href="#mock.Mock._get_child_mock" title="Permalink to this definition">¶</a></dt> <dd><p>Create the child mocks for attributes and return value. By default child mocks will be the same type as the parent. Subclasses of Mock may want to override this to customize the way child mocks are made.</p> <p>For non-callable mocks the callable variant will be used (rather than any custom subclass).</p> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.called"> <tt class="descname">called</tt><a class="headerlink" href="#mock.Mock.called" title="Permalink to this definition">¶</a></dt> <dd><p>A boolean representing whether or not the mock object has been called:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">called</span> <span class="go">False</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">called</span> <span class="go">True</span> </pre></div> </div> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.call_count"> <tt class="descname">call_count</tt><a class="headerlink" href="#mock.Mock.call_count" title="Permalink to this definition">¶</a></dt> <dd><p>An integer telling you how many times the mock object has been called:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_count</span> <span class="go">0</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_count</span> <span class="go">2</span> </pre></div> </div> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.return_value"> <tt class="descname">return_value</tt><a class="headerlink" href="#mock.Mock.return_value" title="Permalink to this definition">¶</a></dt> <dd><p>Set this to configure the value returned by calling the mock:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">return_value</span> <span class="o">=</span> <span class="s">&#39;fish&#39;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="go">&#39;fish&#39;</span> </pre></div> </div> <p>The default return value is a mock object and you can configure it in the normal way:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">return_value</span><span class="o">.</span><span class="n">attribute</span> <span class="o">=</span> <span class="n">sentinel</span><span class="o">.</span><span class="n">Attribute</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">return_value</span><span class="p">()</span> <span class="go">&lt;Mock name=&#39;mock()()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">return_value</span><span class="o">.</span><span class="n">assert_called_with</span><span class="p">()</span> </pre></div> </div> <p><cite>return_value</cite> can also be set in the constructor:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">return_value</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="go">3</span> </pre></div> </div> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.side_effect"> <tt class="descname">side_effect</tt><a class="headerlink" href="#mock.Mock.side_effect" title="Permalink to this definition">¶</a></dt> <dd><p>This can either be a function to be called when the mock is called, or an exception (class or instance) to be raised.</p> <p>If you pass in a function it will be called with same arguments as the mock and unless the function returns the <a class="reference internal" href="sentinel.html#mock.DEFAULT" title="mock.DEFAULT"><tt class="xref py py-data docutils literal"><span class="pre">DEFAULT</span></tt></a> singleton the call to the mock will then return whatever the function returns. If the function returns <a class="reference internal" href="sentinel.html#mock.DEFAULT" title="mock.DEFAULT"><tt class="xref py py-data docutils literal"><span class="pre">DEFAULT</span></tt></a> then the mock will return its normal value (from the <a class="reference internal" href="#mock.Mock.return_value" title="mock.Mock.return_value"><tt class="xref py py-attr docutils literal"><span class="pre">return_value</span></tt></a>.</p> <p>An example of a mock that raises an exception (to test exception handling of an API):</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="ne">Exception</span><span class="p">(</span><span class="s">&#39;Boom!&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">Exception</span>: <span class="n">Boom!</span> </pre></div> </div> <p>Using <cite>side_effect</cite> to return a sequence of values:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(),</span> <span class="n">mock</span><span class="p">(),</span> <span class="n">mock</span><span class="p">()</span> <span class="go">(3, 2, 1)</span> </pre></div> </div> <p>The <cite>side_effect</cite> function is called with the same arguments as the mock (so it is wise for it to take arbitrary args and keyword arguments) and whatever it returns is used as the return value for the call. The exception is if <cite>side_effect</cite> returns <a class="reference internal" href="sentinel.html#mock.DEFAULT" title="mock.DEFAULT"><tt class="xref py py-data docutils literal"><span class="pre">DEFAULT</span></tt></a>, in which case the normal <a class="reference internal" href="#mock.Mock.return_value" title="mock.Mock.return_value"><tt class="xref py py-attr docutils literal"><span class="pre">return_value</span></tt></a> is used.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">side_effect</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="n">DEFAULT</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="n">side_effect</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="go">3</span> </pre></div> </div> <p><cite>side_effect</cite> can be set in the constructor. Here&#8217;s an example that adds one to the value the mock is called with and returns it:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">side_effect</span> <span class="o">=</span> <span class="k">lambda</span> <span class="n">value</span><span class="p">:</span> <span class="n">value</span> <span class="o">+</span> <span class="mi">1</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="n">side_effect</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span> <span class="go">4</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="o">-</span><span class="mi">8</span><span class="p">)</span> <span class="go">-7</span> </pre></div> </div> <p>Setting <cite>side_effect</cite> to <cite>None</cite> clears it:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">mock</span> <span class="kn">import</span> <span class="n">Mock</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="ne">KeyError</span><span class="p">,</span> <span class="n">return_value</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">KeyError</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="bp">None</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">3</span> </pre></div> </div> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.call_args"> <tt class="descname">call_args</tt><a class="headerlink" href="#mock.Mock.call_args" title="Permalink to this definition">¶</a></dt> <dd><p>This is either <cite>None</cite> (if the mock hasn&#8217;t been called), or the arguments that the mock was last called with. This will be in the form of a tuple: the first member is any ordered arguments the mock was called with (or an empty tuple) and the second member is any keyword arguments (or an empty dictionary).</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">print</span> <span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="go">None</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="go">call()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="o">==</span> <span class="p">()</span> <span class="go">True</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="go">call(3, 4)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="o">==</span> <span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),)</span> <span class="go">True</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="s">&#39;fish&#39;</span><span class="p">,</span> <span class="nb">next</span><span class="o">=</span><span class="s">&#39;w00t!&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args</span> <span class="go">call(3, 4, 5, key=&#39;fish&#39;, next=&#39;w00t!&#39;)</span> </pre></div> </div> <p><cite>call_args</cite>, along with members of the lists <a class="reference internal" href="#mock.Mock.call_args_list" title="mock.Mock.call_args_list"><tt class="xref py py-attr docutils literal"><span class="pre">call_args_list</span></tt></a>, <a class="reference internal" href="#mock.Mock.method_calls" title="mock.Mock.method_calls"><tt class="xref py py-attr docutils literal"><span class="pre">method_calls</span></tt></a> and <a class="reference internal" href="#mock.Mock.mock_calls" title="mock.Mock.mock_calls"><tt class="xref py py-attr docutils literal"><span class="pre">mock_calls</span></tt></a> are <a class="reference internal" href="helpers.html#mock.call" title="mock.call"><tt class="xref py py-data docutils literal"><span class="pre">call</span></tt></a> objects. These are tuples, so they can be unpacked to get at the individual arguments and make more complex assertions. See <a class="reference internal" href="helpers.html#calls-as-tuples"><em>calls as tuples</em></a>.</p> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.call_args_list"> <tt class="descname">call_args_list</tt><a class="headerlink" href="#mock.Mock.call_args_list" title="Permalink to this definition">¶</a></dt> <dd><p>This is a list of all the calls made to the mock object in sequence (so the length of the list is the number of times it has been called). Before any calls have been made it is an empty list. The <a class="reference internal" href="helpers.html#mock.call" title="mock.call"><tt class="xref py py-data docutils literal"><span class="pre">call</span></tt></a> object can be used for conveniently constructing lists of calls to compare with <cite>call_args_list</cite>.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="s">&#39;fish&#39;</span><span class="p">,</span> <span class="nb">next</span><span class="o">=</span><span class="s">&#39;w00t!&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args_list</span> <span class="go">[call(), call(3, 4), call(key=&#39;fish&#39;, next=&#39;w00t!&#39;)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">expected</span> <span class="o">=</span> <span class="p">[(),</span> <span class="p">((</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">),),</span> <span class="p">({</span><span class="s">&#39;key&#39;</span><span class="p">:</span> <span class="s">&#39;fish&#39;</span><span class="p">,</span> <span class="s">&#39;next&#39;</span><span class="p">:</span> <span class="s">&#39;w00t!&#39;</span><span class="p">},)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">call_args_list</span> <span class="o">==</span> <span class="n">expected</span> <span class="go">True</span> </pre></div> </div> <p>Members of <cite>call_args_list</cite> are <a class="reference internal" href="helpers.html#mock.call" title="mock.call"><tt class="xref py py-data docutils literal"><span class="pre">call</span></tt></a> objects. These can be unpacked as tuples to get at the individual arguments. See <a class="reference internal" href="helpers.html#calls-as-tuples"><em>calls as tuples</em></a>.</p> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.method_calls"> <tt class="descname">method_calls</tt><a class="headerlink" href="#mock.Mock.method_calls" title="Permalink to this definition">¶</a></dt> <dd><p>As well as tracking calls to themselves, mocks also track calls to methods and attributes, and <em>their</em> methods and attributes:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="p">()</span> <span class="go">&lt;Mock name=&#39;mock.method()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">property</span><span class="o">.</span><span class="n">method</span><span class="o">.</span><span class="n">attribute</span><span class="p">()</span> <span class="go">&lt;Mock name=&#39;mock.property.method.attribute()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method_calls</span> <span class="go">[call.method(), call.property.method.attribute()]</span> </pre></div> </div> <p>Members of <cite>method_calls</cite> are <a class="reference internal" href="helpers.html#mock.call" title="mock.call"><tt class="xref py py-data docutils literal"><span class="pre">call</span></tt></a> objects. These can be unpacked as tuples to get at the individual arguments. See <a class="reference internal" href="helpers.html#calls-as-tuples"><em>calls as tuples</em></a>.</p> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.mock_calls"> <tt class="descname">mock_calls</tt><a class="headerlink" href="#mock.Mock.mock_calls" title="Permalink to this definition">¶</a></dt> <dd><p><cite>mock_calls</cite> records <em>all</em> calls to the mock object, its methods, magic methods <em>and</em> return value mocks.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="n">mock</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">first</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="go">&lt;MagicMock name=&#39;mock.first()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">second</span><span class="p">()</span> <span class="go">&lt;MagicMock name=&#39;mock.second()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">int</span><span class="p">(</span><span class="n">mock</span><span class="p">)</span> <span class="go">1</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">result</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="go">&lt;MagicMock name=&#39;mock()()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">expected</span> <span class="o">=</span> <span class="p">[</span><span class="n">call</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">call</span><span class="o">.</span><span class="n">first</span><span class="p">(</span><span class="n">a</span><span class="o">=</span><span class="mi">3</span><span class="p">),</span> <span class="n">call</span><span class="o">.</span><span class="n">second</span><span class="p">(),</span> <span class="gp">... </span><span class="n">call</span><span class="o">.</span><span class="n">__int__</span><span class="p">(),</span> <span class="n">call</span><span class="p">()(</span><span class="mi">1</span><span class="p">)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">mock_calls</span> <span class="o">==</span> <span class="n">expected</span> <span class="go">True</span> </pre></div> </div> <p>Members of <cite>mock_calls</cite> are <a class="reference internal" href="helpers.html#mock.call" title="mock.call"><tt class="xref py py-data docutils literal"><span class="pre">call</span></tt></a> objects. These can be unpacked as tuples to get at the individual arguments. See <a class="reference internal" href="helpers.html#calls-as-tuples"><em>calls as tuples</em></a>.</p> </dd></dl> <dl class="attribute"> <dt id="mock.Mock.__class__"> <tt class="descname">__class__</tt><a class="headerlink" href="#mock.Mock.__class__" title="Permalink to this definition">¶</a></dt> <dd><p>Normally the <cite>__class__</cite> attribute of an object will return its type. For a mock object with a <cite>spec</cite> <cite>__class__</cite> returns the spec class instead. This allows mock objects to pass <cite>isinstance</cite> tests for the object they are replacing / masquerading as:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">spec</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">isinstance</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span> <span class="go">True</span> </pre></div> </div> <p><cite>__class__</cite> is assignable to, this allows a mock to pass an <cite>isinstance</cite> check without forcing you to use a spec:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">__class__</span> <span class="o">=</span> <span class="nb">dict</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">isinstance</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="nb">dict</span><span class="p">)</span> <span class="go">True</span> </pre></div> </div> </dd></dl> </dd></dl> <dl class="class"> <dt id="mock.NonCallableMock"> <em class="property">class </em><tt class="descname">NonCallableMock</tt><big>(</big><em>spec=None</em>, <em>wraps=None</em>, <em>name=None</em>, <em>spec_set=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.NonCallableMock" title="Permalink to this definition">¶</a></dt> <dd><p>A non-callable version of <cite>Mock</cite>. The constructor parameters have the same meaning of <cite>Mock</cite>, with the exception of <cite>return_value</cite> and <cite>side_effect</cite> which have no meaning on a non-callable mock.</p> </dd></dl> <p>Mock objects that use a class or an instance as a <cite>spec</cite> or <cite>spec_set</cite> are able to pass <cite>isintance</cite> tests:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">spec</span><span class="o">=</span><span class="n">SomeClass</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">isinstance</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="n">SomeClass</span><span class="p">)</span> <span class="go">True</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">spec_set</span><span class="o">=</span><span class="n">SomeClass</span><span class="p">())</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">isinstance</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="n">SomeClass</span><span class="p">)</span> <span class="go">True</span> </pre></div> </div> <p>The <cite>Mock</cite> classes have support for mocking magic methods. See <a class="reference internal" href="magicmock.html#magic-methods"><em>magic methods</em></a> for the full details.</p> <p>The mock classes and the <a class="reference internal" href="patch.html#mock.patch" title="mock.patch"><tt class="xref py py-func docutils literal"><span class="pre">patch()</span></tt></a> decorators all take arbitrary keyword arguments for configuration. For the <cite>patch</cite> decorators the keywords are passed to the constructor of the mock being created. The keyword arguments are for configuring attributes of the mock:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">attribute</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">other</span><span class="o">=</span><span class="s">&#39;fish&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">attribute</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">other</span> <span class="go">&#39;fish&#39;</span> </pre></div> </div> <p>The return value and side effect of child mocks can be set in the same way, using dotted notation. As you can&#8217;t use dotted names directly in a call you have to create a dictionary and unpack it using <cite>**</cite>:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">attrs</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;method.return_value&#39;</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> <span class="s">&#39;other.side_effect&#39;</span><span class="p">:</span> <span class="ne">KeyError</span><span class="p">}</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">Mock</span><span class="p">(</span><span class="n">some_attribute</span><span class="o">=</span><span class="s">&#39;eggs&#39;</span><span class="p">,</span> <span class="o">**</span><span class="n">attrs</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">some_attribute</span> <span class="go">&#39;eggs&#39;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">method</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">other</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">KeyError</span> </pre></div> </div> <dl class="class"> <dt id="mock.PropertyMock"> <em class="property">class </em><tt class="descname">PropertyMock</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#mock.PropertyMock" title="Permalink to this definition">¶</a></dt> <dd><p>A mock intended to be used as a property, or other descriptor, on a class. <cite>PropertyMock</cite> provides <cite>__get__</cite> and <cite>__set__</cite> methods so you can specify a return value when it is fetched.</p> <p>Fetching a <cite>PropertyMock</cite> instance from an object calls the mock, with no args. Setting it calls the mock with the value being set.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">class</span> <span class="nc">Foo</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span> <span class="gp">... </span> <span class="nd">@property</span> <span class="gp">... </span> <span class="k">def</span> <span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="s">&#39;something&#39;</span> <span class="gp">... </span> <span class="nd">@foo.setter</span> <span class="gp">... </span> <span class="k">def</span> <span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span> <span class="gp">... </span> <span class="k">pass</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">with</span> <span class="n">patch</span><span class="p">(</span><span class="s">&#39;__main__.Foo.foo&#39;</span><span class="p">,</span> <span class="n">new_callable</span><span class="o">=</span><span class="n">PropertyMock</span><span class="p">)</span> <span class="k">as</span> <span class="n">mock_foo</span><span class="p">:</span> <span class="gp">... </span> <span class="n">mock_foo</span><span class="o">.</span><span class="n">return_value</span> <span class="o">=</span> <span class="s">&#39;mockity-mock&#39;</span> <span class="gp">... </span> <span class="n">this_foo</span> <span class="o">=</span> <span class="n">Foo</span><span class="p">()</span> <span class="gp">... </span> <span class="k">print</span> <span class="n">this_foo</span><span class="o">.</span><span class="n">foo</span> <span class="gp">... </span> <span class="n">this_foo</span><span class="o">.</span><span class="n">foo</span> <span class="o">=</span> <span class="mi">6</span> <span class="gp">...</span> <span class="go">mockity-mock</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock_foo</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call(), call(6)]</span> </pre></div> </div> </dd></dl> <p>Because of the way mock attributes are stored you can&#8217;t directly attach a <cite>PropertyMock</cite> to a mock object. Instead you can attach it to the mock type object:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">PropertyMock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="mi">3</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">type</span><span class="p">(</span><span class="n">m</span><span class="p">)</span><span class="o">.</span><span class="n">foo</span> <span class="o">=</span> <span class="n">p</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">foo</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">assert_called_once_with</span><span class="p">()</span> </pre></div> </div> <span class="target" id="index-5"></span></div> <div class="section" id="calling"> <span id="index-6"></span><h1>Calling<a class="headerlink" href="#calling" title="Permalink to this headline">¶</a></h1> <p>Mock objects are callable. The call will return the value set as the <a class="reference internal" href="#mock.Mock.return_value" title="mock.Mock.return_value"><tt class="xref py py-attr docutils literal"><span class="pre">return_value</span></tt></a> attribute. The default return value is a new Mock object; it is created the first time the return value is accessed (either explicitly or by calling the Mock) - but it is stored and the same one returned each time.</p> <p>Calls made to the object will be recorded in the attributes like <a class="reference internal" href="#mock.Mock.call_args" title="mock.Mock.call_args"><tt class="xref py py-attr docutils literal"><span class="pre">call_args</span></tt></a> and <a class="reference internal" href="#mock.Mock.call_args_list" title="mock.Mock.call_args_list"><tt class="xref py py-attr docutils literal"><span class="pre">call_args_list</span></tt></a>.</p> <p>If <a class="reference internal" href="#mock.Mock.side_effect" title="mock.Mock.side_effect"><tt class="xref py py-attr docutils literal"><span class="pre">side_effect</span></tt></a> is set then it will be called after the call has been recorded, so if <cite>side_effect</cite> raises an exception the call is still recorded.</p> <p>The simplest way to make a mock raise an exception when called is to make <a class="reference internal" href="#mock.Mock.side_effect" title="mock.Mock.side_effect"><tt class="xref py py-attr docutils literal"><span class="pre">side_effect</span></tt></a> an exception class or instance:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="ne">IndexError</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">IndexError</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call(1, 2, 3)]</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="ne">KeyError</span><span class="p">(</span><span class="s">&#39;Bang!&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">(</span><span class="s">&#39;two&#39;</span><span class="p">,</span> <span class="s">&#39;three&#39;</span><span class="p">,</span> <span class="s">&#39;four&#39;</span><span class="p">)</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">KeyError</span>: <span class="n">&#39;Bang!&#39;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call(1, 2, 3), call(&#39;two&#39;, &#39;three&#39;, &#39;four&#39;)]</span> </pre></div> </div> <p>If <cite>side_effect</cite> is a function then whatever that function returns is what calls to the mock return. The <cite>side_effect</cite> function is called with the same arguments as the mock. This allows you to vary the return value of the call dynamically, based on the input:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">side_effect</span><span class="p">(</span><span class="n">value</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="n">value</span> <span class="o">+</span> <span class="mi">1</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="n">side_effect</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="go">2</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call(1), call(2)]</span> </pre></div> </div> <p>If you want the mock to still return the default return value (a new mock), or any set return value, then there are two ways of doing this. Either return <cite>mock.return_value</cite> from inside <cite>side_effect</cite>, or return <a class="reference internal" href="sentinel.html#mock.DEFAULT" title="mock.DEFAULT"><tt class="xref py py-data docutils literal"><span class="pre">DEFAULT</span></tt></a>:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">side_effect</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="n">m</span><span class="o">.</span><span class="n">return_value</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="n">side_effect</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">return_value</span> <span class="o">=</span> <span class="mi">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">side_effect</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="n">DEFAULT</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="n">side_effect</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">3</span> </pre></div> </div> <p>To remove a <cite>side_effect</cite>, and return to the default behaviour, set the <cite>side_effect</cite> to <cite>None</cite>:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="mi">6</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">side_effect</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="gp">... </span> <span class="k">return</span> <span class="mi">3</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="n">side_effect</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="o">.</span><span class="n">side_effect</span> <span class="o">=</span> <span class="bp">None</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">6</span> </pre></div> </div> <p>The <cite>side_effect</cite> can also be any iterable object. Repeated calls to the mock will return values from the iterable (until the iterable is exhausted and a <cite>StopIteration</cite> is raised):</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">1</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">2</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">3</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">StopIteration</span> </pre></div> </div> <p>If any members of the iterable are exceptions they will be raised instead of returned:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">iterable</span> <span class="o">=</span> <span class="p">(</span><span class="mi">33</span><span class="p">,</span> <span class="ne">ValueError</span><span class="p">,</span> <span class="mi">66</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">side_effect</span><span class="o">=</span><span class="n">iterable</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">33</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="gt">Traceback (most recent call last):</span> <span class="c">...</span> <span class="gr">ValueError</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">m</span><span class="p">()</span> <span class="go">66</span> </pre></div> </div> </div> <div class="section" id="deleting-attributes"> <span id="id2"></span><h1>Deleting Attributes<a class="headerlink" href="#deleting-attributes" title="Permalink to this headline">¶</a></h1> <p>Mock objects create attributes on demand. This allows them to pretend to be objects of any type.</p> <p>You may want a mock object to return <cite>False</cite> to a <cite>hasattr</cite> call, or raise an <cite>AttributeError</cite> when an attribute is fetched. You can do this by providing an object as a <cite>spec</cite> for a mock, but that isn&#8217;t always convenient.</p> <p>You &#8220;block&#8221; attributes by deleting them. Once deleted, accessing an attribute will raise an <cite>AttributeError</cite>.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">hasattr</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="s">&#39;m&#39;</span><span class="p">)</span> <span class="go">True</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">del</span> <span class="n">mock</span><span class="o">.</span><span class="n">m</span> <span class="gp">&gt;&gt;&gt; </span><span class="nb">hasattr</span><span class="p">(</span><span class="n">mock</span><span class="p">,</span> <span class="s">&#39;m&#39;</span><span class="p">)</span> <span class="go">False</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">del</span> <span class="n">mock</span><span class="o">.</span><span class="n">f</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">f</span> <span class="gt">Traceback (most recent call last):</span> <span class="o">...</span> <span class="gr">AttributeError</span>: <span class="n">f</span> </pre></div> </div> </div> <div class="section" id="mock-names-and-the-name-attribute"> <h1>Mock names and the name attribute<a class="headerlink" href="#mock-names-and-the-name-attribute" title="Permalink to this headline">¶</a></h1> <p>Since &#8220;name&#8221; is an argument to the <a class="reference internal" href="#mock.Mock" title="mock.Mock"><tt class="xref py py-class docutils literal"><span class="pre">Mock</span></tt></a> constructor, if you want your mock object to have a &#8220;name&#8221; attribute you can&#8217;t just pass it in at creation time. There are two alternatives. One option is to use <a class="reference internal" href="#mock.Mock.configure_mock" title="mock.Mock.configure_mock"><tt class="xref py py-meth docutils literal"><span class="pre">configure_mock()</span></tt></a>:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">configure_mock</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;my_name&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">name</span> <span class="go">&#39;my_name&#39;</span> </pre></div> </div> <p>A simpler option is to simply set the &#8220;name&#8221; attribute after mock creation:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s">&quot;foo&quot;</span> </pre></div> </div> </div> <div class="section" id="attaching-mocks-as-attributes"> <h1>Attaching Mocks as Attributes<a class="headerlink" href="#attaching-mocks-as-attributes" title="Permalink to this headline">¶</a></h1> <p>When you attach a mock as an attribute of another mock (or as the return value) it becomes a &#8220;child&#8221; of that mock. Calls to the child are recorded in the <a class="reference internal" href="#mock.Mock.method_calls" title="mock.Mock.method_calls"><tt class="xref py py-attr docutils literal"><span class="pre">method_calls</span></tt></a> and <a class="reference internal" href="#mock.Mock.mock_calls" title="mock.Mock.mock_calls"><tt class="xref py py-attr docutils literal"><span class="pre">mock_calls</span></tt></a> attributes of the parent. This is useful for configuring child mocks and then attaching them to the parent, or for attaching mocks to a parent that records all calls to the children and allows you to make assertions about the order of calls between mocks:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">child1</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">child2</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span><span class="o">.</span><span class="n">child1</span> <span class="o">=</span> <span class="n">child1</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span><span class="o">.</span><span class="n">child2</span> <span class="o">=</span> <span class="n">child2</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">child1</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">child2</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call.child1(1), call.child2(2)]</span> </pre></div> </div> <p>The exception to this is if the mock has a name. This allows you to prevent the &#8220;parenting&#8221; if for some reason you don&#8217;t want it to happen.</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">not_a_child</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;not-a-child&#39;</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">attribute</span> <span class="o">=</span> <span class="n">not_a_child</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">attribute</span><span class="p">()</span> <span class="go">&lt;MagicMock name=&#39;not-a-child()&#39; id=&#39;...&#39;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">mock</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[]</span> </pre></div> </div> <p>Mocks created for you by <a class="reference internal" href="patch.html#mock.patch" title="mock.patch"><tt class="xref py py-func docutils literal"><span class="pre">patch()</span></tt></a> are automatically given names. To attach mocks that have names to a parent you use the <a class="reference internal" href="#mock.Mock.attach_mock" title="mock.Mock.attach_mock"><tt class="xref py py-meth docutils literal"><span class="pre">attach_mock()</span></tt></a> method:</p> <div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">thing1</span> <span class="o">=</span> <span class="nb">object</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">thing2</span> <span class="o">=</span> <span class="nb">object</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span> <span class="o">=</span> <span class="n">MagicMock</span><span class="p">()</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">with</span> <span class="n">patch</span><span class="p">(</span><span class="s">&#39;__main__.thing1&#39;</span><span class="p">,</span> <span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="k">as</span> <span class="n">child1</span><span class="p">:</span> <span class="gp">... </span> <span class="k">with</span> <span class="n">patch</span><span class="p">(</span><span class="s">&#39;__main__.thing2&#39;</span><span class="p">,</span> <span class="n">return_value</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span> <span class="k">as</span> <span class="n">child2</span><span class="p">:</span> <span class="gp">... </span> <span class="n">parent</span><span class="o">.</span><span class="n">attach_mock</span><span class="p">(</span><span class="n">child1</span><span class="p">,</span> <span class="s">&#39;child1&#39;</span><span class="p">)</span> <span class="gp">... </span> <span class="n">parent</span><span class="o">.</span><span class="n">attach_mock</span><span class="p">(</span><span class="n">child2</span><span class="p">,</span> <span class="s">&#39;child2&#39;</span><span class="p">)</span> <span class="gp">... </span> <span class="n">child1</span><span class="p">(</span><span class="s">&#39;one&#39;</span><span class="p">)</span> <span class="gp">... </span> <span class="n">child2</span><span class="p">(</span><span class="s">&#39;two&#39;</span><span class="p">)</span> <span class="gp">...</span> <span class="gp">&gt;&gt;&gt; </span><span class="n">parent</span><span class="o">.</span><span class="n">mock_calls</span> <span class="go">[call.child1(&#39;one&#39;), call.child2(&#39;two&#39;)]</span> </pre></div> </div> <hr class="docutils" /> <table class="docutils footnote" frame="void" id="id3" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>The only exceptions are magic methods and attributes (those that have leading and trailing double underscores). Mock doesn&#8217;t create these but instead of raises an <tt class="docutils literal"><span class="pre">AttributeError</span></tt>. This is because the interpreter will often implicitly request these methods, and gets <em>very</em> confused to get a new Mock object when it expects a magic method. If you need magic method support see <a class="reference internal" href="magicmock.html#magic-methods"><em>magic methods</em></a>.</td></tr> </tbody> </table> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">The Mock Class</a></li> <li><a class="reference internal" href="#calling">Calling</a></li> <li><a class="reference internal" href="#deleting-attributes">Deleting Attributes</a></li> <li><a class="reference internal" href="#mock-names-and-the-name-attribute">Mock names and the name attribute</a></li> <li><a class="reference internal" href="#attaching-mocks-as-attributes">Attaching Mocks as Attributes</a></li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="index.html" title="previous chapter">Mock - Mocking and Testing Library</a></p> <h4>Next topic</h4> <p class="topless"><a href="patch.html" title="next chapter">Patch Decorators</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/mock.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="patch.html" title="Patch Decorators" >next</a> |</li> <li class="right" > <a href="index.html" title="Mock - Mocking and Testing Library" >previous</a> |</li> <li><a href="index.html">Mock 1.0.1 documentation</a> &raquo;</li> </ul> </div> <div class="footer"> &copy; Copyright 2007-2012, Michael Foord &amp; the mock team. Last updated on Aug 30, 2013. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1. </div> </body> </html>
hiisi13/python-mock
html/html/mock.html
HTML
bsd-2-clause
84,092
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 1060, 11039, 19968, 1015, 1012, 1014, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// // Created by Guillaume LAROYENNE on 06/11/16. // #ifndef PROJETALGOC_QUEUE_H #define PROJETALGOC_QUEUE_H typedef struct queue { void **elements; int nbElements; } queue_t; queue_t *createQueue(); void *poll(queue_t *q); void offer(queue_t *q, void *n); int isEmpty(queue_t *q); void clear(queue_t *queue); void free_queue(queue_t *queue); #endif //PROJETALGOC_QUEUE_H
LaroyenneG/Diamond
lib/queue.h
C
gpl-3.0
390
[ 30522, 1013, 1013, 1013, 1013, 2580, 2011, 20061, 2474, 13238, 24336, 2006, 5757, 1013, 2340, 1013, 2385, 1012, 1013, 1013, 1001, 2065, 13629, 2546, 4013, 15759, 2389, 3995, 2278, 1035, 24240, 1035, 1044, 1001, 9375, 4013, 15759, 2389, 3995...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
name0_1_1_0_0_2_0 = None name0_1_1_0_0_2_1 = None name0_1_1_0_0_2_2 = None name0_1_1_0_0_2_3 = None name0_1_1_0_0_2_4 = None
siosio/intellij-community
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_1/_pkg0_1_1/_pkg0_1_1_0/_pkg0_1_1_0_0/_mod0_1_1_0_0_2.py
Python
apache-2.0
128
[ 30522, 2171, 2692, 1035, 1015, 1035, 1015, 1035, 1014, 1035, 1014, 1035, 1016, 1035, 1014, 1027, 3904, 2171, 2692, 1035, 1015, 1035, 1015, 1035, 1014, 1035, 1014, 1035, 1016, 1035, 1015, 1027, 3904, 2171, 2692, 1035, 1015, 1035, 1015, 103...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
require 'sprockets/autoload' require 'sprockets/path_utils' module Sprockets class BabelProcessor VERSION = '1' def self.instance @instance ||= new end def self.call(input) instance.call(input) end def initialize(options = {}) @options = options.merge({ 'blacklist' => (options['blacklist'] || []) + ['useStrict'], 'sourceMap' => false }).freeze @cache_key = [ self.class.name, Autoload::Babel::Transpiler::VERSION, Autoload::Babel::Source::VERSION, VERSION, @options ].freeze end def call(input) data = input[:data] result = input[:cache].fetch(@cache_key + [data]) do Autoload::Babel::Transpiler.transform(data, @options.merge( 'sourceRoot' => input[:load_path], 'moduleRoot' => '', 'filename' => input[:filename], 'filenameRelative' => PathUtils.split_subpath(input[:load_path], input[:filename]) )) end result['code'] end end end
Andreis13/sprockets
lib/sprockets/babel_processor.rb
Ruby
mit
1,054
[ 30522, 5478, 1005, 11867, 16901, 8454, 1013, 8285, 11066, 1005, 5478, 1005, 11867, 16901, 8454, 1013, 4130, 1035, 21183, 12146, 1005, 11336, 11867, 16901, 8454, 2465, 11561, 14277, 3217, 9623, 21748, 2544, 1027, 1005, 1015, 1005, 13366, 2969,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -*- coding: utf-8 -*- ############################################################################### # # InitializeOAuth # Generates an authorization URL that an application can use to complete the first step in the OAuth process. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific # language governing permissions and limitations under the License. # # ############################################################################### from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class InitializeOAuth(Choreography): def __init__(self, temboo_session): """ Create a new instance of the InitializeOAuth Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. """ super(InitializeOAuth, self).__init__(temboo_session, '/Library/Bitly/OAuth/InitializeOAuth') def new_input_set(self): return InitializeOAuthInputSet() def _make_result_set(self, result, path): return InitializeOAuthResultSet(result, path) def _make_execution(self, session, exec_id, path): return InitializeOAuthChoreographyExecution(session, exec_id, path) class InitializeOAuthInputSet(InputSet): """ An InputSet with methods appropriate for specifying the inputs to the InitializeOAuth Choreo. The InputSet object is used to specify input parameters when executing this Choreo. """ def set_AccountName(self, value): """ Set the value of the AccountName input for this Choreo. ((optional, string) Deprecated (retained for backward compatibility only).) """ super(InitializeOAuthInputSet, self)._set_input('AccountName', value) def set_AppKeyName(self, value): """ Set the value of the AppKeyName input for this Choreo. ((optional, string) Deprecated (retained for backward compatibility only).) """ super(InitializeOAuthInputSet, self)._set_input('AppKeyName', value) def set_AppKeyValue(self, value): """ Set the value of the AppKeyValue input for this Choreo. ((optional, string) Deprecated (retained for backward compatibility only).) """ super(InitializeOAuthInputSet, self)._set_input('AppKeyValue', value) def set_ClientID(self, value): """ Set the value of the ClientID input for this Choreo. ((required, string) The Client ID provided by Bitly after registering your application.) """ super(InitializeOAuthInputSet, self)._set_input('ClientID', value) def set_CustomCallbackID(self, value): """ Set the value of the CustomCallbackID input for this Choreo. ((optional, string) A unique identifier that you can pass to eliminate the need to wait for a Temboo generated CallbackID. Callback identifiers may only contain numbers, letters, periods, and hyphens.) """ super(InitializeOAuthInputSet, self)._set_input('CustomCallbackID', value) def set_ForwardingURL(self, value): """ Set the value of the ForwardingURL input for this Choreo. ((optional, string) The URL that Temboo will redirect your users to after they grant access to your application. This should include the "https://" or "http://" prefix and be a fully qualified URL.) """ super(InitializeOAuthInputSet, self)._set_input('ForwardingURL', value) class InitializeOAuthResultSet(ResultSet): """ A ResultSet with methods tailored to the values returned by the InitializeOAuth Choreo. The ResultSet object is used to retrieve the results of a Choreo execution. """ def getJSONFromString(self, str): return json.loads(str) def get_AuthorizationURL(self): """ Retrieve the value for the "AuthorizationURL" output from this Choreo execution. ((string) The authorization URL that the application's user needs to go to in order to grant access to your application.) """ return self._output.get('AuthorizationURL', None) def get_CallbackID(self): """ Retrieve the value for the "CallbackID" output from this Choreo execution. ((string) An ID used to retrieve the callback data that Temboo stores once your application's user authorizes.) """ return self._output.get('CallbackID', None) class InitializeOAuthChoreographyExecution(ChoreographyExecution): def _make_result_set(self, response, path): return InitializeOAuthResultSet(response, path)
jordanemedlock/psychtruths
temboo/core/Library/Bitly/OAuth/InitializeOAuth.py
Python
apache-2.0
5,111
[ 30522, 1001, 1011, 1008, 1011, 16861, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1001, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2016 Pikkpoiss Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package animation import ( "time" ) type GroupedAnimation struct { animators []Animator callback AnimatorCallback } func NewGroupedAnimation(animators []Animator) *GroupedAnimation { return &GroupedAnimation{animators, nil} } func (a *GroupedAnimation) SetCallback(callback AnimatorCallback) { a.callback = callback } func (a *GroupedAnimation) IsDone() bool { var done = true for _, animator := range a.animators { if !animator.IsDone() { done = false } } return done } func (a *GroupedAnimation) Update(elapsed time.Duration) time.Duration { var ( total time.Duration remainder time.Duration done = true ) for _, animator := range a.animators { remainder = animator.Update(elapsed) if !animator.IsDone() { done = false } if remainder != 0 && (total == 0 || remainder < total) { total = remainder // Take the smallest nonzero remainder. } } if done { if a.callback != nil { a.callback() } return total } return 0 } func (a *GroupedAnimation) Reset() { for _, animator := range a.animators { animator.Reset() } } func (a *GroupedAnimation) Delete() { for _, animator := range a.animators { animator.Delete() } a.animators = []Animator{} }
pikkpoiss/animation
v1/animation/grouped_animation.go
GO
apache-2.0
1,815
[ 30522, 1013, 1013, 9385, 2355, 14255, 19658, 6873, 14643, 6048, 1013, 1013, 1013, 1013, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1013, 1013, 2017, 2089, 2025, 2224, 2023, 5371, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#!/bin/sh ### BEGIN INIT INFO # Provides: myservice # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Put a short description of the service here # Description: Put a long description of the service here ### END INIT INFO # Change the next 3 lines to suit where you install your script and what you want to call it DIR=/home/pi/Work/LIFX/lifx_circ DAEMON=$DIR/lifx_bg.py DAEMON_NAME=lifx_bg # Add any command line options for your daemon here DAEMON_OPTS="" # This next line determines what user the script runs as. # Root generally not recommended but necessary if you are using the Raspberry Pi GPIO from Python. DAEMON_USER=pi # The process ID of the script when it runs is stored here: PIDFILE=/var/run/$DAEMON_NAME.pid . /lib/lsb/init-functions do_start () { log_daemon_msg "Starting system $DAEMON_NAME daemon" start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS log_end_msg $? } do_stop () { log_daemon_msg "Stopping system $DAEMON_NAME daemon" start-stop-daemon --stop --pidfile $PIDFILE --retry 10 log_end_msg $? } case "$1" in start|stop) do_${1} ;; restart|reload|force-reload) do_stop do_start ;; status) status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" exit 1 ;; esac exit 0
ancillarymagnet/lifx_circ
lifx_service.sh
Shell
mit
1,623
[ 30522, 1001, 999, 1013, 8026, 1013, 14021, 1001, 1001, 1001, 4088, 1999, 4183, 18558, 1001, 3640, 1024, 2026, 8043, 7903, 2063, 1001, 3223, 1011, 2707, 1024, 1002, 6556, 1035, 1042, 2015, 1002, 25353, 14540, 8649, 1001, 3223, 1011, 2644, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Text level 3 Test: U+2003 at the end of line with white-space:break-spaces</title> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="match" href="reference/trailing-other-space-separators-break-spaces-002-ref.html"> <meta name="assert" content="U+2003 at the end of the line must not hang or be discarded if white-space is break-spaces. It thus keeps its usual line breaking properties, as defined in UAX14."> <meta name="flags" content="should"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> div { white-space: break-spaces; font-size: 10px; line-height: 1; width: 2em; } section { font-family: Ahem; float: left; margin: 0 1em; color: blue; } .ref { color: orange; } .ref div { white-space: pre; } </style> <p>Test passes if the orange and blue parts of this page are identical. <!-- * There is no line breaking opportunity between two "x" * There is a line breaking opportunity between two "あ" * There is a line breaking opportunity after "x" or "あ" unless suppressed by the next character (BA, GL). * There is a line breaking opportunity before "x" or "あ" unless suppressed by the previous character (BB, GL). --> <section class=ref> <div>xx&#x2003;<br>あ<br>あ&#x2003;<br>あ<br>あ&#x2003;<br>xx</div><!-- BA, tailorable --> </section> <section> <div>xx&#x2003;ああ&#x2003;ああ&#x2003;xx</div> </section>
scheib/chromium
third_party/blink/web_tests/external/wpt/css/css-text/white-space/trailing-other-space-separators-break-spaces-005.html
HTML
bsd-3-clause
1,557
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 2516, 1028, 20116, 2015, 3793, 2504, 1017, 3231, 1024, 1057, 1009, 2494, 2012, 1996, 2203, 1997, 2240, 2007, 2317,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * * @package phpBB Extension - tas2580 dejure * @copyright (c) 2014 tas2580 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 * */ if (!defined('IN_PHPBB')) { exit; } if (empty($lang) || !is_array($lang)) { $lang = array(); } $lang = array_merge($lang, array( 'ACP_DEJURE_TITLE' => 'dejure.org', 'ACP_DEJURE_EXPLAIN' => '', 'ACP_LINK_STYLE' => 'Link Stil', 'ACP_LINK_STYLE_EXPLAIN' => 'schmal: nur die Nummern der Vorschriften verlinken.<br>weit: möglichst lange Verlinkung', 'ACP_CLASS' => 'CSS Klasse', 'ACP_TARGET' => 'Link Target', 'ACP_TARGET_EXPLAIN' => 'Target für die Links, zum Beispiel für öffnen in neuem Fenster: "_blank"', 'ACP_CLASS_EXPLAIN' => 'Falls die Links zu dejure.org anders gestaltet werden sollen.', 'ACP_BUZER' => 'buzer', 'ACP_BUZER_EXPLAIN' => 'Zu http://buzer.de verlinken für Gesetze, die bei dejure.org nicht vorhanden sind.', 'ACP_CACHE_TIME' => 'Cache Zeit', 'ACP_CACHE_TIME_EXPLAIN' => 'In Tagen. Wie lange die Texte im Cache vorgehalten werden soll, bevor sie erneut vernetzt werden. 4 Tage reichen in der Regel.', 'LINK_STYLE_WEIT' => 'weit', 'LINK_STYLE_SCHMAL' => 'schmal', 'ACP_SUBMIT' => 'Einstellungen speichern', 'ACP_SAVED' => 'Die Einstellungen wurden geändert', ));
tas2580/dejure
language/de/common.php
PHP
gpl-2.0
1,309
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1008, 1030, 7427, 25718, 10322, 5331, 1011, 11937, 2015, 17788, 17914, 2139, 25243, 1008, 1030, 9385, 1006, 1039, 1007, 2297, 11937, 2015, 17788, 17914, 1008, 1030, 6105, 8299, 1024, 1013, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Sonatype Nexus (TM) Open Source Version * Copyright (c) 2008-present Sonatype, Inc. * All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions. * * This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0, * which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html. * * Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks * of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the * Eclipse Foundation. All other trademarks are the property of their respective owners. */ /** * Local-file blob store components. * * @since 3.0 */ package org.sonatype.nexus.blobstore.file;
sonatype/nexus-public
components/nexus-blobstore-file/src/main/java/org/sonatype/nexus/blobstore/file/package-info.java
Java
epl-1.0
885
[ 30522, 1013, 1008, 1008, 2365, 4017, 18863, 26041, 1006, 1056, 2213, 1007, 2330, 3120, 2544, 1008, 9385, 1006, 1039, 1007, 2263, 1011, 2556, 2365, 4017, 18863, 1010, 4297, 1012, 1008, 2035, 2916, 9235, 1012, 2950, 1996, 2353, 1011, 2283, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include "third_party/googletest/src/include/gtest/gtest.h" #include "./aom_dsp_rtcd.h" #include "test/acm_random.h" #include "av1/common/filter.h" #include "av1/common/convolve.h" #include "aom_dsp/aom_dsp_common.h" #include "aom_ports/mem.h" using libaom_test::ACMRandom; namespace { TEST(AV1ConvolveTest, av1_convolve8) { ACMRandom rnd(ACMRandom::DeterministicSeed()); InterpFilter interp_filter = EIGHTTAP; InterpFilterParams filter_params = get_interp_filter_params(interp_filter); ptrdiff_t filter_size = filter_params.taps; int filter_center = filter_size / 2 - 1; uint8_t src[12 * 12]; int src_stride = filter_size; uint8_t dst[1] = { 0 }; uint8_t dst1[1] = { 0 }; int dst_stride = 1; int x_step_q4 = 16; int y_step_q4 = 16; int subpel_x_q4 = 3; int subpel_y_q4 = 2; int avg = 0; int w = 1; int h = 1; for (int i = 0; i < filter_size * filter_size; i++) { src[i] = rnd.Rand16() % (1 << 8); } av1_convolve(src + src_stride * filter_center + filter_center, src_stride, dst, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); const int16_t* x_filter = get_interp_filter_subpel_kernel(filter_params, subpel_x_q4); const int16_t* y_filter = get_interp_filter_subpel_kernel(filter_params, subpel_y_q4); aom_convolve8_c(src + src_stride * filter_center + filter_center, src_stride, dst1, dst_stride, x_filter, 16, y_filter, 16, w, h); EXPECT_EQ(dst[0], dst1[0]); } TEST(AV1ConvolveTest, av1_convolve) { ACMRandom rnd(ACMRandom::DeterministicSeed()); InterpFilter interp_filter = EIGHTTAP; InterpFilterParams filter_params = get_interp_filter_params(interp_filter); ptrdiff_t filter_size = filter_params.taps; int filter_center = filter_size / 2 - 1; uint8_t src[12 * 12]; int src_stride = filter_size; uint8_t dst[1] = { 0 }; int dst_stride = 1; int x_step_q4 = 16; int y_step_q4 = 16; int avg = 0; int w = 1; int h = 1; int subpel_x_q4; int subpel_y_q4; for (int i = 0; i < filter_size * filter_size; i++) { src[i] = rnd.Rand16() % (1 << 8); } for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) { for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) { av1_convolve(src + src_stride * filter_center + filter_center, src_stride, dst, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); const int16_t* x_filter = get_interp_filter_subpel_kernel(filter_params, subpel_x_q4); const int16_t* y_filter = get_interp_filter_subpel_kernel(filter_params, subpel_y_q4); int temp[12]; int dst_ref = 0; for (int r = 0; r < filter_size; r++) { temp[r] = 0; for (int c = 0; c < filter_size; c++) { temp[r] += x_filter[c] * src[r * filter_size + c]; } temp[r] = clip_pixel(ROUND_POWER_OF_TWO(temp[r], FILTER_BITS)); dst_ref += temp[r] * y_filter[r]; } dst_ref = clip_pixel(ROUND_POWER_OF_TWO(dst_ref, FILTER_BITS)); EXPECT_EQ(dst[0], dst_ref); } } } TEST(AV1ConvolveTest, av1_convolve_avg) { ACMRandom rnd(ACMRandom::DeterministicSeed()); InterpFilter interp_filter = EIGHTTAP; InterpFilterParams filter_params = get_interp_filter_params(interp_filter); ptrdiff_t filter_size = filter_params.taps; int filter_center = filter_size / 2 - 1; uint8_t src0[12 * 12]; uint8_t src1[12 * 12]; int src_stride = filter_size; uint8_t dst0[1] = { 0 }; uint8_t dst1[1] = { 0 }; uint8_t dst[1] = { 0 }; int dst_stride = 1; int x_step_q4 = 16; int y_step_q4 = 16; int avg = 0; int w = 1; int h = 1; int subpel_x_q4; int subpel_y_q4; for (int i = 0; i < filter_size * filter_size; i++) { src0[i] = rnd.Rand16() % (1 << 8); src1[i] = rnd.Rand16() % (1 << 8); } int offset = filter_size * filter_center + filter_center; for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) { for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) { avg = 0; av1_convolve(src0 + offset, src_stride, dst0, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); avg = 0; av1_convolve(src1 + offset, src_stride, dst1, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); avg = 0; av1_convolve(src0 + offset, src_stride, dst, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); avg = 1; av1_convolve(src1 + offset, src_stride, dst, dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg); EXPECT_EQ(dst[0], ROUND_POWER_OF_TWO(dst0[0] + dst1[0], 1)); } } } #if CONFIG_AOM_HIGHBITDEPTH TEST(AV1ConvolveTest, av1_highbd_convolve) { ACMRandom rnd(ACMRandom::DeterministicSeed()); InterpFilter interp_filter = EIGHTTAP; InterpFilterParams filter_params = get_interp_filter_params(interp_filter); ptrdiff_t filter_size = filter_params.taps; int filter_center = filter_size / 2 - 1; uint16_t src[12 * 12]; int src_stride = filter_size; uint16_t dst[1] = { 0 }; int dst_stride = 1; int x_step_q4 = 16; int y_step_q4 = 16; int avg = 0; int bd = 10; int w = 1; int h = 1; int subpel_x_q4; int subpel_y_q4; for (int i = 0; i < filter_size * filter_size; i++) { src[i] = rnd.Rand16() % (1 << bd); } for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) { for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) { av1_highbd_convolve( CONVERT_TO_BYTEPTR(src + src_stride * filter_center + filter_center), src_stride, CONVERT_TO_BYTEPTR(dst), dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd); const int16_t* x_filter = get_interp_filter_subpel_kernel(filter_params, subpel_x_q4); const int16_t* y_filter = get_interp_filter_subpel_kernel(filter_params, subpel_y_q4); int temp[12]; int dst_ref = 0; for (int r = 0; r < filter_size; r++) { temp[r] = 0; for (int c = 0; c < filter_size; c++) { temp[r] += x_filter[c] * src[r * filter_size + c]; } temp[r] = clip_pixel_highbd(ROUND_POWER_OF_TWO(temp[r], FILTER_BITS), bd); dst_ref += temp[r] * y_filter[r]; } dst_ref = clip_pixel_highbd(ROUND_POWER_OF_TWO(dst_ref, FILTER_BITS), bd); EXPECT_EQ(dst[0], dst_ref); } } } TEST(AV1ConvolveTest, av1_highbd_convolve_avg) { ACMRandom rnd(ACMRandom::DeterministicSeed()); InterpFilter interp_filter = EIGHTTAP; InterpFilterParams filter_params = get_interp_filter_params(interp_filter); ptrdiff_t filter_size = filter_params.taps; int filter_center = filter_size / 2 - 1; uint16_t src0[12 * 12]; uint16_t src1[12 * 12]; int src_stride = filter_size; uint16_t dst0[1] = { 0 }; uint16_t dst1[1] = { 0 }; uint16_t dst[1] = { 0 }; int dst_stride = 1; int x_step_q4 = 16; int y_step_q4 = 16; int avg = 0; int bd = 10; int w = 1; int h = 1; int subpel_x_q4; int subpel_y_q4; for (int i = 0; i < filter_size * filter_size; i++) { src0[i] = rnd.Rand16() % (1 << bd); src1[i] = rnd.Rand16() % (1 << bd); } for (subpel_x_q4 = 0; subpel_x_q4 < 16; subpel_x_q4++) { for (subpel_y_q4 = 0; subpel_y_q4 < 16; subpel_y_q4++) { int offset = filter_size * filter_center + filter_center; avg = 0; av1_highbd_convolve(CONVERT_TO_BYTEPTR(src0 + offset), src_stride, CONVERT_TO_BYTEPTR(dst0), dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd); avg = 0; av1_highbd_convolve(CONVERT_TO_BYTEPTR(src1 + offset), src_stride, CONVERT_TO_BYTEPTR(dst1), dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd); avg = 0; av1_highbd_convolve(CONVERT_TO_BYTEPTR(src0 + offset), src_stride, CONVERT_TO_BYTEPTR(dst), dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd); avg = 1; av1_highbd_convolve(CONVERT_TO_BYTEPTR(src1 + offset), src_stride, CONVERT_TO_BYTEPTR(dst), dst_stride, w, h, &interp_filter, subpel_x_q4, x_step_q4, subpel_y_q4, y_step_q4, avg, bd); EXPECT_EQ(dst[0], ROUND_POWER_OF_TWO(dst0[0] + dst1[0], 1)); } } } #endif // CONFIG_AOM_HIGHBITDEPTH } // namespace
shacklettbp/aom
test/av1_convolve_test.cc
C++
bsd-2-clause
8,925
[ 30522, 1001, 2421, 1000, 2353, 1035, 2283, 1013, 8224, 22199, 1013, 5034, 2278, 1013, 2421, 1013, 14181, 4355, 1013, 14181, 4355, 1012, 1044, 1000, 1001, 2421, 1000, 1012, 1013, 20118, 2213, 1035, 16233, 2361, 1035, 19387, 19797, 1012, 1044...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# 打印 > 编写:[jdneo](https://github.com/jdneo) - 原文:<http://developer.android.com/training/printing/index.html> Android用户经常需要在设备上单独地阅览信息,但有时候也需要为了分享信息而不得不给其他人看自己设备的屏幕,这显然不是分享信息的好办法。如果我们可以通过Android应用把希望分享的信息打印出来,这将给用户提供一种从应用获取更多信息的好办法,更何况这么做还能将信息分享给其他那些不使用我们的应用的人。另外,打印服务还能创建信息的快照(生成PDF文件),而这一切不需要打印设备,无线网络连接,也不会消耗过多电量。 在Android 4.4(API Level 19)及更高版本的系统中,框架提供了直接从Android应用程序打印图片和文字的服务。这系列课程将展示如何启用打印:包括打印图片,HTML页面以及创建自定义的打印文档。 ## Lessons * [**打印照片**](photos.html) 这节课将展示如何打印一幅图像。 * [**打印HTML文档**](html-docs.html) 这节课将展示如何打印一个HTML文档。 * [**打印自定义文档**](custom-docs.html) 这节课将展示如何连接到Android打印管理器,创建一个打印适配器并建立要打印的内容。
dupengwei/android-training-course-in-chinese
multimedia/printing/index.md
Markdown
apache-2.0
1,325
[ 30522, 1001, 100, 100, 1028, 100, 100, 1024, 1031, 26219, 23585, 1033, 1006, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 4012, 1013, 26219, 23585, 1007, 1011, 1787, 1861, 1024, 1026, 8299, 1024, 1013, 1013, 9722, 1012, 11924, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -*- coding: utf-8 -*- """ Created on Tue May 28 12:20:59 2013 === MAYAXES (v1.1) === Generates a set of MayaVI axes using the mayavi.mlab.axes() object with a white background, small black text and a centred title. Designed to better mimic MATLAB style plots. Unspecified arguments will be set to default values when mayaxes is called (note that default settings are configured for a figure measuring 1024 x 768 pixels and may not display correctly on plots that are significantly larger or smaller). === Inputs === 'title' Figure title text (default = 'VOID') 'xlabel' X axis label text (default = 'X') 'ylabel' Y axis label text (default = 'Y') 'zlabel' Z axis label text (default = 'Z') 'handle' Graphics handle of object (if bounding box is to be plotted) 'title_size' Font size of the title text (default = 25) 'ticks' Number of divisions on each axis (default = 7) 'font_scaling' Font scaling factor for axis text (default = 0.7) 'background' Background colour (can be 'b' (black) or 'w' (white)) === Notes === Disbaling figure title: specify title_string='void' OR title_string='Void' OR title_string='VOID' to disable figure title. Disabling bounding box: specify handle='void' OR handle='Void' OR handle='VOID' to disable figure bounding box. === Usage === from mayaxes import mayaxes mayaxes('Figure title','X axis label','Y axis label','Z axis label') OR mayaxes(title_string='TITLE',xlabel='X',ylabel='Y',zlabel='Z',title_size=25,ticks=7,font_scaling=0.7) === Example === from mayaxes import test_mayaxes test_mayaxes() @author: Nathan Donaldson """ def mayaxes(title_string='VOID', xlabel='VOID', ylabel='VOID', zlabel='VOID', handle='VOID', \ title_size=25, ticks=7, font_scaling=0.7, background='w'): if type(title_string) != str or type(xlabel) != str or type(ylabel) != str or type(zlabel) != str: print('ERROR: label inputs must all be strings') return elif type(ticks) != int: print('ERROR: number of ticks must be an integer') return elif type(font_scaling) != float and type(font_scaling) != int: print('Error: font scaling factor must be an integer or a float') return from mayavi.mlab import axes,title,gcf,outline # Create axes object ax = axes() # Font factor globally adjusts figure text size ax.axes.font_factor = font_scaling # Number of ticks along each axis ax.axes.number_of_labels = ticks # Set axis labels to input strings # (spaces are included for padding so that labels do not intersect with axes) if xlabel=='void' or xlabel=='Void' or xlabel=='VOID': print 'X axis label title disabled' else: ax.axes.x_label = ' ' + xlabel if ylabel=='void' or ylabel=='Void' or ylabel=='VOID': print 'Y axis label disabled' else: ax.axes.y_label = ylabel + ' ' if zlabel=='void' or zlabel=='Void' or zlabel=='VOID': print 'Z axis label disabled' else: ax.axes.z_label = zlabel + ' ' # Create figure title if title_string=='void' or title_string=='Void' or title_string=='VOID': print 'Figure title disabled' else: text_title = title(title_string) text_title.x_position = 0.5 text_title.y_position = 0.9 text_title.property.color = (0.0, 0.0, 0.0) text_title.actor.text_scale_mode = 'none' text_title.property.font_size = title_size text_title.property.justification = 'centered' # Create bounding box if handle=='void' or handle=='Void' or handle=='VOID': print 'Bounding box disabled' else: if background == 'w': bounding_box = outline(handle, color=(0.0, 0.0, 0.0), opacity=0.2) elif background == 'b': bounding_box = outline(handle, color=(1.0, 1.0, 1.0), opacity=0.2) # Set axis, labels and titles to neat black text #ax.property.color = (0.0, 0.0, 0.0) #ax.title_text_property.color = (0.0, 0.0, 0.0) #ax.label_text_property.color = (0.0, 0.0, 0.0) ax.label_text_property.bold = False ax.label_text_property.italic = False ax.title_text_property.italic = False ax.title_text_property.bold = False # Reset axis range ax.axes.use_ranges = True # Set scene background, axis and text colours fig = gcf() if background == 'w': fig.scene.background = (1.0, 1.0, 1.0) ax.label_text_property.color = (0.0, 0.0, 0.0) ax.property.color = (0.0, 0.0, 0.0) ax.title_text_property.color = (0.0, 0.0, 0.0) elif background == 'b': fig.scene.background = (0.0, 0.0, 0.0) ax.label_text_property.color = (1.0, 1.0, 1.0) ax.property.color = (1.0, 1.0, 1.0) ax.title_text_property.color = (1.0, 1.0, 1.0) fig.scene.parallel_projection = True def test_mayaxes(): from mayaxes import mayaxes from scipy import sqrt,sin,meshgrid,linspace,pi import mayavi.mlab as mlab resolution = 200 lambda_var = 3 theta = linspace(-lambda_var*2*pi,lambda_var*2*pi,resolution) x, y = meshgrid(theta, theta) r = sqrt(x**2 + y**2) z = sin(r)/r fig = mlab.figure(size=(1024,768)) surf = mlab.surf(theta,theta,z,colormap='jet',opacity=1.0,warp_scale='auto') mayaxes(title_string='Figure 1: Diminishing polar cosine series', \ xlabel='X data',ylabel='Y data',zlabel='Z data',handle=surf) fig.scene.camera.position = [435.4093863309094, 434.1268937227623, 315.90311468125287] fig.scene.camera.focal_point = [94.434632665253829, 93.152140057106593, -25.071638984402856] fig.scene.camera.view_angle = 30.0 fig.scene.camera.view_up = [0.0, 0.0, 1.0] fig.scene.camera.clipping_range = [287.45231734040635, 973.59247058049255] fig.scene.camera.compute_view_plane_normal() fig.scene.render() mlab.show()
Nate28/mayaxes
mayaxes.py
Python
gpl-2.0
6,007
[ 30522, 1001, 1011, 1008, 1011, 16861, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 1000, 1000, 1000, 2580, 2006, 10722, 2063, 2089, 2654, 2260, 1024, 2322, 1024, 5354, 2286, 1027, 1027, 1027, 9815, 30524, 1037, 2275, 1997, 9815, 5737, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package org.apache.cocoon.transformation; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Map; import java.util.zip.ZipInputStream; import java.util.zip.ZipEntry; import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.environment.SourceResolver; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.IOUtils; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; /** * This transformer downloads a new file to disk. * <p> * It triggers for elements in the namespace "http://apache.org/cocoon/download/1.0". * Attributes: * @src : the file that should be downloaded * @target (optional): path where the file should be stored (includes filename) * @target-dir (optional): directory where the file should be stored * @unzip (optional): if "true" then unzip file after downloading. * If there is no @target or @target-dir attribute a temporary file is created. * <p> * Example XML input: * <pre> * {@code * <download:download src="http://some.server.com/zipfile.zip" * target="/tmp/zipfile.zip" unzip="true"/> * } * </pre> * The @src specifies the file that should be downloaded. The * @target specifies where the file should be stored. @unzip is true, so the * file will be unzipped immediately. * <p> * The result is * <pre> * {@code * <download:result unzipped="/path/to/unzipped/file/on/disk">/path/to/file/on/disk</download:result> * } * </pre> * (@unzipped is only present when @unzip="true") or * <pre> * {@code * <download:error>The error message</download:file> * } * </pre> * if an error (other than a HTTP error) occurs. * HTTP errors are thrown. * Define this transformer in the sitemap: * <pre> * {@code * <map:components> * <map:transformers> * <map:transformer name="download" logger="sitemap.transformer.download" * src="org.apache.cocoon.transformation.DownloadTransformer"/> * ... * } * </pre> * Use this transformer: * <pre> * {@code * <map:transform type="download"/> * } * </pre> * * * @author <a href="mailto:maarten.kroon@koop.overheid.nl">Maarten Kroon</a> * @author <a href="mailto:hhv@x-scale.nl">Huib Verweij</a> */ public class DownloadTransformer extends AbstractSAXTransformer { public static final String DOWNLOAD_NS = "http://apache.org/cocoon/download/1.0"; public static final String DOWNLOAD_ELEMENT = "download"; private static final String DOWNLOAD_PREFIX = "download"; public static final String RESULT_ELEMENT = "result"; public static final String ERROR_ELEMENT = "error"; public static final String SRC_ATTRIBUTE = "src"; public static final String TARGET_ATTRIBUTE = "target"; public static final String TARGETDIR_ATTRIBUTE = "target-dir"; public static final String UNZIP_ATTRIBUTE = "unzip"; public static final String RECURSIVE_UNZIP_ATTRIBUTE = "recursive-unzip"; public static final String UNZIPPED_ATTRIBUTE = "unzipped"; public DownloadTransformer() { this.defaultNamespaceURI = DOWNLOAD_NS; } @Override public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params) throws ProcessingException, SAXException, IOException { super.setup(resolver, objectModel, src, params); } @Override public void startTransformingElement(String uri, String localName, String qName, Attributes attributes) throws SAXException, ProcessingException, IOException { if (DOWNLOAD_NS.equals(uri) && DOWNLOAD_ELEMENT.equals(localName)) { try { File[] downloadResult = download( attributes.getValue(SRC_ATTRIBUTE), attributes.getValue(TARGETDIR_ATTRIBUTE), attributes.getValue(TARGET_ATTRIBUTE), attributes.getValue(UNZIP_ATTRIBUTE), attributes.getValue(RECURSIVE_UNZIP_ATTRIBUTE) ); File downloadedFile = downloadResult[0]; File unzipDir = downloadResult[1]; String absPath = downloadedFile.getCanonicalPath(); AttributesImpl attrsImpl = new AttributesImpl(); if (unzipDir != null) { attrsImpl.addAttribute("", UNZIPPED_ATTRIBUTE, UNZIPPED_ATTRIBUTE, "CDATA", unzipDir.getAbsolutePath()); } xmlConsumer.startElement(uri, RESULT_ELEMENT, String.format("%s:%s", DOWNLOAD_PREFIX, RESULT_ELEMENT), attrsImpl); xmlConsumer.characters(absPath.toCharArray(), 0, absPath.length()); xmlConsumer.endElement(uri, RESULT_ELEMENT, String.format("%s:%s", DOWNLOAD_PREFIX, RESULT_ELEMENT)); } catch (Exception e) { // throw new SAXException("Error downloading file", e); xmlConsumer.startElement(uri, ERROR_ELEMENT, qName, attributes); String message = e.getMessage(); xmlConsumer.characters(message.toCharArray(), 0, message.length()); xmlConsumer.endElement(uri, ERROR_ELEMENT, qName); } } else { super.startTransformingElement(uri, localName, qName, attributes); } } @Override public void endTransformingElement(String uri, String localName, String qName) throws SAXException, ProcessingException, IOException { if (DOWNLOAD_NS.equals(namespaceURI) && DOWNLOAD_ELEMENT.equals(localName)) { return; } super.endTransformingElement(uri, localName, qName); } private File[] download(String sourceUri, String targetDir, String target, String unzip, String recursiveUnzip) throws ProcessingException, IOException, SAXException { File targetFile; File unZipped = null; if (null != target && !target.equals("")) { targetFile = new File(target); } else if (null != targetDir && !targetDir.equals("")) { targetFile = new File(targetDir); } else { String baseName = FilenameUtils.getBaseName(sourceUri); String extension = FilenameUtils.getExtension(sourceUri); targetFile = File.createTempFile(baseName, "." + extension); } if (!targetFile.getParentFile().exists()) { targetFile.getParentFile().mkdirs(); } boolean unzipFile = (null != unzip && unzip.equals("true")) || (null != recursiveUnzip && recursiveUnzip.equals("true")); String absPath = targetFile.getAbsolutePath(); String unzipDir = unzipFile ? FilenameUtils.removeExtension(absPath) : ""; HttpClient httpClient = new HttpClient(); httpClient.setConnectionTimeout(60000); httpClient.setTimeout(60000); if (System.getProperty("http.proxyHost") != null) { // getLogger().warn("PROXY: "+System.getProperty("http.proxyHost")); String nonProxyHostsRE = System.getProperty("http.nonProxyHosts", ""); if (nonProxyHostsRE.length() > 0) { String[] pHosts = nonProxyHostsRE.replaceAll("\\.", "\\\\.").replaceAll("\\*", ".*").split("\\|"); nonProxyHostsRE = ""; for (String pHost : pHosts) { nonProxyHostsRE += "|(^https?://" + pHost + ".*$)"; } nonProxyHostsRE = nonProxyHostsRE.substring(1); } if (nonProxyHostsRE.length() == 0 || !sourceUri.matches(nonProxyHostsRE)) { try { HostConfiguration hostConfiguration = httpClient.getHostConfiguration(); hostConfiguration.setProxy(System.getProperty("http.proxyHost"), Integer.parseInt(System.getProperty("http.proxyPort", "80"))); httpClient.setHostConfiguration(hostConfiguration); } catch (Exception e) { throw new ProcessingException("Cannot set proxy!", e); } } } HttpMethod httpMethod = new GetMethod(sourceUri); try { int responseCode = httpClient.executeMethod(httpMethod); if (responseCode < 200 || responseCode >= 300) { throw new ProcessingException(String.format("Received HTTP status code %d (%s)", responseCode, httpMethod.getStatusText())); } OutputStream os = new BufferedOutputStream(new FileOutputStream(targetFile)); try { IOUtils.copyLarge(httpMethod.getResponseBodyAsStream(), os); } finally { os.close(); } } finally { httpMethod.releaseConnection(); } if (!"".equals(unzipDir)) { unZipped = unZipIt(targetFile, unzipDir, recursiveUnzip); } return new File[] {targetFile, unZipped}; } /** * Unzip it * @param zipFile input zip file * @param outputFolder zip file output folder */ private File unZipIt(File zipFile, String outputFolder, String recursiveUnzip){ byte[] buffer = new byte[4096]; File folder = null; try{ //create output directory is not exists folder = new File(outputFolder); if (!folder.exists()){ folder.mkdir(); } //get the zipped file list entry try ( //get the zip file content ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile))) { //get the zipped file list entry ZipEntry ze = zis.getNextEntry(); while(ze != null){ String fileName = ze.getName(); File newFile = new File(outputFolder + File.separator + fileName); // System.out.println("file unzip : "+ newFile.getAbsoluteFile()); // create all non existing folders // else you will hit FileNotFoundException for compressed folder new File(newFile.getParent()).mkdirs(); try (FileOutputStream fos = new FileOutputStream(newFile)) { int len; while ((len = zis.read(buffer)) > 0) { fos.write(buffer, 0, len); } } if ((null != recursiveUnzip && "true".equals(recursiveUnzip)) && FilenameUtils.getExtension(fileName).equals("zip")) { unZipIt(newFile, FilenameUtils.concat(outputFolder, FilenameUtils.getBaseName(fileName)), recursiveUnzip); } ze = zis.getNextEntry(); } zis.closeEntry(); } // System.out.println("Done unzipping."); } catch(IOException ex){ ex.printStackTrace(); } return folder; } }
nverwer/cocooncomponents
src/org/apache/cocoon/transformation/DownloadTransformer.java
Java
apache-2.0
11,508
[ 30522, 7427, 8917, 1012, 15895, 1012, 25033, 2239, 1012, 8651, 1025, 12324, 9262, 1012, 22834, 1012, 17698, 26010, 4904, 18780, 21422, 1025, 12324, 9262, 1012, 22834, 1012, 5371, 1025, 12324, 9262, 1012, 22834, 1012, 5371, 5833, 18780, 21422,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'use strict'; var util = require('util') , yeoman = require('yeoman-generator') , github = require('../lib/github') , path = require('path') , inflect = require('inflect'); var BBBGenerator = module.exports = function BBBGenerator(args, options, config) { // By calling `NamedBase` here, we get the argument to the subgenerator call // as `this.name`. yeoman.generators.NamedBase.apply(this, arguments); if (!this.name) { this.log.error('You have to provide a name for the subgenerator.'); process.exit(1); } this.on('end', function () { this.installDependencies({ skipInstall: options['skip-install'] }); // Set destination root back to project root to help with testability this.destinationRoot('../../'); }); this.appName = this.name; this.destPath = util.format('client/%s', this.appName); }; util.inherits(BBBGenerator, yeoman.generators.NamedBase); BBBGenerator.prototype.askFor = function askFor() { var cb = this.async(); // have Yeoman greet the user. console.log(this.yeoman); var prompts = [{ name: 'githubUser', message: 'Tell me again your username on Github?', default: 'someuser' },{ name: 'appDescription', message: 'Give this app a description', },{ name: 'version', message: 'What is the starting version number for this app you\'d like to use?', default: '0.1.0' }]; this.prompt(prompts, function (props) { this.githubUser = props.githubUser; this.appDescription = props.appDescription; this.version = props.version; cb(); }.bind(this)); }; BBBGenerator.prototype.userInfo = function userInfo() { var self = this , done = this.async(); github.githubUserInfo(this.githubUser, function (res) { /*jshint camelcase:false */ self.realname = res.name; self.email = res.email; self.githubUrl = res.html_url; done(); }); }; BBBGenerator.prototype.createDestFolder = function createDestFolder() { this.mkdir(this.destPath); this.destinationRoot(path.join(this.destinationRoot(), this.destPath)); }; BBBGenerator.prototype.fetchBoilerplate = function fetchBoilerplate() { var self = this , done = this.async(); this.remote('duro', 'clutch-backbone-boilerplate', function(err, remote) { self.sourceRoot(remote.cachePath); done(); }); }; BBBGenerator.prototype.buildApp = function buildSkeleton() { var self = this; this.directory('.','.'); };
duro/generator-clutch
bbb/index.js
JavaScript
mit
2,456
[ 30522, 1005, 2224, 9384, 1005, 1025, 13075, 21183, 4014, 1027, 5478, 1006, 1005, 21183, 4014, 1005, 1007, 1010, 6300, 20778, 1027, 5478, 1006, 1005, 6300, 20778, 1011, 13103, 1005, 1007, 1010, 21025, 2705, 12083, 1027, 5478, 1006, 1005, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php send_response_vote($update, $data);
atis/raid-pokemon-bot
modules/vote_refresh.php
PHP
agpl-3.0
48
[ 30522, 1026, 1029, 25718, 4604, 1035, 3433, 1035, 3789, 1006, 1002, 10651, 1010, 1002, 2951, 1007, 1025, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include <RomanceEngine/GUI/value_bar.h> #include <RomanceEngine/Render/primitive_renderer.h> namespace RomanceEngine { namespace GUI { void ValueBar::click(const Math::Float2& p) { GUIObject::click(p); float w = getRegion().width(); float pos = p.x_ - getRegion().left(); value_ = pos / w; } void ValueBar::render(const Render::RenderContextPtr& context) { Render::PrimitiveRenderer pr(context); pr.drawRect(region_, Math::Float4(0.5f, 0.5f, 0.5f, 1.0f)); Math::Rect valueRect = region_; valueRect.size_.x_ *= value_; pr.drawRect(valueRect, Math::Float4(0.3f, 0.3f, 0.8f, 1.0f)); } } // GUI } // RomanceEngine
yhyjp/RomanceEngine
RomanceEngine/src/RomanceEngine/GUI/value_bar.cpp
C++
mit
638
[ 30522, 1001, 2421, 1026, 7472, 13159, 3170, 1013, 26458, 1013, 3643, 1035, 3347, 1012, 1044, 1028, 1001, 2421, 1026, 7472, 13159, 3170, 1013, 17552, 1013, 10968, 1035, 17552, 2121, 1012, 1044, 1028, 3415, 15327, 7472, 13159, 3170, 1063, 341...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* binfmt_elf_fdpic.c: FDPIC ELF binary format * * Copyright (C) 2003, 2004, 2006 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * Derived from binfmt_elf.c * * 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. */ #include <linux/module.h> #include <linux/fs.h> #include <linux/stat.h> #include <linux/sched.h> #include <linux/mm.h> #include <linux/mman.h> #include <linux/errno.h> #include <linux/signal.h> #include <linux/binfmts.h> #include <linux/string.h> #include <linux/file.h> #include <linux/fcntl.h> #include <linux/slab.h> #include <linux/pagemap.h> #include <linux/security.h> #include <linux/highmem.h> #include <linux/highuid.h> #include <linux/personality.h> #include <linux/ptrace.h> #include <linux/init.h> #include <linux/elf.h> #include <linux/elf-fdpic.h> #include <linux/elfcore.h> #include <linux/coredump.h> #include <asm/uaccess.h> #include <asm/param.h> #include <asm/pgalloc.h> typedef char *elf_caddr_t; #if 0 #define kdebug(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) #else #define kdebug(fmt, ...) do {} while(0) #endif #if 0 #define kdcore(fmt, ...) printk("FDPIC "fmt"\n" ,##__VA_ARGS__ ) #else #define kdcore(fmt, ...) do {} while(0) #endif MODULE_LICENSE("GPL"); static int load_elf_fdpic_binary(struct linux_binprm *); static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *, struct file *); static int elf_fdpic_map_file(struct elf_fdpic_params *, struct file *, struct mm_struct *, const char *); static int create_elf_fdpic_tables(struct linux_binprm *, struct mm_struct *, struct elf_fdpic_params *, struct elf_fdpic_params *); #ifndef CONFIG_MMU static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *, unsigned long *); static int elf_fdpic_map_file_constdisp_on_uclinux(struct elf_fdpic_params *, struct file *, struct mm_struct *); #endif static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *, struct file *, struct mm_struct *); #ifdef CONFIG_ELF_CORE static int elf_fdpic_core_dump(struct coredump_params *cprm); #endif static struct linux_binfmt elf_fdpic_format = { .module = THIS_MODULE, .load_binary = load_elf_fdpic_binary, #ifdef CONFIG_ELF_CORE .core_dump = elf_fdpic_core_dump, #endif .min_coredump = ELF_EXEC_PAGESIZE, }; static int __init init_elf_fdpic_binfmt(void) { register_binfmt(&elf_fdpic_format); return 0; } static void __exit exit_elf_fdpic_binfmt(void) { unregister_binfmt(&elf_fdpic_format); } core_initcall(init_elf_fdpic_binfmt); module_exit(exit_elf_fdpic_binfmt); static int is_elf_fdpic(struct elfhdr *hdr, struct file *file) { if (memcmp(hdr->e_ident, ELFMAG, SELFMAG) != 0) return 0; if (hdr->e_type != ET_EXEC && hdr->e_type != ET_DYN) return 0; if (!elf_check_arch(hdr) || !elf_check_fdpic(hdr)) return 0; if (!file->f_op || !file->f_op->mmap) return 0; return 1; } /*****************************************************************************/ /* * read the program headers table into memory */ static int elf_fdpic_fetch_phdrs(struct elf_fdpic_params *params, struct file *file) { struct elf32_phdr *phdr; unsigned long size; int retval, loop; if (params->hdr.e_phentsize != sizeof(struct elf_phdr)) return -ENOMEM; if (params->hdr.e_phnum > 65536U / sizeof(struct elf_phdr)) return -ENOMEM; size = params->hdr.e_phnum * sizeof(struct elf_phdr); params->phdrs = kmalloc(size, GFP_KERNEL); if (!params->phdrs) return -ENOMEM; retval = kernel_read(file, params->hdr.e_phoff, (char *) params->phdrs, size); if (unlikely(retval != size)) return retval < 0 ? retval : -ENOEXEC; /* determine stack size for this binary */ phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { if (phdr->p_type != PT_GNU_STACK) continue; if (phdr->p_flags & PF_X) params->flags |= ELF_FDPIC_FLAG_EXEC_STACK; else params->flags |= ELF_FDPIC_FLAG_NOEXEC_STACK; params->stack_size = phdr->p_memsz; break; } return 0; } /*****************************************************************************/ /* * load an fdpic binary into various bits of memory */ static int load_elf_fdpic_binary(struct linux_binprm *bprm) { struct elf_fdpic_params exec_params, interp_params; struct pt_regs *regs = current_pt_regs(); struct elf_phdr *phdr; unsigned long stack_size, entryaddr; #ifdef ELF_FDPIC_PLAT_INIT unsigned long dynaddr; #endif #ifndef CONFIG_MMU unsigned long stack_prot; #endif struct file *interpreter = NULL; /* to shut gcc up */ char *interpreter_name = NULL; int executable_stack; int retval, i; kdebug("____ LOAD %d ____", current->pid); memset(&exec_params, 0, sizeof(exec_params)); memset(&interp_params, 0, sizeof(interp_params)); exec_params.hdr = *(struct elfhdr *) bprm->buf; exec_params.flags = ELF_FDPIC_FLAG_PRESENT | ELF_FDPIC_FLAG_EXECUTABLE; /* check that this is a binary we know how to deal with */ retval = -ENOEXEC; if (!is_elf_fdpic(&exec_params.hdr, bprm->file)) goto error; /* read the program header table */ retval = elf_fdpic_fetch_phdrs(&exec_params, bprm->file); if (retval < 0) goto error; /* scan for a program header that specifies an interpreter */ phdr = exec_params.phdrs; for (i = 0; i < exec_params.hdr.e_phnum; i++, phdr++) { switch (phdr->p_type) { case PT_INTERP: retval = -ENOMEM; if (phdr->p_filesz > PATH_MAX) goto error; retval = -ENOENT; if (phdr->p_filesz < 2) goto error; /* read the name of the interpreter into memory */ interpreter_name = kmalloc(phdr->p_filesz, GFP_KERNEL); if (!interpreter_name) goto error; retval = kernel_read(bprm->file, phdr->p_offset, interpreter_name, phdr->p_filesz); if (unlikely(retval != phdr->p_filesz)) { if (retval >= 0) retval = -ENOEXEC; goto error; } retval = -ENOENT; if (interpreter_name[phdr->p_filesz - 1] != '\0') goto error; kdebug("Using ELF interpreter %s", interpreter_name); /* replace the program with the interpreter */ interpreter = open_exec(interpreter_name); retval = PTR_ERR(interpreter); if (IS_ERR(interpreter)) { interpreter = NULL; goto error; } /* * If the binary is not readable then enforce * mm->dumpable = 0 regardless of the interpreter's * permissions. */ would_dump(bprm, interpreter); retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE); if (unlikely(retval != BINPRM_BUF_SIZE)) { if (retval >= 0) retval = -ENOEXEC; goto error; } interp_params.hdr = *((struct elfhdr *) bprm->buf); break; case PT_LOAD: #ifdef CONFIG_MMU if (exec_params.load_addr == 0) exec_params.load_addr = phdr->p_vaddr; #endif break; } } if (elf_check_const_displacement(&exec_params.hdr)) exec_params.flags |= ELF_FDPIC_FLAG_CONSTDISP; /* perform insanity checks on the interpreter */ if (interpreter_name) { retval = -ELIBBAD; if (!is_elf_fdpic(&interp_params.hdr, interpreter)) goto error; interp_params.flags = ELF_FDPIC_FLAG_PRESENT; /* read the interpreter's program header table */ retval = elf_fdpic_fetch_phdrs(&interp_params, interpreter); if (retval < 0) goto error; } stack_size = exec_params.stack_size; if (exec_params.flags & ELF_FDPIC_FLAG_EXEC_STACK) executable_stack = EXSTACK_ENABLE_X; else if (exec_params.flags & ELF_FDPIC_FLAG_NOEXEC_STACK) executable_stack = EXSTACK_DISABLE_X; else executable_stack = EXSTACK_DEFAULT; if (stack_size == 0) { stack_size = interp_params.stack_size; if (interp_params.flags & ELF_FDPIC_FLAG_EXEC_STACK) executable_stack = EXSTACK_ENABLE_X; else if (interp_params.flags & ELF_FDPIC_FLAG_NOEXEC_STACK) executable_stack = EXSTACK_DISABLE_X; else executable_stack = EXSTACK_DEFAULT; } retval = -ENOEXEC; if (stack_size == 0) goto error; if (elf_check_const_displacement(&interp_params.hdr)) interp_params.flags |= ELF_FDPIC_FLAG_CONSTDISP; /* flush all traces of the currently running executable */ retval = flush_old_exec(bprm); if (retval) goto error; /* there's now no turning back... the old userspace image is dead, * defunct, deceased, etc. after this point we have to exit via * error_kill */ set_personality(PER_LINUX_FDPIC); if (elf_read_implies_exec(&exec_params.hdr, executable_stack)) current->personality |= READ_IMPLIES_EXEC; setup_new_exec(bprm); set_binfmt(&elf_fdpic_format); current->mm->start_code = 0; current->mm->end_code = 0; current->mm->start_stack = 0; current->mm->start_data = 0; current->mm->end_data = 0; current->mm->context.exec_fdpic_loadmap = 0; current->mm->context.interp_fdpic_loadmap = 0; #ifdef CONFIG_MMU elf_fdpic_arch_lay_out_mm(&exec_params, &interp_params, &current->mm->start_stack, &current->mm->start_brk); retval = setup_arg_pages(bprm, current->mm->start_stack, executable_stack); if (retval < 0) { send_sig(SIGKILL, current, 0); goto error_kill; } #endif /* load the executable and interpreter into memory */ retval = elf_fdpic_map_file(&exec_params, bprm->file, current->mm, "executable"); if (retval < 0) goto error_kill; if (interpreter_name) { retval = elf_fdpic_map_file(&interp_params, interpreter, current->mm, "interpreter"); if (retval < 0) { printk(KERN_ERR "Unable to load interpreter\n"); goto error_kill; } allow_write_access(interpreter); fput(interpreter); interpreter = NULL; } #ifdef CONFIG_MMU if (!current->mm->start_brk) current->mm->start_brk = current->mm->end_data; current->mm->brk = current->mm->start_brk = PAGE_ALIGN(current->mm->start_brk); #else /* create a stack and brk area big enough for everyone * - the brk heap starts at the bottom and works up * - the stack starts at the top and works down */ stack_size = (stack_size + PAGE_SIZE - 1) & PAGE_MASK; if (stack_size < PAGE_SIZE * 2) stack_size = PAGE_SIZE * 2; stack_prot = PROT_READ | PROT_WRITE; if (executable_stack == EXSTACK_ENABLE_X || (executable_stack == EXSTACK_DEFAULT && VM_STACK_FLAGS & VM_EXEC)) stack_prot |= PROT_EXEC; current->mm->start_brk = vm_mmap(NULL, 0, stack_size, stack_prot, MAP_PRIVATE | MAP_ANONYMOUS | MAP_UNINITIALIZED | MAP_GROWSDOWN, 0); if (IS_ERR_VALUE(current->mm->start_brk)) { retval = current->mm->start_brk; current->mm->start_brk = 0; goto error_kill; } current->mm->brk = current->mm->start_brk; current->mm->context.end_brk = current->mm->start_brk; current->mm->context.end_brk += (stack_size > PAGE_SIZE) ? (stack_size - PAGE_SIZE) : 0; current->mm->start_stack = current->mm->start_brk + stack_size; #endif install_exec_creds(bprm); if (create_elf_fdpic_tables(bprm, current->mm, &exec_params, &interp_params) < 0) goto error_kill; kdebug("- start_code %lx", current->mm->start_code); kdebug("- end_code %lx", current->mm->end_code); kdebug("- start_data %lx", current->mm->start_data); kdebug("- end_data %lx", current->mm->end_data); kdebug("- start_brk %lx", current->mm->start_brk); kdebug("- brk %lx", current->mm->brk); kdebug("- start_stack %lx", current->mm->start_stack); #ifdef ELF_FDPIC_PLAT_INIT /* * The ABI may specify that certain registers be set up in special * ways (on i386 %edx is the address of a DT_FINI function, for * example. This macro performs whatever initialization to * the regs structure is required. */ dynaddr = interp_params.dynamic_addr ?: exec_params.dynamic_addr; ELF_FDPIC_PLAT_INIT(regs, exec_params.map_addr, interp_params.map_addr, dynaddr); #endif /* everything is now ready... get the userspace context ready to roll */ entryaddr = interp_params.entry_addr ?: exec_params.entry_addr; start_thread(regs, entryaddr, current->mm->start_stack); retval = 0; error: if (interpreter) { allow_write_access(interpreter); fput(interpreter); } kfree(interpreter_name); kfree(exec_params.phdrs); kfree(exec_params.loadmap); kfree(interp_params.phdrs); kfree(interp_params.loadmap); return retval; /* unrecoverable error - kill the process */ error_kill: send_sig(SIGSEGV, current, 0); goto error; } /*****************************************************************************/ #ifndef ELF_BASE_PLATFORM /* * AT_BASE_PLATFORM indicates the "real" hardware/microarchitecture. * If the arch defines ELF_BASE_PLATFORM (in asm/elf.h), the value * will be copied to the user stack in the same manner as AT_PLATFORM. */ #define ELF_BASE_PLATFORM NULL #endif /* * present useful information to the program by shovelling it onto the new * process's stack */ static int create_elf_fdpic_tables(struct linux_binprm *bprm, struct mm_struct *mm, struct elf_fdpic_params *exec_params, struct elf_fdpic_params *interp_params) { const struct cred *cred = current_cred(); unsigned long sp, csp, nitems; elf_caddr_t __user *argv, *envp; size_t platform_len = 0, len; char *k_platform, *k_base_platform; char __user *u_platform, *u_base_platform, *p; long hwcap; int loop; int nr; /* reset for each csp adjustment */ #ifdef CONFIG_MMU /* In some cases (e.g. Hyper-Threading), we want to avoid L1 evictions * by the processes running on the same package. One thing we can do is * to shuffle the initial stack for them, so we give the architecture * an opportunity to do so here. */ sp = arch_align_stack(bprm->p); #else sp = mm->start_stack; /* stack the program arguments and environment */ if (elf_fdpic_transfer_args_to_stack(bprm, &sp) < 0) return -EFAULT; #endif hwcap = ELF_HWCAP; /* * If this architecture has a platform capability string, copy it * to userspace. In some cases (Sparc), this info is impossible * for userspace to get any other way, in others (i386) it is * merely difficult. */ k_platform = ELF_PLATFORM; u_platform = NULL; if (k_platform) { platform_len = strlen(k_platform) + 1; sp -= platform_len; u_platform = (char __user *) sp; if (__copy_to_user(u_platform, k_platform, platform_len) != 0) return -EFAULT; } /* * If this architecture has a "base" platform capability * string, copy it to userspace. */ k_base_platform = ELF_BASE_PLATFORM; u_base_platform = NULL; if (k_base_platform) { platform_len = strlen(k_base_platform) + 1; sp -= platform_len; u_base_platform = (char __user *) sp; if (__copy_to_user(u_base_platform, k_base_platform, platform_len) != 0) return -EFAULT; } sp &= ~7UL; /* stack the load map(s) */ len = sizeof(struct elf32_fdpic_loadmap); len += sizeof(struct elf32_fdpic_loadseg) * exec_params->loadmap->nsegs; sp = (sp - len) & ~7UL; exec_params->map_addr = sp; if (copy_to_user((void __user *) sp, exec_params->loadmap, len) != 0) return -EFAULT; current->mm->context.exec_fdpic_loadmap = (unsigned long) sp; if (interp_params->loadmap) { len = sizeof(struct elf32_fdpic_loadmap); len += sizeof(struct elf32_fdpic_loadseg) * interp_params->loadmap->nsegs; sp = (sp - len) & ~7UL; interp_params->map_addr = sp; if (copy_to_user((void __user *) sp, interp_params->loadmap, len) != 0) return -EFAULT; current->mm->context.interp_fdpic_loadmap = (unsigned long) sp; } /* force 16 byte _final_ alignment here for generality */ #define DLINFO_ITEMS 15 nitems = 1 + DLINFO_ITEMS + (k_platform ? 1 : 0) + (k_base_platform ? 1 : 0) + AT_VECTOR_SIZE_ARCH; if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) nitems++; csp = sp; sp -= nitems * 2 * sizeof(unsigned long); sp -= (bprm->envc + 1) * sizeof(char *); /* envv[] */ sp -= (bprm->argc + 1) * sizeof(char *); /* argv[] */ sp -= 1 * sizeof(unsigned long); /* argc */ csp -= sp & 15UL; sp -= sp & 15UL; /* put the ELF interpreter info on the stack */ #define NEW_AUX_ENT(id, val) \ do { \ struct { unsigned long _id, _val; } __user *ent; \ \ ent = (void __user *) csp; \ __put_user((id), &ent[nr]._id); \ __put_user((val), &ent[nr]._val); \ nr++; \ } while (0) nr = 0; csp -= 2 * sizeof(unsigned long); NEW_AUX_ENT(AT_NULL, 0); if (k_platform) { nr = 0; csp -= 2 * sizeof(unsigned long); NEW_AUX_ENT(AT_PLATFORM, (elf_addr_t) (unsigned long) u_platform); } if (k_base_platform) { nr = 0; csp -= 2 * sizeof(unsigned long); NEW_AUX_ENT(AT_BASE_PLATFORM, (elf_addr_t) (unsigned long) u_base_platform); } if (bprm->interp_flags & BINPRM_FLAGS_EXECFD) { nr = 0; csp -= 2 * sizeof(unsigned long); NEW_AUX_ENT(AT_EXECFD, bprm->interp_data); } nr = 0; csp -= DLINFO_ITEMS * 2 * sizeof(unsigned long); NEW_AUX_ENT(AT_HWCAP, hwcap); NEW_AUX_ENT(AT_PAGESZ, PAGE_SIZE); NEW_AUX_ENT(AT_CLKTCK, CLOCKS_PER_SEC); NEW_AUX_ENT(AT_PHDR, exec_params->ph_addr); NEW_AUX_ENT(AT_PHENT, sizeof(struct elf_phdr)); NEW_AUX_ENT(AT_PHNUM, exec_params->hdr.e_phnum); NEW_AUX_ENT(AT_BASE, interp_params->elfhdr_addr); NEW_AUX_ENT(AT_FLAGS, 0); NEW_AUX_ENT(AT_ENTRY, exec_params->entry_addr); NEW_AUX_ENT(AT_UID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->uid)); NEW_AUX_ENT(AT_EUID, (elf_addr_t) from_kuid_munged(cred->user_ns, cred->euid)); NEW_AUX_ENT(AT_GID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->gid)); NEW_AUX_ENT(AT_EGID, (elf_addr_t) from_kgid_munged(cred->user_ns, cred->egid)); NEW_AUX_ENT(AT_SECURE, security_bprm_secureexec(bprm)); NEW_AUX_ENT(AT_EXECFN, bprm->exec); #ifdef ARCH_DLINFO nr = 0; csp -= AT_VECTOR_SIZE_ARCH * 2 * sizeof(unsigned long); /* ARCH_DLINFO must come last so platform specific code can enforce * special alignment requirements on the AUXV if necessary (eg. PPC). */ ARCH_DLINFO; #endif #undef NEW_AUX_ENT /* allocate room for argv[] and envv[] */ csp -= (bprm->envc + 1) * sizeof(elf_caddr_t); envp = (elf_caddr_t __user *) csp; csp -= (bprm->argc + 1) * sizeof(elf_caddr_t); argv = (elf_caddr_t __user *) csp; /* stack argc */ csp -= sizeof(unsigned long); __put_user(bprm->argc, (unsigned long __user *) csp); BUG_ON(csp != sp); /* fill in the argv[] array */ #ifdef CONFIG_MMU current->mm->arg_start = bprm->p; #else current->mm->arg_start = current->mm->start_stack - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p); #endif p = (char __user *) current->mm->arg_start; for (loop = bprm->argc; loop > 0; loop--) { __put_user((elf_caddr_t) p, argv++); len = strnlen_user(p, MAX_ARG_STRLEN); if (!len || len > MAX_ARG_STRLEN) return -EINVAL; p += len; } __put_user(NULL, argv); current->mm->arg_end = (unsigned long) p; /* fill in the envv[] array */ current->mm->env_start = (unsigned long) p; for (loop = bprm->envc; loop > 0; loop--) { __put_user((elf_caddr_t)(unsigned long) p, envp++); len = strnlen_user(p, MAX_ARG_STRLEN); if (!len || len > MAX_ARG_STRLEN) return -EINVAL; p += len; } __put_user(NULL, envp); current->mm->env_end = (unsigned long) p; mm->start_stack = (unsigned long) sp; return 0; } /*****************************************************************************/ /* * transfer the program arguments and environment from the holding pages onto * the stack */ #ifndef CONFIG_MMU static int elf_fdpic_transfer_args_to_stack(struct linux_binprm *bprm, unsigned long *_sp) { unsigned long index, stop, sp; char *src; int ret = 0; stop = bprm->p >> PAGE_SHIFT; sp = *_sp; for (index = MAX_ARG_PAGES - 1; index >= stop; index--) { src = kmap(bprm->page[index]); sp -= PAGE_SIZE; if (copy_to_user((void *) sp, src, PAGE_SIZE) != 0) ret = -EFAULT; kunmap(bprm->page[index]); if (ret < 0) goto out; } *_sp = (*_sp - (MAX_ARG_PAGES * PAGE_SIZE - bprm->p)) & ~15; out: return ret; } #endif /*****************************************************************************/ /* * load the appropriate binary image (executable or interpreter) into memory * - we assume no MMU is available * - if no other PIC bits are set in params->hdr->e_flags * - we assume that the LOADable segments in the binary are independently relocatable * - we assume R/O executable segments are shareable * - else * - we assume the loadable parts of the image to require fixed displacement * - the image is not shareable */ static int elf_fdpic_map_file(struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm, const char *what) { struct elf32_fdpic_loadmap *loadmap; #ifdef CONFIG_MMU struct elf32_fdpic_loadseg *mseg; #endif struct elf32_fdpic_loadseg *seg; struct elf32_phdr *phdr; unsigned long load_addr, stop; unsigned nloads, tmp; size_t size; int loop, ret; /* allocate a load map table */ nloads = 0; for (loop = 0; loop < params->hdr.e_phnum; loop++) if (params->phdrs[loop].p_type == PT_LOAD) nloads++; if (nloads == 0) return -ELIBBAD; size = sizeof(*loadmap) + nloads * sizeof(*seg); loadmap = kzalloc(size, GFP_KERNEL); if (!loadmap) return -ENOMEM; params->loadmap = loadmap; loadmap->version = ELF32_FDPIC_LOADMAP_VERSION; loadmap->nsegs = nloads; load_addr = params->load_addr; seg = loadmap->segs; /* map the requested LOADs into the memory space */ switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) { case ELF_FDPIC_FLAG_CONSTDISP: case ELF_FDPIC_FLAG_CONTIGUOUS: #ifndef CONFIG_MMU ret = elf_fdpic_map_file_constdisp_on_uclinux(params, file, mm); if (ret < 0) return ret; break; #endif default: ret = elf_fdpic_map_file_by_direct_mmap(params, file, mm); if (ret < 0) return ret; break; } /* map the entry point */ if (params->hdr.e_entry) { seg = loadmap->segs; for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { if (params->hdr.e_entry >= seg->p_vaddr && params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) { params->entry_addr = (params->hdr.e_entry - seg->p_vaddr) + seg->addr; break; } } } /* determine where the program header table has wound up if mapped */ stop = params->hdr.e_phoff; stop += params->hdr.e_phnum * sizeof (struct elf_phdr); phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { if (phdr->p_type != PT_LOAD) continue; if (phdr->p_offset > params->hdr.e_phoff || phdr->p_offset + phdr->p_filesz < stop) continue; seg = loadmap->segs; for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { if (phdr->p_vaddr >= seg->p_vaddr && phdr->p_vaddr + phdr->p_filesz <= seg->p_vaddr + seg->p_memsz) { params->ph_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr + params->hdr.e_phoff - phdr->p_offset; break; } } break; } /* determine where the dynamic section has wound up if there is one */ phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { if (phdr->p_type != PT_DYNAMIC) continue; seg = loadmap->segs; for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { if (phdr->p_vaddr >= seg->p_vaddr && phdr->p_vaddr + phdr->p_memsz <= seg->p_vaddr + seg->p_memsz) { params->dynamic_addr = (phdr->p_vaddr - seg->p_vaddr) + seg->addr; /* check the dynamic section contains at least * one item, and that the last item is a NULL * entry */ if (phdr->p_memsz == 0 || phdr->p_memsz % sizeof(Elf32_Dyn) != 0) goto dynamic_error; tmp = phdr->p_memsz / sizeof(Elf32_Dyn); if (((Elf32_Dyn *) params->dynamic_addr)[tmp - 1].d_tag != 0) goto dynamic_error; break; } } break; } /* now elide adjacent segments in the load map on MMU linux * - on uClinux the holes between may actually be filled with system * stuff or stuff from other processes */ #ifdef CONFIG_MMU nloads = loadmap->nsegs; mseg = loadmap->segs; seg = mseg + 1; for (loop = 1; loop < nloads; loop++) { /* see if we have a candidate for merging */ if (seg->p_vaddr - mseg->p_vaddr == seg->addr - mseg->addr) { load_addr = PAGE_ALIGN(mseg->addr + mseg->p_memsz); if (load_addr == (seg->addr & PAGE_MASK)) { mseg->p_memsz += load_addr - (mseg->addr + mseg->p_memsz); mseg->p_memsz += seg->addr & ~PAGE_MASK; mseg->p_memsz += seg->p_memsz; loadmap->nsegs--; continue; } } mseg++; if (mseg != seg) *mseg = *seg; } #endif kdebug("Mapped Object [%s]:", what); kdebug("- elfhdr : %lx", params->elfhdr_addr); kdebug("- entry : %lx", params->entry_addr); kdebug("- PHDR[] : %lx", params->ph_addr); kdebug("- DYNAMIC[]: %lx", params->dynamic_addr); seg = loadmap->segs; for (loop = 0; loop < loadmap->nsegs; loop++, seg++) kdebug("- LOAD[%d] : %08x-%08x [va=%x ms=%x]", loop, seg->addr, seg->addr + seg->p_memsz - 1, seg->p_vaddr, seg->p_memsz); return 0; dynamic_error: printk("ELF FDPIC %s with invalid DYNAMIC section (inode=%lu)\n", what, file->f_path.dentry->d_inode->i_ino); return -ELIBBAD; } /*****************************************************************************/ /* * map a file with constant displacement under uClinux */ #ifndef CONFIG_MMU static int elf_fdpic_map_file_constdisp_on_uclinux( struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm) { struct elf32_fdpic_loadseg *seg; struct elf32_phdr *phdr; unsigned long load_addr, base = ULONG_MAX, top = 0, maddr = 0, mflags; loff_t fpos; int loop, ret; load_addr = params->load_addr; seg = params->loadmap->segs; /* determine the bounds of the contiguous overall allocation we must * make */ phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { if (params->phdrs[loop].p_type != PT_LOAD) continue; if (base > phdr->p_vaddr) base = phdr->p_vaddr; if (top < phdr->p_vaddr + phdr->p_memsz) top = phdr->p_vaddr + phdr->p_memsz; } /* allocate one big anon block for everything */ mflags = MAP_PRIVATE; if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE) mflags |= MAP_EXECUTABLE; maddr = vm_mmap(NULL, load_addr, top - base, PROT_READ | PROT_WRITE | PROT_EXEC, mflags, 0); if (IS_ERR_VALUE(maddr)) return (int) maddr; if (load_addr != 0) load_addr += PAGE_ALIGN(top - base); /* and then load the file segments into it */ phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { if (params->phdrs[loop].p_type != PT_LOAD) continue; fpos = phdr->p_offset; seg->addr = maddr + (phdr->p_vaddr - base); seg->p_vaddr = phdr->p_vaddr; seg->p_memsz = phdr->p_memsz; ret = file->f_op->read(file, (void *) seg->addr, phdr->p_filesz, &fpos); if (ret < 0) return ret; /* map the ELF header address if in this segment */ if (phdr->p_offset == 0) params->elfhdr_addr = seg->addr; /* clear any space allocated but not loaded */ if (phdr->p_filesz < phdr->p_memsz) { if (clear_user((void *) (seg->addr + phdr->p_filesz), phdr->p_memsz - phdr->p_filesz)) return -EFAULT; } if (mm) { if (phdr->p_flags & PF_X) { if (!mm->start_code) { mm->start_code = seg->addr; mm->end_code = seg->addr + phdr->p_memsz; } } else if (!mm->start_data) { mm->start_data = seg->addr; mm->end_data = seg->addr + phdr->p_memsz; } } seg++; } return 0; } #endif /*****************************************************************************/ /* * map a binary by direct mmap() of the individual PT_LOAD segments */ static int elf_fdpic_map_file_by_direct_mmap(struct elf_fdpic_params *params, struct file *file, struct mm_struct *mm) { struct elf32_fdpic_loadseg *seg; struct elf32_phdr *phdr; unsigned long load_addr, delta_vaddr; int loop, dvset; load_addr = params->load_addr; delta_vaddr = 0; dvset = 0; seg = params->loadmap->segs; /* deal with each load segment separately */ phdr = params->phdrs; for (loop = 0; loop < params->hdr.e_phnum; loop++, phdr++) { unsigned long maddr, disp, excess, excess1; int prot = 0, flags; if (phdr->p_type != PT_LOAD) continue; kdebug("[LOAD] va=%lx of=%lx fs=%lx ms=%lx", (unsigned long) phdr->p_vaddr, (unsigned long) phdr->p_offset, (unsigned long) phdr->p_filesz, (unsigned long) phdr->p_memsz); /* determine the mapping parameters */ if (phdr->p_flags & PF_R) prot |= PROT_READ; if (phdr->p_flags & PF_W) prot |= PROT_WRITE; if (phdr->p_flags & PF_X) prot |= PROT_EXEC; flags = MAP_PRIVATE | MAP_DENYWRITE; if (params->flags & ELF_FDPIC_FLAG_EXECUTABLE) flags |= MAP_EXECUTABLE; maddr = 0; switch (params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) { case ELF_FDPIC_FLAG_INDEPENDENT: /* PT_LOADs are independently locatable */ break; case ELF_FDPIC_FLAG_HONOURVADDR: /* the specified virtual address must be honoured */ maddr = phdr->p_vaddr; flags |= MAP_FIXED; break; case ELF_FDPIC_FLAG_CONSTDISP: /* constant displacement * - can be mapped anywhere, but must be mapped as a * unit */ if (!dvset) { maddr = load_addr; delta_vaddr = phdr->p_vaddr; dvset = 1; } else { maddr = load_addr + phdr->p_vaddr - delta_vaddr; flags |= MAP_FIXED; } break; case ELF_FDPIC_FLAG_CONTIGUOUS: /* contiguity handled later */ break; default: BUG(); } maddr &= PAGE_MASK; /* create the mapping */ disp = phdr->p_vaddr & ~PAGE_MASK; maddr = vm_mmap(file, maddr, phdr->p_memsz + disp, prot, flags, phdr->p_offset - disp); kdebug("mmap[%d] <file> sz=%lx pr=%x fl=%x of=%lx --> %08lx", loop, phdr->p_memsz + disp, prot, flags, phdr->p_offset - disp, maddr); if (IS_ERR_VALUE(maddr)) return (int) maddr; if ((params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) == ELF_FDPIC_FLAG_CONTIGUOUS) load_addr += PAGE_ALIGN(phdr->p_memsz + disp); seg->addr = maddr + disp; seg->p_vaddr = phdr->p_vaddr; seg->p_memsz = phdr->p_memsz; /* map the ELF header address if in this segment */ if (phdr->p_offset == 0) params->elfhdr_addr = seg->addr; /* clear the bit between beginning of mapping and beginning of * PT_LOAD */ if (prot & PROT_WRITE && disp > 0) { kdebug("clear[%d] ad=%lx sz=%lx", loop, maddr, disp); if (clear_user((void __user *) maddr, disp)) return -EFAULT; maddr += disp; } /* clear any space allocated but not loaded * - on uClinux we can just clear the lot * - on MMU linux we'll get a SIGBUS beyond the last page * extant in the file */ excess = phdr->p_memsz - phdr->p_filesz; excess1 = PAGE_SIZE - ((maddr + phdr->p_filesz) & ~PAGE_MASK); #ifdef CONFIG_MMU if (excess > excess1) { unsigned long xaddr = maddr + phdr->p_filesz + excess1; unsigned long xmaddr; flags |= MAP_FIXED | MAP_ANONYMOUS; xmaddr = vm_mmap(NULL, xaddr, excess - excess1, prot, flags, 0); kdebug("mmap[%d] <anon>" " ad=%lx sz=%lx pr=%x fl=%x of=0 --> %08lx", loop, xaddr, excess - excess1, prot, flags, xmaddr); if (xmaddr != xaddr) return -ENOMEM; } if (prot & PROT_WRITE && excess1 > 0) { kdebug("clear[%d] ad=%lx sz=%lx", loop, maddr + phdr->p_filesz, excess1); if (clear_user((void __user *) maddr + phdr->p_filesz, excess1)) return -EFAULT; } #else if (excess > 0) { kdebug("clear[%d] ad=%lx sz=%lx", loop, maddr + phdr->p_filesz, excess); if (clear_user((void *) maddr + phdr->p_filesz, excess)) return -EFAULT; } #endif if (mm) { if (phdr->p_flags & PF_X) { if (!mm->start_code) { mm->start_code = maddr; mm->end_code = maddr + phdr->p_memsz; } } else if (!mm->start_data) { mm->start_data = maddr; mm->end_data = maddr + phdr->p_memsz; } } seg++; } return 0; } /*****************************************************************************/ /* * ELF-FDPIC core dumper * * Modelled on fs/exec.c:aout_core_dump() * Jeremy Fitzhardinge <jeremy@sw.oz.au> * * Modelled on fs/binfmt_elf.c core dumper */ #ifdef CONFIG_ELF_CORE /* * Decide whether a segment is worth dumping; default is yes to be * sure (missing info is worse than too much; etc). * Personally I'd include everything, and use the coredump limit... * * I think we should skip something. But I am not sure how. H.J. */ static int maydump(struct vm_area_struct *vma, unsigned long mm_flags) { int dump_ok; /* Do not dump I/O mapped devices or special mappings */ if (vma->vm_flags & VM_IO) { kdcore("%08lx: %08lx: no (IO)", vma->vm_start, vma->vm_flags); return 0; } /* If we may not read the contents, don't allow us to dump * them either. "dump_write()" can't handle it anyway. */ if (!(vma->vm_flags & VM_READ)) { kdcore("%08lx: %08lx: no (!read)", vma->vm_start, vma->vm_flags); return 0; } /* By default, dump shared memory if mapped from an anonymous file. */ if (vma->vm_flags & VM_SHARED) { if (vma->vm_file->f_path.dentry->d_inode->i_nlink == 0) { dump_ok = test_bit(MMF_DUMP_ANON_SHARED, &mm_flags); kdcore("%08lx: %08lx: %s (share)", vma->vm_start, vma->vm_flags, dump_ok ? "yes" : "no"); return dump_ok; } dump_ok = test_bit(MMF_DUMP_MAPPED_SHARED, &mm_flags); kdcore("%08lx: %08lx: %s (share)", vma->vm_start, vma->vm_flags, dump_ok ? "yes" : "no"); return dump_ok; } #ifdef CONFIG_MMU /* By default, if it hasn't been written to, don't write it out */ if (!vma->anon_vma) { dump_ok = test_bit(MMF_DUMP_MAPPED_PRIVATE, &mm_flags); kdcore("%08lx: %08lx: %s (!anon)", vma->vm_start, vma->vm_flags, dump_ok ? "yes" : "no"); return dump_ok; } #endif dump_ok = test_bit(MMF_DUMP_ANON_PRIVATE, &mm_flags); kdcore("%08lx: %08lx: %s", vma->vm_start, vma->vm_flags, dump_ok ? "yes" : "no"); return dump_ok; } /* An ELF note in memory */ struct memelfnote { const char *name; int type; unsigned int datasz; void *data; }; static int notesize(struct memelfnote *en) { int sz; sz = sizeof(struct elf_note); sz += roundup(strlen(en->name) + 1, 4); sz += roundup(en->datasz, 4); return sz; } /* #define DEBUG */ #define DUMP_WRITE(addr, nr, foffset) \ do { if (!dump_write(file, (addr), (nr))) return 0; *foffset += (nr); } while(0) static int alignfile(struct file *file, loff_t *foffset) { static const char buf[4] = { 0, }; DUMP_WRITE(buf, roundup(*foffset, 4) - *foffset, foffset); return 1; } static int writenote(struct memelfnote *men, struct file *file, loff_t *foffset) { struct elf_note en; en.n_namesz = strlen(men->name) + 1; en.n_descsz = men->datasz; en.n_type = men->type; DUMP_WRITE(&en, sizeof(en), foffset); DUMP_WRITE(men->name, en.n_namesz, foffset); if (!alignfile(file, foffset)) return 0; DUMP_WRITE(men->data, men->datasz, foffset); if (!alignfile(file, foffset)) return 0; return 1; } #undef DUMP_WRITE static inline void fill_elf_fdpic_header(struct elfhdr *elf, int segs) { memcpy(elf->e_ident, ELFMAG, SELFMAG); elf->e_ident[EI_CLASS] = ELF_CLASS; elf->e_ident[EI_DATA] = ELF_DATA; elf->e_ident[EI_VERSION] = EV_CURRENT; elf->e_ident[EI_OSABI] = ELF_OSABI; memset(elf->e_ident+EI_PAD, 0, EI_NIDENT-EI_PAD); elf->e_type = ET_CORE; elf->e_machine = ELF_ARCH; elf->e_version = EV_CURRENT; elf->e_entry = 0; elf->e_phoff = sizeof(struct elfhdr); elf->e_shoff = 0; elf->e_flags = ELF_FDPIC_CORE_EFLAGS; elf->e_ehsize = sizeof(struct elfhdr); elf->e_phentsize = sizeof(struct elf_phdr); elf->e_phnum = segs; elf->e_shentsize = 0; elf->e_shnum = 0; elf->e_shstrndx = 0; return; } static inline void fill_elf_note_phdr(struct elf_phdr *phdr, int sz, loff_t offset) { phdr->p_type = PT_NOTE; phdr->p_offset = offset; phdr->p_vaddr = 0; phdr->p_paddr = 0; phdr->p_filesz = sz; phdr->p_memsz = 0; phdr->p_flags = 0; phdr->p_align = 0; return; } static inline void fill_note(struct memelfnote *note, const char *name, int type, unsigned int sz, void *data) { note->name = name; note->type = type; note->datasz = sz; note->data = data; return; } /* * fill up all the fields in prstatus from the given task struct, except * registers which need to be filled up separately. */ static void fill_prstatus(struct elf_prstatus *prstatus, struct task_struct *p, long signr) { prstatus->pr_info.si_signo = prstatus->pr_cursig = signr; prstatus->pr_sigpend = p->pending.signal.sig[0]; prstatus->pr_sighold = p->blocked.sig[0]; rcu_read_lock(); prstatus->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent)); rcu_read_unlock(); prstatus->pr_pid = task_pid_vnr(p); prstatus->pr_pgrp = task_pgrp_vnr(p); prstatus->pr_sid = task_session_vnr(p); if (thread_group_leader(p)) { struct task_cputime cputime; /* * This is the record for the group leader. It shows the * group-wide total, not its individual thread total. */ thread_group_cputime(p, &cputime); cputime_to_timeval(cputime.utime, &prstatus->pr_utime); cputime_to_timeval(cputime.stime, &prstatus->pr_stime); } else { cputime_to_timeval(p->utime, &prstatus->pr_utime); cputime_to_timeval(p->stime, &prstatus->pr_stime); } cputime_to_timeval(p->signal->cutime, &prstatus->pr_cutime); cputime_to_timeval(p->signal->cstime, &prstatus->pr_cstime); prstatus->pr_exec_fdpic_loadmap = p->mm->context.exec_fdpic_loadmap; prstatus->pr_interp_fdpic_loadmap = p->mm->context.interp_fdpic_loadmap; } static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p, struct mm_struct *mm) { const struct cred *cred; unsigned int i, len; /* first copy the parameters from user space */ memset(psinfo, 0, sizeof(struct elf_prpsinfo)); len = mm->arg_end - mm->arg_start; if (len >= ELF_PRARGSZ) len = ELF_PRARGSZ - 1; if (copy_from_user(&psinfo->pr_psargs, (const char __user *) mm->arg_start, len)) return -EFAULT; for (i = 0; i < len; i++) if (psinfo->pr_psargs[i] == 0) psinfo->pr_psargs[i] = ' '; psinfo->pr_psargs[len] = 0; rcu_read_lock(); psinfo->pr_ppid = task_pid_vnr(rcu_dereference(p->real_parent)); rcu_read_unlock(); psinfo->pr_pid = task_pid_vnr(p); psinfo->pr_pgrp = task_pgrp_vnr(p); psinfo->pr_sid = task_session_vnr(p); i = p->state ? ffz(~p->state) + 1 : 0; psinfo->pr_state = i; psinfo->pr_sname = (i > 5) ? '.' : "RSDTZW"[i]; psinfo->pr_zomb = psinfo->pr_sname == 'Z'; psinfo->pr_nice = task_nice(p); psinfo->pr_flag = p->flags; rcu_read_lock(); cred = __task_cred(p); SET_UID(psinfo->pr_uid, from_kuid_munged(cred->user_ns, cred->uid)); SET_GID(psinfo->pr_gid, from_kgid_munged(cred->user_ns, cred->gid)); rcu_read_unlock(); strncpy(psinfo->pr_fname, p->comm, sizeof(psinfo->pr_fname)); return 0; } /* Here is the structure in which status of each thread is captured. */ struct elf_thread_status { struct list_head list; struct elf_prstatus prstatus; /* NT_PRSTATUS */ elf_fpregset_t fpu; /* NT_PRFPREG */ struct task_struct *thread; #ifdef ELF_CORE_COPY_XFPREGS elf_fpxregset_t xfpu; /* ELF_CORE_XFPREG_TYPE */ #endif struct memelfnote notes[3]; int num_notes; }; /* * In order to add the specific thread information for the elf file format, * we need to keep a linked list of every thread's pr_status and then create * a single section for them in the final core file. */ static int elf_dump_thread_status(long signr, struct elf_thread_status *t) { struct task_struct *p = t->thread; int sz = 0; t->num_notes = 0; fill_prstatus(&t->prstatus, p, signr); elf_core_copy_task_regs(p, &t->prstatus.pr_reg); fill_note(&t->notes[0], "CORE", NT_PRSTATUS, sizeof(t->prstatus), &t->prstatus); t->num_notes++; sz += notesize(&t->notes[0]); t->prstatus.pr_fpvalid = elf_core_copy_task_fpregs(p, NULL, &t->fpu); if (t->prstatus.pr_fpvalid) { fill_note(&t->notes[1], "CORE", NT_PRFPREG, sizeof(t->fpu), &t->fpu); t->num_notes++; sz += notesize(&t->notes[1]); } #ifdef ELF_CORE_COPY_XFPREGS if (elf_core_copy_task_xfpregs(p, &t->xfpu)) { fill_note(&t->notes[2], "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(t->xfpu), &t->xfpu); t->num_notes++; sz += notesize(&t->notes[2]); } #endif return sz; } static void fill_extnum_info(struct elfhdr *elf, struct elf_shdr *shdr4extnum, elf_addr_t e_shoff, int segs) { elf->e_shoff = e_shoff; elf->e_shentsize = sizeof(*shdr4extnum); elf->e_shnum = 1; elf->e_shstrndx = SHN_UNDEF; memset(shdr4extnum, 0, sizeof(*shdr4extnum)); shdr4extnum->sh_type = SHT_NULL; shdr4extnum->sh_size = elf->e_shnum; shdr4extnum->sh_link = elf->e_shstrndx; shdr4extnum->sh_info = segs; } /* * dump the segments for an MMU process */ #ifdef CONFIG_MMU static int elf_fdpic_dump_segments(struct file *file, size_t *size, unsigned long *limit, unsigned long mm_flags) { struct vm_area_struct *vma; int err = 0; for (vma = current->mm->mmap; vma; vma = vma->vm_next) { unsigned long addr; if (!maydump(vma, mm_flags)) continue; for (addr = vma->vm_start; addr < vma->vm_end; addr += PAGE_SIZE) { struct page *page = get_dump_page(addr); if (page) { void *kaddr = kmap(page); *size += PAGE_SIZE; if (*size > *limit) err = -EFBIG; else if (!dump_write(file, kaddr, PAGE_SIZE)) err = -EIO; kunmap(page); page_cache_release(page); } else if (!dump_seek(file, PAGE_SIZE)) err = -EFBIG; if (err) goto out; } } out: return err; } #endif /* * dump the segments for a NOMMU process */ #ifndef CONFIG_MMU static int elf_fdpic_dump_segments(struct file *file, size_t *size, unsigned long *limit, unsigned long mm_flags) { struct vm_area_struct *vma; for (vma = current->mm->mmap; vma; vma = vma->vm_next) { if (!maydump(vma, mm_flags)) continue; if ((*size += PAGE_SIZE) > *limit) return -EFBIG; if (!dump_write(file, (void *) vma->vm_start, vma->vm_end - vma->vm_start)) return -EIO; } return 0; } #endif static size_t elf_core_vma_data_size(unsigned long mm_flags) { struct vm_area_struct *vma; size_t size = 0; for (vma = current->mm->mmap; vma; vma = vma->vm_next) if (maydump(vma, mm_flags)) size += vma->vm_end - vma->vm_start; return size; } /* * Actual dumper * * This is a two-pass process; first we find the offsets of the bits, * and then they are actually written out. If we run out of core limit * we just truncate. */ static int elf_fdpic_core_dump(struct coredump_params *cprm) { #define NUM_NOTES 6 int has_dumped = 0; mm_segment_t fs; int segs; size_t size = 0; int i; struct vm_area_struct *vma; struct elfhdr *elf = NULL; loff_t offset = 0, dataoff, foffset; int numnote; struct memelfnote *notes = NULL; struct elf_prstatus *prstatus = NULL; /* NT_PRSTATUS */ struct elf_prpsinfo *psinfo = NULL; /* NT_PRPSINFO */ LIST_HEAD(thread_list); struct list_head *t; elf_fpregset_t *fpu = NULL; #ifdef ELF_CORE_COPY_XFPREGS elf_fpxregset_t *xfpu = NULL; #endif int thread_status_size = 0; elf_addr_t *auxv; struct elf_phdr *phdr4note = NULL; struct elf_shdr *shdr4extnum = NULL; Elf_Half e_phnum; elf_addr_t e_shoff; /* * We no longer stop all VM operations. * * This is because those proceses that could possibly change map_count * or the mmap / vma pages are now blocked in do_exit on current * finishing this core dump. * * Only ptrace can touch these memory addresses, but it doesn't change * the map_count or the pages allocated. So no possibility of crashing * exists while dumping the mm->vm_next areas to the core file. */ /* alloc memory for large data structures: too large to be on stack */ elf = kmalloc(sizeof(*elf), GFP_KERNEL); if (!elf) goto cleanup; prstatus = kzalloc(sizeof(*prstatus), GFP_KERNEL); if (!prstatus) goto cleanup; psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL); if (!psinfo) goto cleanup; notes = kmalloc(NUM_NOTES * sizeof(struct memelfnote), GFP_KERNEL); if (!notes) goto cleanup; fpu = kmalloc(sizeof(*fpu), GFP_KERNEL); if (!fpu) goto cleanup; #ifdef ELF_CORE_COPY_XFPREGS xfpu = kmalloc(sizeof(*xfpu), GFP_KERNEL); if (!xfpu) goto cleanup; #endif if (cprm->siginfo->si_signo) { struct core_thread *ct; struct elf_thread_status *tmp; for (ct = current->mm->core_state->dumper.next; ct; ct = ct->next) { tmp = kzalloc(sizeof(*tmp), GFP_KERNEL); if (!tmp) goto cleanup; tmp->thread = ct->task; list_add(&tmp->list, &thread_list); } list_for_each(t, &thread_list) { struct elf_thread_status *tmp; int sz; tmp = list_entry(t, struct elf_thread_status, list); sz = elf_dump_thread_status(cprm->siginfo->si_signo, tmp); thread_status_size += sz; } } /* now collect the dump for the current */ fill_prstatus(prstatus, current, cprm->siginfo->si_signo); elf_core_copy_regs(&prstatus->pr_reg, cprm->regs); segs = current->mm->map_count; segs += elf_core_extra_phdrs(); /* for notes section */ segs++; /* If segs > PN_XNUM(0xffff), then e_phnum overflows. To avoid * this, kernel supports extended numbering. Have a look at * include/linux/elf.h for further information. */ e_phnum = segs > PN_XNUM ? PN_XNUM : segs; /* Set up header */ fill_elf_fdpic_header(elf, e_phnum); has_dumped = 1; current->flags |= PF_DUMPCORE; /* * Set up the notes in similar form to SVR4 core dumps made * with info from their /proc. */ fill_note(notes + 0, "CORE", NT_PRSTATUS, sizeof(*prstatus), prstatus); fill_psinfo(psinfo, current->group_leader, current->mm); fill_note(notes + 1, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); numnote = 2; auxv = (elf_addr_t *) current->mm->saved_auxv; i = 0; do i += 2; while (auxv[i - 2] != AT_NULL); fill_note(&notes[numnote++], "CORE", NT_AUXV, i * sizeof(elf_addr_t), auxv); /* Try to dump the FPU. */ if ((prstatus->pr_fpvalid = elf_core_copy_task_fpregs(current, cprm->regs, fpu))) fill_note(notes + numnote++, "CORE", NT_PRFPREG, sizeof(*fpu), fpu); #ifdef ELF_CORE_COPY_XFPREGS if (elf_core_copy_task_xfpregs(current, xfpu)) fill_note(notes + numnote++, "LINUX", ELF_CORE_XFPREG_TYPE, sizeof(*xfpu), xfpu); #endif fs = get_fs(); set_fs(KERNEL_DS); offset += sizeof(*elf); /* Elf header */ offset += segs * sizeof(struct elf_phdr); /* Program headers */ foffset = offset; /* Write notes phdr entry */ { int sz = 0; for (i = 0; i < numnote; i++) sz += notesize(notes + i); sz += thread_status_size; phdr4note = kmalloc(sizeof(*phdr4note), GFP_KERNEL); if (!phdr4note) goto end_coredump; fill_elf_note_phdr(phdr4note, sz, offset); offset += sz; } /* Page-align dumped data */ dataoff = offset = roundup(offset, ELF_EXEC_PAGESIZE); offset += elf_core_vma_data_size(cprm->mm_flags); offset += elf_core_extra_data_size(); e_shoff = offset; if (e_phnum == PN_XNUM) { shdr4extnum = kmalloc(sizeof(*shdr4extnum), GFP_KERNEL); if (!shdr4extnum) goto end_coredump; fill_extnum_info(elf, shdr4extnum, e_shoff, segs); } offset = dataoff; size += sizeof(*elf); if (size > cprm->limit || !dump_write(cprm->file, elf, sizeof(*elf))) goto end_coredump; size += sizeof(*phdr4note); if (size > cprm->limit || !dump_write(cprm->file, phdr4note, sizeof(*phdr4note))) goto end_coredump; /* write program headers for segments dump */ for (vma = current->mm->mmap; vma; vma = vma->vm_next) { struct elf_phdr phdr; size_t sz; sz = vma->vm_end - vma->vm_start; phdr.p_type = PT_LOAD; phdr.p_offset = offset; phdr.p_vaddr = vma->vm_start; phdr.p_paddr = 0; phdr.p_filesz = maydump(vma, cprm->mm_flags) ? sz : 0; phdr.p_memsz = sz; offset += phdr.p_filesz; phdr.p_flags = vma->vm_flags & VM_READ ? PF_R : 0; if (vma->vm_flags & VM_WRITE) phdr.p_flags |= PF_W; if (vma->vm_flags & VM_EXEC) phdr.p_flags |= PF_X; phdr.p_align = ELF_EXEC_PAGESIZE; size += sizeof(phdr); if (size > cprm->limit || !dump_write(cprm->file, &phdr, sizeof(phdr))) goto end_coredump; } if (!elf_core_write_extra_phdrs(cprm->file, offset, &size, cprm->limit)) goto end_coredump; /* write out the notes section */ for (i = 0; i < numnote; i++) if (!writenote(notes + i, cprm->file, &foffset)) goto end_coredump; /* write out the thread status notes section */ list_for_each(t, &thread_list) { struct elf_thread_status *tmp = list_entry(t, struct elf_thread_status, list); for (i = 0; i < tmp->num_notes; i++) if (!writenote(&tmp->notes[i], cprm->file, &foffset)) goto end_coredump; } if (!dump_seek(cprm->file, dataoff - foffset)) goto end_coredump; if (elf_fdpic_dump_segments(cprm->file, &size, &cprm->limit, cprm->mm_flags) < 0) goto end_coredump; if (!elf_core_write_extra_data(cprm->file, &size, cprm->limit)) goto end_coredump; if (e_phnum == PN_XNUM) { size += sizeof(*shdr4extnum); if (size > cprm->limit || !dump_write(cprm->file, shdr4extnum, sizeof(*shdr4extnum))) goto end_coredump; } if (cprm->file->f_pos != offset) { /* Sanity check */ printk(KERN_WARNING "elf_core_dump: file->f_pos (%lld) != offset (%lld)\n", cprm->file->f_pos, offset); } end_coredump: set_fs(fs); cleanup: while (!list_empty(&thread_list)) { struct list_head *tmp = thread_list.next; list_del(tmp); kfree(list_entry(tmp, struct elf_thread_status, list)); } kfree(phdr4note); kfree(elf); kfree(prstatus); kfree(psinfo); kfree(notes); kfree(fpu); kfree(shdr4extnum); #ifdef ELF_CORE_COPY_XFPREGS kfree(xfpu); #endif return has_dumped; #undef NUM_NOTES } #endif /* CONFIG_ELF_CORE */
SanDisk-Open-Source/SSD_Dashboard
uefi/linux-source-3.8.0/fs/binfmt_elf_fdpic.c
C
gpl-2.0
49,684
[ 30522, 1013, 1008, 8026, 16715, 2102, 1035, 17163, 1035, 1042, 18927, 2594, 1012, 1039, 1024, 1042, 18927, 2594, 17163, 12441, 4289, 1008, 1008, 9385, 1006, 1039, 1007, 2494, 1010, 2432, 1010, 2294, 2417, 6045, 1010, 4297, 1012, 2035, 2916,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package com.mygdx.generate.client; import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.backends.gwt.GwtApplication; import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration; import com.mygdx.main.PassGenerate; public class HtmlLauncher extends GwtApplication { @Override public GwtApplicationConfiguration getConfig () { return new GwtApplicationConfiguration(480, 320); } @Override public ApplicationListener getApplicationListener () { return new PassGenerate(); } }
Snessy/PasswordGen-LibGDX
html/src/com/mygdx/generate/client/HtmlLauncher.java
Java
gpl-2.0
577
[ 30522, 7427, 4012, 1012, 2026, 2290, 2094, 2595, 1012, 9699, 1012, 7396, 1025, 12324, 4012, 1012, 2919, 27179, 1012, 1043, 2094, 2595, 1012, 4646, 9863, 24454, 1025, 12324, 4012, 1012, 2919, 27179, 1012, 1043, 2094, 2595, 1012, 2067, 10497,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright 2016 Tim Shannon. All rights reserved. // Use of this source code is governed by the MIT license // that can be found in the LICENSE file. package bolthold import ( "reflect" "github.com/boltdb/bolt" ) // Delete deletes a record from the bolthold, datatype just needs to be an example of the type stored so that // the proper bucket and indexes are updated func (s *Store) Delete(key, dataType interface{}) error { return s.Bolt().Update(func(tx *bolt.Tx) error { return s.TxDelete(tx, key, dataType) }) } // TxDelete is the same as Delete except it allows you specify your own transaction func (s *Store) TxDelete(tx *bolt.Tx, key, dataType interface{}) error { if !tx.Writable() { return bolt.ErrTxNotWritable } storer := newStorer(dataType) gk, err := encode(key) if err != nil { return err } b := tx.Bucket([]byte(storer.Type())) if b == nil { return ErrNotFound } value := reflect.New(reflect.TypeOf(dataType)).Interface() bVal := b.Get(gk) err = decode(bVal, value) if err != nil { return err } // delete data err = b.Delete(gk) if err != nil { return err } // remove any indexes err = indexDelete(storer, tx, gk, value) if err != nil { return err } return nil } // DeleteMatching deletes all of the records that match the passed in query func (s *Store) DeleteMatching(dataType interface{}, query *Query) error { return s.Bolt().Update(func(tx *bolt.Tx) error { return s.TxDeleteMatching(tx, dataType, query) }) } // TxDeleteMatching does the same as DeleteMatching, but allows you to specify your own transaction func (s *Store) TxDeleteMatching(tx *bolt.Tx, dataType interface{}, query *Query) error { return deleteQuery(tx, dataType, query) }
veino/logfan
vendor/github.com/timshannon/bolthold/delete.go
GO
apache-2.0
1,729
[ 30522, 30524, 1013, 2008, 2064, 2022, 2179, 1999, 1996, 6105, 5371, 1012, 7427, 10053, 12640, 12324, 1006, 1000, 8339, 1000, 1000, 21025, 2705, 12083, 1012, 4012, 1013, 10053, 18939, 1013, 10053, 1000, 1007, 1013, 1013, 3972, 12870, 3972, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!-- HTML header for doxygen 1.8.11--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>Kesh UI: UKUIListContainer Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="KeshUI_style.doxy" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Kesh UI &#160;<span id="projectnumber">1.0</span> </div> <div id="projectbrief">A Canvas-based Unreal Engine 4 user interface framework, compatible with c++ and bp.</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('class_u_k_u_i_list_container.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pro-methods">Protected Member Functions</a> &#124; <a href="#pro-attribs">Protected Attributes</a> &#124; <a href="#pri-methods">Private Member Functions</a> &#124; <a href="class_u_k_u_i_list_container-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">UKUIListContainer Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include &lt;<a class="el" href="_k_u_i_list_container_8h_source.html">Classes/KeshUI/Container/KUIListContainer.h</a>&gt;</code></p> <div class="dynheader"> Inheritance diagram for UKUIListContainer:</div> <div class="dyncontent"> <div class="center"> <img src="class_u_k_u_i_list_container.png" usemap="#UKUIListContainer_map" alt=""/> <map id="UKUIListContainer_map" name="UKUIListContainer_map"> <area href="class_u_k_u_i_interface_container.html" alt="UKUIInterfaceContainer" shape="rect" coords="0,112,144,136"/> <area href="class_u_k_u_i_interface_element.html" alt="UKUIInterfaceElement" shape="rect" coords="0,56,144,80"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a95275d7d1633909fd31a54197b025099"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95275d7d1633909fd31a54197b025099"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsSelectEnabled</b> () const </td></tr> <tr class="separator:a95275d7d1633909fd31a54197b025099"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a7e5d305d42ec570e9385abfe525fc91f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e5d305d42ec570e9385abfe525fc91f"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectEnabled</b> (bool bEnabled)</td></tr> <tr class="separator:a7e5d305d42ec570e9385abfe525fc91f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac97db37284ca9e7ffad1ef26c95051fb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac97db37284ca9e7ffad1ef26c95051fb"></a> <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetRowBP</b> (int32 iRow) const </td></tr> <tr class="separator:ac97db37284ca9e7ffad1ef26c95051fb"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1eee65e5f6c4f2df4e7a96c73cc20bad"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1eee65e5f6c4f2df4e7a96c73cc20bad"></a> virtual <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetRow</b> (uint16 iRow) const </td></tr> <tr class="separator:a1eee65e5f6c4f2df4e7a96c73cc20bad"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a100edba6ae9b8edd127965ff294d048a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a100edba6ae9b8edd127965ff294d048a"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRowBP</b> (int32 iRow, <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:a100edba6ae9b8edd127965ff294d048a"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a02ee220d2df7f2ef78e09198914edd6f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a02ee220d2df7f2ef78e09198914edd6f"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRow</b> (uint16 iRow, <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:a02ee220d2df7f2ef78e09198914edd6f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0e98e9acd15e2068c140f04f3a604fbc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e98e9acd15e2068c140f04f3a604fbc"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveRowByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:a0e98e9acd15e2068c140f04f3a604fbc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adfe804cf52b8da1bd78c8aad521a80c1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adfe804cf52b8da1bd78c8aad521a80c1"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveRowByIndexBP</b> (int32 iRow)</td></tr> <tr class="separator:adfe804cf52b8da1bd78c8aad521a80c1"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5219d37810a4d90b4da98350fa0edb23"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5219d37810a4d90b4da98350fa0edb23"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveRowByIndex</b> (uint16 iRow)</td></tr> <tr class="separator:a5219d37810a4d90b4da98350fa0edb23"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a06e90bc9514049a74b620881b733d2e8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06e90bc9514049a74b620881b733d2e8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddChild</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oChild) override</td></tr> <tr class="separator:a06e90bc9514049a74b620881b733d2e8"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a54ca1a60b337b9c8e70e8deeb83e181d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54ca1a60b337b9c8e70e8deeb83e181d"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveChild</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oChild) override</td></tr> <tr class="separator:a54ca1a60b337b9c8e70e8deeb83e181d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac09cbcdc39251b63755db23180ca9348"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac09cbcdc39251b63755db23180ca9348"></a> int32&#160;</td><td class="memItemRight" valign="bottom"><b>GetRowCountBP</b> () const </td></tr> <tr class="separator:ac09cbcdc39251b63755db23180ca9348"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a58d535c3709dee918a3744b3a630073f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58d535c3709dee918a3744b3a630073f"></a> virtual uint16&#160;</td><td class="memItemRight" valign="bottom"><b>GetRowCount</b> () const </td></tr> <tr class="separator:a58d535c3709dee918a3744b3a630073f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5e056221e938d6a241a23018060bbab3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e056221e938d6a241a23018060bbab3"></a> virtual uint8&#160;</td><td class="memItemRight" valign="bottom"><b>AddRow</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow=NULL)</td></tr> <tr class="separator:a5e056221e938d6a241a23018060bbab3"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6bd99e2dc7ff16451943d48106195a7c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6bd99e2dc7ff16451943d48106195a7c"></a> virtual <a class="el" href="class_u_k_u_i_list_row_column_container.html">UKUIListRowColumnContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>AddRowColumns</b> (const TArray&lt; float &gt; &amp;arWidths)</td></tr> <tr class="separator:a6bd99e2dc7ff16451943d48106195a7c"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a039d421214b0b9971ef10074f45c3a42"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a039d421214b0b9971ef10074f45c3a42"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRowCountBP</b> (int32 iRowCount)</td></tr> <tr class="separator:a039d421214b0b9971ef10074f45c3a42"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae0b073fd4231f02416197e1f2b3ce1e4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0b073fd4231f02416197e1f2b3ce1e4"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRowCount</b> (uint16 iRowCount)</td></tr> <tr class="separator:ae0b073fd4231f02416197e1f2b3ce1e4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5d8eeb634e352afc2041738eece3e7ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d8eeb634e352afc2041738eece3e7ae"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveRowsBP</b> (int32 iStart, int32 iCount)</td></tr> <tr class="separator:a5d8eeb634e352afc2041738eece3e7ae"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a512269017b4877f22770699d72be24cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a512269017b4877f22770699d72be24cc"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveRows</b> (uint16 iStart, uint16 iCount)</td></tr> <tr class="separator:a512269017b4877f22770699d72be24cc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad8f8bdaa04af80a8fadd862ac32f3754"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8f8bdaa04af80a8fadd862ac32f3754"></a> virtual float&#160;</td><td class="memItemRight" valign="bottom"><b>GetMinimumRowHeight</b> () const </td></tr> <tr class="separator:ad8f8bdaa04af80a8fadd862ac32f3754"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a26dd13b949937fb79df3b8ad569df3e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26dd13b949937fb79df3b8ad569df3e5"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMinimumRowHeight</b> (float fHeight)</td></tr> <tr class="separator:a26dd13b949937fb79df3b8ad569df3e5"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aecade68cc36fca617cdf610051ee4f72"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aecade68cc36fca617cdf610051ee4f72"></a> virtual float&#160;</td><td class="memItemRight" valign="bottom"><b>GetMaximumRowHeight</b> () const </td></tr> <tr class="separator:aecade68cc36fca617cdf610051ee4f72"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a27ad91f4e3320e0f0e4d5594c9743880"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a27ad91f4e3320e0f0e4d5594c9743880"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMaximumRowHeight</b> (float fHeight)</td></tr> <tr class="separator:a27ad91f4e3320e0f0e4d5594c9743880"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8237065d856d46e3b220019aa91d85b7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8237065d856d46e3b220019aa91d85b7"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRowHeight</b> (float fHeight)</td></tr> <tr class="separator:a8237065d856d46e3b220019aa91d85b7"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1c7925287097386cbad78ed96c5fbd11"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c7925287097386cbad78ed96c5fbd11"></a> virtual float&#160;</td><td class="memItemRight" valign="bottom"><b>GetRowSpacing</b> () const </td></tr> <tr class="separator:a1c7925287097386cbad78ed96c5fbd11"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0fcce364a3a23f83668347f46f841bff"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fcce364a3a23f83668347f46f841bff"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetRowSpacing</b> (float fSpacing)</td></tr> <tr class="separator:a0fcce364a3a23f83668347f46f841bff"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa366f9b08320e0c7abc4f1f3ebe55ce8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa366f9b08320e0c7abc4f1f3ebe55ce8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSize</b> (float fWidth, float fHeight) override</td></tr> <tr class="separator:aa366f9b08320e0c7abc4f1f3ebe55ce8"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8f20fca9aa06a4679f35880ebd4da09b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f20fca9aa06a4679f35880ebd4da09b"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsRowSelected</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow) const </td></tr> <tr class="separator:a8f20fca9aa06a4679f35880ebd4da09b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab9b2fb24aa9e1a4f19f03d3545fc4666"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9b2fb24aa9e1a4f19f03d3545fc4666"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnRowSelectionClick</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:ab9b2fb24aa9e1a4f19f03d3545fc4666"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aaae2799c60ca120fac1b6d94a5fa3b8f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaae2799c60ca120fac1b6d94a5fa3b8f"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsMultiSelectEnabled</b> () const </td></tr> <tr class="separator:aaae2799c60ca120fac1b6d94a5fa3b8f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad61a16721be71d55e553c96be8defdca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad61a16721be71d55e553c96be8defdca"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMultiSelectEnabled</b> (bool bEnabled)</td></tr> <tr class="separator:ad61a16721be71d55e553c96be8defdca"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a82c52fbe66d5f9e06c2393fe2432acc8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a82c52fbe66d5f9e06c2393fe2432acc8"></a> virtual <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRow</b> () const </td></tr> <tr class="separator:a82c52fbe66d5f9e06c2393fe2432acc8"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9cd26e0f14f6bb86dd5bd79fe05470a9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9cd26e0f14f6bb86dd5bd79fe05470a9"></a> virtual const TArray&lt; TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> &gt; &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRows</b> () const </td></tr> <tr class="separator:a9cd26e0f14f6bb86dd5bd79fe05470a9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa1f87c9d88b1c8122854dd97c49d38da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1f87c9d88b1c8122854dd97c49d38da"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsRowSelectedByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow) const </td></tr> <tr class="separator:aa1f87c9d88b1c8122854dd97c49d38da"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a99a5047924ed70ed9522a6f5483a56b2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99a5047924ed70ed9522a6f5483a56b2"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsRowSelectedByIndexBP</b> (int32 iRow) const </td></tr> <tr class="separator:a99a5047924ed70ed9522a6f5483a56b2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9f102753a22a765d86075695b49ca21d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f102753a22a765d86075695b49ca21d"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsRowSelectedByIndex</b> (uint16 iRow) const </td></tr> <tr class="separator:a9f102753a22a765d86075695b49ca21d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abdc4b06d47f3203e699625245d486ef5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abdc4b06d47f3203e699625245d486ef5"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AreRowsSelectedByRef</b> (const TArray&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> * &gt; &amp;arRows) const </td></tr> <tr class="separator:abdc4b06d47f3203e699625245d486ef5"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aea05a101e8e193f068da7574b88d9861"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aea05a101e8e193f068da7574b88d9861"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>AreRowsSelectedByIndexBP</b> (const TArray&lt; int32 &gt; &amp;arRows) const </td></tr> <tr class="separator:aea05a101e8e193f068da7574b88d9861"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab7384ae1d18266859bf23880cbbd0e2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7384ae1d18266859bf23880cbbd0e2d"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AreRowsSelectedByIndex</b> (const TArray&lt; uint16 &gt; &amp;arRows) const </td></tr> <tr class="separator:ab7384ae1d18266859bf23880cbbd0e2d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a541e15d455f166e2deedbd4dbf92cbb2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a541e15d455f166e2deedbd4dbf92cbb2"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:a541e15d455f166e2deedbd4dbf92cbb2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a37ba40769725849c44e2ab0613084f4c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37ba40769725849c44e2ab0613084f4c"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowByIndexBP</b> (int32 iRow)</td></tr> <tr class="separator:a37ba40769725849c44e2ab0613084f4c"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ada613f2295e168e73b419eea5a62c41b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ada613f2295e168e73b419eea5a62c41b"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowByIndex</b> (uint16 iRow)</td></tr> <tr class="separator:ada613f2295e168e73b419eea5a62c41b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af7b98ad139d997a20f05dc2b01eab5a0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af7b98ad139d997a20f05dc2b01eab5a0"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowsByRef</b> (const TArray&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> * &gt; &amp;arRows)</td></tr> <tr class="separator:af7b98ad139d997a20f05dc2b01eab5a0"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a049f12395692c9949b11106e57c30e02"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a049f12395692c9949b11106e57c30e02"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowsByIndexBP</b> (const TArray&lt; int32 &gt; &amp;arRows)</td></tr> <tr class="separator:a049f12395692c9949b11106e57c30e02"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4495dd2b423a59a9c3200a1c0253386c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4495dd2b423a59a9c3200a1c0253386c"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectedRowsByIndex</b> (const TArray&lt; uint16 &gt; &amp;arRows)</td></tr> <tr class="separator:a4495dd2b423a59a9c3200a1c0253386c"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aef379f9814592b92f57810be9acf2298"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef379f9814592b92f57810be9acf2298"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:aef379f9814592b92f57810be9acf2298"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8e6b8f3a69fb9625ff025a6a2ac7425c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e6b8f3a69fb9625ff025a6a2ac7425c"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowByIndexBP</b> (int32 iRow)</td></tr> <tr class="separator:a8e6b8f3a69fb9625ff025a6a2ac7425c"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aee762da4224c2d37e77b23a17e7ac152"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee762da4224c2d37e77b23a17e7ac152"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowByIndex</b> (uint16 iRow)</td></tr> <tr class="separator:aee762da4224c2d37e77b23a17e7ac152"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a72b19544eedd0d18b22776a3c373c9dc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a72b19544eedd0d18b22776a3c373c9dc"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowsByRef</b> (const TArray&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> * &gt; &amp;arRows)</td></tr> <tr class="separator:a72b19544eedd0d18b22776a3c373c9dc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a226af6e2a543ba33495d9913a5b7acdb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a226af6e2a543ba33495d9913a5b7acdb"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowsByIndexBP</b> (const TArray&lt; int32 &gt; &amp;arRows)</td></tr> <tr class="separator:a226af6e2a543ba33495d9913a5b7acdb"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a67e6baf075124d2c5e3aa87eb28647e7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a67e6baf075124d2c5e3aa87eb28647e7"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>AddSelectedRowsByIndex</b> (const TArray&lt; uint16 &gt; &amp;arRows)</td></tr> <tr class="separator:a67e6baf075124d2c5e3aa87eb28647e7"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9855a0d09c7a81e74ac51b8b1b1e8a55"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9855a0d09c7a81e74ac51b8b1b1e8a55"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow)</td></tr> <tr class="separator:a9855a0d09c7a81e74ac51b8b1b1e8a55"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4014198bcedc149369866870379364f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4014198bcedc149369866870379364f9"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowByIndexBP</b> (int32 iRow)</td></tr> <tr class="separator:a4014198bcedc149369866870379364f9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a234b49a3133e8540570d5997f2eb75fc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a234b49a3133e8540570d5997f2eb75fc"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowByIndex</b> (uint16 iRow)</td></tr> <tr class="separator:a234b49a3133e8540570d5997f2eb75fc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adc08cf091a0179d9027597801b04254d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc08cf091a0179d9027597801b04254d"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowsByRef</b> (const TArray&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> * &gt; &amp;arRows)</td></tr> <tr class="separator:adc08cf091a0179d9027597801b04254d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac17a9af930a5fbf1d19726b5a3a98d30"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac17a9af930a5fbf1d19726b5a3a98d30"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowsByIndexBP</b> (const TArray&lt; int32 &gt; &amp;arRows)</td></tr> <tr class="separator:ac17a9af930a5fbf1d19726b5a3a98d30"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a60bdf58713091cc9d0c6535dc8be32ea"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a60bdf58713091cc9d0c6535dc8be32ea"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveSelectedRowsByIndex</b> (const TArray&lt; uint16 &gt; &amp;arRows)</td></tr> <tr class="separator:a60bdf58713091cc9d0c6535dc8be32ea"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aba1d3853d2483e738fe00b1da7f4e8d8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba1d3853d2483e738fe00b1da7f4e8d8"></a> int32&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRowIndexBP</b> () const </td></tr> <tr class="separator:aba1d3853d2483e738fe00b1da7f4e8d8"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab155ed0a931ef021047d92179fa0dc83"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab155ed0a931ef021047d92179fa0dc83"></a> virtual uint16&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRowIndex</b> () const </td></tr> <tr class="separator:ab155ed0a931ef021047d92179fa0dc83"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abb6c167570b29a953841858b9b2bcd01"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb6c167570b29a953841858b9b2bcd01"></a> TArray&lt; int32 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRowIndicesBP</b> () const </td></tr> <tr class="separator:abb6c167570b29a953841858b9b2bcd01"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a334d748a98e9ff264870647f0c53f715"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a334d748a98e9ff264870647f0c53f715"></a> virtual TArray&lt; uint16 &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRowIndices</b> () const </td></tr> <tr class="separator:a334d748a98e9ff264870647f0c53f715"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a80be6858fa5afe7f575e56eaf7540f04"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a80be6858fa5afe7f575e56eaf7540f04"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnClick</b> (<a class="el" href="class_u_k_u_i_simple_click_widget.html">UKUISimpleClickWidget</a> *oWidget, const FVector2D &amp;v2CursorOffset)</td></tr> <tr class="separator:a80be6858fa5afe7f575e56eaf7540f04"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af9c1557401d0c319ef4a441586aae231"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af9c1557401d0c319ef4a441586aae231"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSelectionChangeDelegate</b> (UObject *oObject, FKUIListRowContainerSelectionChangePrototype fnSelectionChangeDelegate)</td></tr> <tr class="separator:af9c1557401d0c319ef4a441586aae231"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aeae68fc1ead45fca75bfce61141005a2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeae68fc1ead45fca75bfce61141005a2"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsChildsLayoutManaged</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oChild) const override</td></tr> <tr class="separator:aeae68fc1ead45fca75bfce61141005a2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pub_methods_class_u_k_u_i_interface_container"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_u_k_u_i_interface_container')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a></td></tr> <tr class="memitem:ae1e2c751ce60ec092be4bff701c7937e inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae1e2c751ce60ec092be4bff701c7937e"></a> virtual const FVector2D &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetSize</b> () const override</td></tr> <tr class="separator:ae1e2c751ce60ec092be4bff701c7937e inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aef262f6881090292c8e351f6c05c35e8 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef262f6881090292c8e351f6c05c35e8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetSizeStruct</b> (const FVector2D &amp;v2Size)</td></tr> <tr class="separator:aef262f6881090292c8e351f6c05c35e8 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a85f977de9aca0deeb43031378019c2d9 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85f977de9aca0deeb43031378019c2d9"></a> virtual <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetChildAtIndex</b> (int32 iIndex) const </td></tr> <tr class="separator:a85f977de9aca0deeb43031378019c2d9 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8177974fd28f7c752029c4692fcffa69 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8177974fd28f7c752029c4692fcffa69"></a> virtual TArray&lt; <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> * &gt;::TIterator&#160;</td><td class="memItemRight" valign="bottom"><b>GetChildIterator</b> ()</td></tr> <tr class="separator:a8177974fd28f7c752029c4692fcffa69 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a33a63c92149ef769dd9e0bf5e2993883 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a33a63c92149ef769dd9e0bf5e2993883"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SortChildren</b> ()</td></tr> <tr class="separator:a33a63c92149ef769dd9e0bf5e2993883 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adcd919332267b212dc303f4e53b98eec inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adcd919332267b212dc303f4e53b98eec"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>CanReceieveMouseEvents</b> () const </td></tr> <tr class="separator:adcd919332267b212dc303f4e53b98eec inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9ffa30443ea1ffb882a37da2323e683e inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ffa30443ea1ffb882a37da2323e683e"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>CanReceieveKeyEvents</b> () const </td></tr> <tr class="separator:a9ffa30443ea1ffb882a37da2323e683e inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5c68968056a07beea90461ad69cf231c inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5c68968056a07beea90461ad69cf231c"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetVisible</b> (bool bVisible) override</td></tr> <tr class="separator:a5c68968056a07beea90461ad69cf231c inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6e77a797bc26c4bf355005a1d933c5b5 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6e77a797bc26c4bf355005a1d933c5b5"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>Render</b> (<a class="el" href="class_a_k_u_i_interface.html">AKUIInterface</a> *aHud, UCanvas *oCanvas, const FVector2D &amp;v2Origin, <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oRenderCacheObject=NULL) override</td></tr> <tr class="separator:a6e77a797bc26c4bf355005a1d933c5b5 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2729a928339a7cf4fd7bdb00c345fcba inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2729a928339a7cf4fd7bdb00c345fcba"></a> virtual int16&#160;</td><td class="memItemRight" valign="bottom"><b>GetTickRequests</b> () const </td></tr> <tr class="separator:a2729a928339a7cf4fd7bdb00c345fcba inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa1a46bf44096c025c2ea8a9259a288be inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa1a46bf44096c025c2ea8a9259a288be"></a> virtual int16&#160;</td><td class="memItemRight" valign="bottom"><b>GetMouseInputRequests</b> () const </td></tr> <tr class="separator:aa1a46bf44096c025c2ea8a9259a288be inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6eb0f1269092efe27f68c6b8fd91f55c inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6eb0f1269092efe27f68c6b8fd91f55c"></a> virtual int16&#160;</td><td class="memItemRight" valign="bottom"><b>GetKeyInputRequests</b> () const </td></tr> <tr class="separator:a6eb0f1269092efe27f68c6b8fd91f55c inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8ade1b1b3f131fd3a75daeb4348223e4 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8ade1b1b3f131fd3a75daeb4348223e4"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddChildManager</b> (<a class="el" href="class_u_k_u_i_interface_widget_child_manager.html">UKUIInterfaceWidgetChildManager</a> *oChildManager)</td></tr> <tr class="separator:a8ade1b1b3f131fd3a75daeb4348223e4 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a641349c8a8dc92368f167250fd1c52dd inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a641349c8a8dc92368f167250fd1c52dd"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveChildManager</b> (<a class="el" href="class_u_k_u_i_interface_widget_child_manager.html">UKUIInterfaceWidgetChildManager</a> *oChildManager)</td></tr> <tr class="separator:a641349c8a8dc92368f167250fd1c52dd inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab168bcb824dd2d2125bf6368cdb82afa inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab168bcb824dd2d2125bf6368cdb82afa"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>UpdateChildManagers</b> ()</td></tr> <tr class="separator:ab168bcb824dd2d2125bf6368cdb82afa inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2611ef825eeb33ee819fb19d1c5772af inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2611ef825eeb33ee819fb19d1c5772af"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>HasValidLayout</b> () const </td></tr> <tr class="separator:a2611ef825eeb33ee819fb19d1c5772af inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0b04cb2948fe00e35ce3b8e3bdb3ab62 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b04cb2948fe00e35ce3b8e3bdb3ab62"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>InvalidateLayout</b> ()</td></tr> <tr class="separator:a0b04cb2948fe00e35ce3b8e3bdb3ab62 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3042ac0ddec9d30551eff83065e65240 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3042ac0ddec9d30551eff83065e65240"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>RespondsToEvent</b> (uint8 iEventID) const override</td></tr> <tr class="separator:a3042ac0ddec9d30551eff83065e65240 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adf0a66ba6f565bd4bcde1bcb6d235ae3 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf0a66ba6f565bd4bcde1bcb6d235ae3"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SendEvent</b> (<a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo) override</td></tr> <tr class="separator:adf0a66ba6f565bd4bcde1bcb6d235ae3 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a99ecdf9ab0dc072aeea702cd975921b9 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99ecdf9ab0dc072aeea702cd975921b9"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>BroadcastEvent</b> (<a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo, bool bTopDown=false)</td></tr> <tr class="separator:a99ecdf9ab0dc072aeea702cd975921b9 inherit pub_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pub_methods_class_u_k_u_i_interface_element"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_u_k_u_i_interface_element')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a></td></tr> <tr class="memitem:aa9535522c4940f0b1f0c8c0f24a1945b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa9535522c4940f0b1f0c8c0f24a1945b"></a> virtual <a class="el" href="class_a_k_u_i_interface.html">AKUIInterface</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetInterface</b> () const </td></tr> <tr class="separator:aa9535522c4940f0b1f0c8c0f24a1945b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a75744944206779ff9812f3c419a1726a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75744944206779ff9812f3c419a1726a"></a> virtual <a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetContainer</b> () const </td></tr> <tr class="separator:a75744944206779ff9812f3c419a1726a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a47d97f42960082d6db64f6be18a53117 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a47d97f42960082d6db64f6be18a53117"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetContainer</b> (<a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a> *ctContainer)</td></tr> <tr class="separator:a47d97f42960082d6db64f6be18a53117 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a85a7d7b2ea7f713fa81185f83d00311a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85a7d7b2ea7f713fa81185f83d00311a"></a> virtual FORCEINLINE UObject **&#160;</td><td class="memItemRight" valign="bottom"><b>GetAsset</b> (const FName &amp;nName) const </td></tr> <tr class="separator:a85a7d7b2ea7f713fa81185f83d00311a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8f46331f3d75eed95fae7f0ddc3bc5da inherit pub_methods_class_u_k_u_i_interface_element"><td class="memTemplParams" colspan="2"><a class="anchor" id="a8f46331f3d75eed95fae7f0ddc3bc5da"></a> template&lt;class T &gt; </td></tr> <tr class="memitem:a8f46331f3d75eed95fae7f0ddc3bc5da inherit pub_methods_class_u_k_u_i_interface_element"><td class="memTemplItemLeft" align="right" valign="top">FORCEINLINE T **&#160;</td><td class="memTemplItemRight" valign="bottom"><b>GetAsset</b> (const FName &amp;nName) const </td></tr> <tr class="separator:a8f46331f3d75eed95fae7f0ddc3bc5da inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a09e3592623fd097d0e6e6607b1fc46e4 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09e3592623fd097d0e6e6607b1fc46e4"></a> virtual UWorld *&#160;</td><td class="memItemRight" valign="bottom"><b>GetWorld</b> () const override</td></tr> <tr class="separator:a09e3592623fd097d0e6e6607b1fc46e4 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa8127cc796d170d27a71c1155cd9ae87 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa8127cc796d170d27a71c1155cd9ae87"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsVisible</b> () const </td></tr> <tr class="separator:aa8127cc796d170d27a71c1155cd9ae87 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac298daeba5d2b43ed991f901a8d9e50d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac298daeba5d2b43ed991f901a8d9e50d"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsVisibleRecursive</b> () const </td></tr> <tr class="separator:ac298daeba5d2b43ed991f901a8d9e50d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af82eac10dc49caa94efefd24b62cdb76 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af82eac10dc49caa94efefd24b62cdb76"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsDisabled</b> () const </td></tr> <tr class="separator:af82eac10dc49caa94efefd24b62cdb76 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aeec3f3227661dc69bcbdae1c486fb085 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aeec3f3227661dc69bcbdae1c486fb085"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsDisabledRecursive</b> () const </td></tr> <tr class="separator:aeec3f3227661dc69bcbdae1c486fb085 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afe53703309c99ef360f9b500277c1c3b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afe53703309c99ef360f9b500277c1c3b"></a> virtual const FVector2D &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetLocation</b> () const </td></tr> <tr class="separator:afe53703309c99ef360f9b500277c1c3b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a7e27a46fce514654cd3454a78feb93d1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7e27a46fce514654cd3454a78feb93d1"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetLocationStruct</b> (const FVector2D &amp;v2Location)</td></tr> <tr class="separator:a7e27a46fce514654cd3454a78feb93d1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac359409b4493527b4f481f5507785083 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac359409b4493527b4f481f5507785083"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetLocation</b> (float fX, float fY)</td></tr> <tr class="separator:ac359409b4493527b4f481f5507785083 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afebde131438e50f042841a5d974129d9 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afebde131438e50f042841a5d974129d9"></a> virtual const FVector4 &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetMargin</b> () const </td></tr> <tr class="separator:afebde131438e50f042841a5d974129d9 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a92c281f323c658ef6106a495d88de73e inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a92c281f323c658ef6106a495d88de73e"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMarginStruct</b> (const FVector4 &amp;v2Margin)</td></tr> <tr class="separator:a92c281f323c658ef6106a495d88de73e inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa344ee58ce5dcd7a48a3ef9e48ccb61b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa344ee58ce5dcd7a48a3ef9e48ccb61b"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetMargin</b> (float fLeft, float fTop, float fRight, float fBottom)</td></tr> <tr class="separator:aa344ee58ce5dcd7a48a3ef9e48ccb61b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad60ae9840f65c30937692b6160626b18 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad60ae9840f65c30937692b6160626b18"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>GetMarginSize</b> () const </td></tr> <tr class="separator:ad60ae9840f65c30937692b6160626b18 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a64920a74613dcd529261a73b126def76 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64920a74613dcd529261a73b126def76"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>GetMarginOffset</b> () const </td></tr> <tr class="separator:a64920a74613dcd529261a73b126def76 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad312c5b3f78e58ab93fe42d05542df0d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad312c5b3f78e58ab93fe42d05542df0d"></a> virtual <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetAlignedTo</b> () const </td></tr> <tr class="separator:ad312c5b3f78e58ab93fe42d05542df0d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a39d5cd1ddf12bb7b7dbc315307b5cd58 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39d5cd1ddf12bb7b7dbc315307b5cd58"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetAlignedTo</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oAlignedTo)</td></tr> <tr class="separator:a39d5cd1ddf12bb7b7dbc315307b5cd58 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afb57f0ea99394b1d3de39560422155b9 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afb57f0ea99394b1d3de39560422155b9"></a> virtual TEnumAsByte&lt; EKUIInterfaceHAlign::Type &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetHorizontalAlignment</b> () const </td></tr> <tr class="separator:afb57f0ea99394b1d3de39560422155b9 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9b579cbde09a340ebb99af30c5de9e87 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9b579cbde09a340ebb99af30c5de9e87"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetHorizontalAlignment</b> (const TEnumAsByte&lt; EKUIInterfaceHAlign::Type &gt; eHAlign)</td></tr> <tr class="separator:a9b579cbde09a340ebb99af30c5de9e87 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6472b1b8a510252c451f320c28418494 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6472b1b8a510252c451f320c28418494"></a> virtual TEnumAsByte&lt; EKUIInterfaceVAlign::Type &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetVerticalAlignment</b> () const </td></tr> <tr class="separator:a6472b1b8a510252c451f320c28418494 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6130f262b5c318fbf3832b23cbe06f9e inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6130f262b5c318fbf3832b23cbe06f9e"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetVerticalAlignment</b> (const TEnumAsByte&lt; EKUIInterfaceVAlign::Type &gt; eVAlign)</td></tr> <tr class="separator:a6130f262b5c318fbf3832b23cbe06f9e inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab7304bf73a7db59665760f8eca08b1ba inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab7304bf73a7db59665760f8eca08b1ba"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>FillContainer</b> ()</td></tr> <tr class="separator:ab7304bf73a7db59665760f8eca08b1ba inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acaedd1356c2a9a4db11ef9a50b9475b0 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaedd1356c2a9a4db11ef9a50b9475b0"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>HasValidAlignLocation</b> () const </td></tr> <tr class="separator:acaedd1356c2a9a4db11ef9a50b9475b0 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4b5a785a4d0962c1bbcc8f280dd215fc inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4b5a785a4d0962c1bbcc8f280dd215fc"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>InvalidateAlignLocation</b> ()</td></tr> <tr class="separator:a4b5a785a4d0962c1bbcc8f280dd215fc inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aba580a09cc6418adccd283617676a14b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aba580a09cc6418adccd283617676a14b"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetAlignLocation</b> (const FVector2D &amp;v2AlignLocation)</td></tr> <tr class="separator:aba580a09cc6418adccd283617676a14b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad63a2cdec41f99547a888156f0f8e77b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad63a2cdec41f99547a888156f0f8e77b"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>GetRenderLocation</b> () const </td></tr> <tr class="separator:ad63a2cdec41f99547a888156f0f8e77b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae7f8638f21df2c863537144ad97ea4e8 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae7f8638f21df2c863537144ad97ea4e8"></a> int32&#160;</td><td class="memItemRight" valign="bottom"><b>GetZIndexBP</b> () const </td></tr> <tr class="separator:ae7f8638f21df2c863537144ad97ea4e8 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a778cb51840b28834a69dc83672bdaa74 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a778cb51840b28834a69dc83672bdaa74"></a> virtual uint16&#160;</td><td class="memItemRight" valign="bottom"><b>GetZIndex</b> () const </td></tr> <tr class="separator:a778cb51840b28834a69dc83672bdaa74 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5d23935d4c170eb2bf0c6160486f1997 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d23935d4c170eb2bf0c6160486f1997"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>SetZIndexBP</b> (int32 iZIndex)</td></tr> <tr class="separator:a5d23935d4c170eb2bf0c6160486f1997 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5a41c6f5272306cf9e649136131f98d5 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a41c6f5272306cf9e649136131f98d5"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>SetZIndex</b> (uint16 iZIndex)</td></tr> <tr class="separator:a5a41c6f5272306cf9e649136131f98d5 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a29d185c059e1b99db22379369dee2ac1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a29d185c059e1b99db22379369dee2ac1"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsCursorOver</b> () const </td></tr> <tr class="separator:a29d185c059e1b99db22379369dee2ac1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9f62f1b399ba65b620f1f4357ea3e195 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f62f1b399ba65b620f1f4357ea3e195"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsPointOver</b> (const FVector2D &amp;v2Point) const </td></tr> <tr class="separator:a9f62f1b399ba65b620f1f4357ea3e195 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aadf477fbec270872d0c06ed51edf912a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aadf477fbec270872d0c06ed51edf912a"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>GetScreenLocation</b> () const </td></tr> <tr class="separator:aadf477fbec270872d0c06ed51edf912a inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8da4d327b937a7fc9b6e9564e08d52a6 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8da4d327b937a7fc9b6e9564e08d52a6"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>GetNestedLocation</b> (<a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a> *ctRoot) const </td></tr> <tr class="separator:a8da4d327b937a7fc9b6e9564e08d52a6 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af5e02c91b44e475c7d33c8ea8d6586a1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af5e02c91b44e475c7d33c8ea8d6586a1"></a> virtual const FVector2D &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetLastScreenRenderLocation</b> () const </td></tr> <tr class="separator:af5e02c91b44e475c7d33c8ea8d6586a1 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af18379c8add5cef3cf3b39ea39acbed2 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af18379c8add5cef3cf3b39ea39acbed2"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsMouseOver</b> () const </td></tr> <tr class="separator:af18379c8add5cef3cf3b39ea39acbed2 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aabd93c841d50f9bfaf29b45aa9e82659 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aabd93c841d50f9bfaf29b45aa9e82659"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddAlignedToThis</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oAlignChild)</td></tr> <tr class="separator:aabd93c841d50f9bfaf29b45aa9e82659 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a35b0a2f89698665ada9911e9a9d94cae inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35b0a2f89698665ada9911e9a9d94cae"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveAlignedToThis</b> (<a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> *oAlignChild)</td></tr> <tr class="separator:a35b0a2f89698665ada9911e9a9d94cae inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab35249da93265cd959830786e89cfc09 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab35249da93265cd959830786e89cfc09"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>CalculateAlignLocation</b> (TArray&lt; <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> * &gt; &amp;arAlignStack)</td></tr> <tr class="separator:ab35249da93265cd959830786e89cfc09 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a03d65260eed8908833296b6af807b9fc inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a03d65260eed8908833296b6af807b9fc"></a> virtual const FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>CalculateAlignLocation</b> (const FVector2D &amp;v2Origin, const FVector2D &amp;v2Extent, const FVector2D &amp;v2Size, const FVector2D &amp;v2Default=FVector2D::ZeroVector)</td></tr> <tr class="separator:a03d65260eed8908833296b6af807b9fc inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5d70b57353792797dc6607e16880102d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d70b57353792797dc6607e16880102d"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsInputEventConsumer</b> () const </td></tr> <tr class="separator:a5d70b57353792797dc6607e16880102d inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aaa2be0b253cf0745b4cc02d55f2e37f8 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa2be0b253cf0745b4cc02d55f2e37f8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>EnableRenderCache</b> ()</td></tr> <tr class="separator:aaa2be0b253cf0745b4cc02d55f2e37f8 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aacc7b6508e0670375ab49cc2d1fff2ef inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aacc7b6508e0670375ab49cc2d1fff2ef"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>DisableRenderCache</b> ()</td></tr> <tr class="separator:aacc7b6508e0670375ab49cc2d1fff2ef inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aee69ca201bf2758da7404f18b4a900a4 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aee69ca201bf2758da7404f18b4a900a4"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsRenderCaching</b> () const </td></tr> <tr class="separator:aee69ca201bf2758da7404f18b4a900a4 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aaa4bb9f13abadc6ee81b641bf7f38066 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaa4bb9f13abadc6ee81b641bf7f38066"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddTag</b> (const FString &amp;strTag)</td></tr> <tr class="separator:aaa4bb9f13abadc6ee81b641bf7f38066 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4a2590a71bf776c806d37350515af51b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a2590a71bf776c806d37350515af51b"></a> virtual const FString &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>GetTag</b> (int32 iIndex) const </td></tr> <tr class="separator:a4a2590a71bf776c806d37350515af51b inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1bb68a246fb98cd0ddedc96cded4d55c inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bb68a246fb98cd0ddedc96cded4d55c"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>HasTag</b> (const FString &amp;strTag) const </td></tr> <tr class="separator:a1bb68a246fb98cd0ddedc96cded4d55c inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2de059a0ced75dc4e01e50055c7c65d2 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2de059a0ced75dc4e01e50055c7c65d2"></a> void&#160;</td><td class="memItemRight" valign="bottom"><b>InitializeElement</b> ()</td></tr> <tr class="separator:a2de059a0ced75dc4e01e50055c7c65d2 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9ad4d049b63b570e1b65dbfc1185cf98 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ad4d049b63b570e1b65dbfc1185cf98"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>IsInitialized</b> () const </td></tr> <tr class="separator:a9ad4d049b63b570e1b65dbfc1185cf98 inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa2583b73d667135e3f025a4f799412dd inherit pub_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2583b73d667135e3f025a4f799412dd"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>InvalidateContainerRenderCache</b> ()</td></tr> <tr class="separator:aa2583b73d667135e3f025a4f799412dd inherit pub_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr class="memitem:a22a54400ad832c9c21777ac5c8aebeef"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a22a54400ad832c9c21777ac5c8aebeef"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildSizeChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo) override</td></tr> <tr class="separator:a22a54400ad832c9c21777ac5c8aebeef"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8e2438d8bd361377c636ce4036462a39"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e2438d8bd361377c636ce4036462a39"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>DoLayout</b> () override</td></tr> <tr class="separator:a8e2438d8bd361377c636ce4036462a39"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a58fff0eb34e6a3e12e90dc6cbb05a20e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58fff0eb34e6a3e12e90dc6cbb05a20e"></a> virtual uint16&#160;</td><td class="memItemRight" valign="bottom"><b>GetRowIndexByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow) const </td></tr> <tr class="separator:a58fff0eb34e6a3e12e90dc6cbb05a20e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a94510c38b8727f3b6865d84c33d9b4af"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94510c38b8727f3b6865d84c33d9b4af"></a> virtual uint16&#160;</td><td class="memItemRight" valign="bottom"><b>GetSelectedRowIndexByRef</b> (<a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> *ctRow) const </td></tr> <tr class="separator:a94510c38b8727f3b6865d84c33d9b4af"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pro_methods_class_u_k_u_i_interface_container"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_u_k_u_i_interface_container')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a></td></tr> <tr class="memitem:a848c181dc8b45cc61ae8b20574f94bbd inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a848c181dc8b45cc61ae8b20574f94bbd"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>UPROPERTY</b> () TArray&lt; <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> * &gt; arChildren</td></tr> <tr class="separator:a848c181dc8b45cc61ae8b20574f94bbd inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab9619c4e5096ee2119d6b22d0cc8bb01 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9619c4e5096ee2119d6b22d0cc8bb01"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>CanTick</b> () const </td></tr> <tr class="separator:ab9619c4e5096ee2119d6b22d0cc8bb01 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3e03c66190447c32fa98b60b1e4c8581 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3e03c66190447c32fa98b60b1e4c8581"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddTickRequests</b> (int16 iCount)</td></tr> <tr class="separator:a3e03c66190447c32fa98b60b1e4c8581 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a907b2390737b583a02037927e55d716e inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a907b2390737b583a02037927e55d716e"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveTickRequests</b> (int16 iCount)</td></tr> <tr class="separator:a907b2390737b583a02037927e55d716e inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a825b2f2cf757364de1a981217ec1715c inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a825b2f2cf757364de1a981217ec1715c"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddMouseInputRequests</b> (int16 iCount)</td></tr> <tr class="separator:a825b2f2cf757364de1a981217ec1715c inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:affcefc92b60f9d613e92684e40f3d48d inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="affcefc92b60f9d613e92684e40f3d48d"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveMouseInputRequests</b> (int16 iCount)</td></tr> <tr class="separator:affcefc92b60f9d613e92684e40f3d48d inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a08c35fe726aa4a6fed69353c477df565 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08c35fe726aa4a6fed69353c477df565"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>AddKeyInputRequests</b> (int16 iCount)</td></tr> <tr class="separator:a08c35fe726aa4a6fed69353c477df565 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afbf75a97df8d0542ace5e2ea95aa0f39 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afbf75a97df8d0542ace5e2ea95aa0f39"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>RemoveKeyInputRequests</b> (int16 iCount)</td></tr> <tr class="separator:afbf75a97df8d0542ace5e2ea95aa0f39 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a95c19fb5f18c71f14e8521013dc4c1f3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a95c19fb5f18c71f14e8521013dc4c1f3"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnTick</b> (const <a class="el" href="struct_f_k_u_i_interface_container_tick_event.html">FKUIInterfaceContainerTickEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a95c19fb5f18c71f14e8521013dc4c1f3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad6dd3b3ff4a40c380a26a42f991ad0d3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad6dd3b3ff4a40c380a26a42f991ad0d3"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMouseMove</b> (const <a class="el" href="struct_f_k_u_i_interface_container_mouse_location_event.html">FKUIInterfaceContainerMouseLocationEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ad6dd3b3ff4a40c380a26a42f991ad0d3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a996addf9332a5c464cced9c162e1c289 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a996addf9332a5c464cced9c162e1c289"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnMouseButtonDown</b> (const <a class="el" href="struct_f_k_u_i_interface_container_mouse_button_event.html">FKUIInterfaceContainerMouseButtonEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a996addf9332a5c464cced9c162e1c289 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2cfd473c0510e1518aa40b3b66979e8b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2cfd473c0510e1518aa40b3b66979e8b"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnMouseButtonUp</b> (const <a class="el" href="struct_f_k_u_i_interface_container_mouse_button_event.html">FKUIInterfaceContainerMouseButtonEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a2cfd473c0510e1518aa40b3b66979e8b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9464472cd5f7e63b08c81e0a4561029b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9464472cd5f7e63b08c81e0a4561029b"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnKeyDown</b> (const <a class="el" href="struct_f_k_u_i_interface_container_key_event.html">FKUIInterfaceContainerKeyEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a9464472cd5f7e63b08c81e0a4561029b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a73134b45086feb93faeba2100df1970b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a73134b45086feb93faeba2100df1970b"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnKeyUp</b> (const <a class="el" href="struct_f_k_u_i_interface_container_key_event.html">FKUIInterfaceContainerKeyEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a73134b45086feb93faeba2100df1970b inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2b1d654953b729596b448f5ba49cfeed inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2b1d654953b729596b448f5ba49cfeed"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnKeyRepeat</b> (const <a class="el" href="struct_f_k_u_i_interface_container_key_event.html">FKUIInterfaceContainerKeyEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a2b1d654953b729596b448f5ba49cfeed inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a54c2685ef51d0078bcca7728caedcd89 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a54c2685ef51d0078bcca7728caedcd89"></a> virtual bool&#160;</td><td class="memItemRight" valign="bottom"><b>OnKeyChar</b> (const <a class="el" href="struct_f_k_u_i_interface_container_char_event.html">FKUIInterfaceContainerCharEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a54c2685ef51d0078bcca7728caedcd89 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae8908a83a90e6648716ae3a61590bf22 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae8908a83a90e6648716ae3a61590bf22"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnScreenResolutionChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_screen_resolution_event.html">FKUIInterfaceContainerScreenResolutionEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ae8908a83a90e6648716ae3a61590bf22 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac2858fede822b943aae41b717bcce15a inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2858fede822b943aae41b717bcce15a"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchStart</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ac2858fede822b943aae41b717bcce15a inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aaf5dd1d8f2c4b9b3d08075206f792460 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aaf5dd1d8f2c4b9b3d08075206f792460"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchEnd</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:aaf5dd1d8f2c4b9b3d08075206f792460 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9896aa69961c33d0b78d3171bca36650 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9896aa69961c33d0b78d3171bca36650"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchPaused</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a9896aa69961c33d0b78d3171bca36650 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab37312257b57273bbeff3a1bf9141dc8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab37312257b57273bbeff3a1bf9141dc8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchUnpaused</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ab37312257b57273bbeff3a1bf9141dc8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a369f49f44d06c7f4afb767b7ba89fc79 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a369f49f44d06c7f4afb767b7ba89fc79"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnPlayerDeath</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a369f49f44d06c7f4afb767b7ba89fc79 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abef2fe14413ea21dc9daf140fb3fa9a3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abef2fe14413ea21dc9daf140fb3fa9a3"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnVisibilityChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_visibility_event.html">FKUIInterfaceContainerVisibilityEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:abef2fe14413ea21dc9daf140fb3fa9a3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5ac443678eedd933ec35e0da139525a9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5ac443678eedd933ec35e0da139525a9"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnFocus</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a5ac443678eedd933ec35e0da139525a9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9733ead785c67213f956ed8a4f51aca0 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9733ead785c67213f956ed8a4f51aca0"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnBlur</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a9733ead785c67213f956ed8a4f51aca0 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a7cc81d6ae0e6f856c83464d2b33eb026 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7cc81d6ae0e6f856c83464d2b33eb026"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnFocusChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a7cc81d6ae0e6f856c83464d2b33eb026 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2790ab6bb3ee17360bd4900c7017dd83 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2790ab6bb3ee17360bd4900c7017dd83"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildLocationChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a2790ab6bb3ee17360bd4900c7017dd83 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a597a771df3ca538f44c3d8a8ac9aae90 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a597a771df3ca538f44c3d8a8ac9aae90"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLayoutInvalidated</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a597a771df3ca538f44c3d8a8ac9aae90 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6f9f9811fd6d20d141a8f552f4f6ca11 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f9f9811fd6d20d141a8f552f4f6ca11"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLayoutComplete</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a6f9f9811fd6d20d141a8f552f4f6ca11 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8b4f21722723d063e9122c733d962ff3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8b4f21722723d063e9122c733d962ff3"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildManagersUpdated</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a8b4f21722723d063e9122c733d962ff3 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a281c0204b8d8406635343b40d9d7af23 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a281c0204b8d8406635343b40d9d7af23"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildAdded</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a281c0204b8d8406635343b40d9d7af23 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab86ccec44a81586be2e0632f3bf94e91 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab86ccec44a81586be2e0632f3bf94e91"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildRemoved</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ab86ccec44a81586be2e0632f3bf94e91 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a7b78ebc4d06d9c0bf5d946256987eae8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7b78ebc4d06d9c0bf5d946256987eae8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchStateChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_match_state_event.html">FKUIInterfaceContainerMatchStateEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a7b78ebc4d06d9c0bf5d946256987eae8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4bb571f0623bc1c60ace2203fe776a92 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bb571f0623bc1c60ace2203fe776a92"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLayoutInvalidatedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a4bb571f0623bc1c60ace2203fe776a92 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1c432c4dac45a16d2fab6240ec1f5096 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1c432c4dac45a16d2fab6240ec1f5096"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLayoutCompleteBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a1c432c4dac45a16d2fab6240ec1f5096 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a44793f6b2597f18b6d72ab96603b63c8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a44793f6b2597f18b6d72ab96603b63c8"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildManagersUpdatedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a44793f6b2597f18b6d72ab96603b63c8 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abed0c0ba1cce8a6d6350991d576e484f inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abed0c0ba1cce8a6d6350991d576e484f"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildAddedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:abed0c0ba1cce8a6d6350991d576e484f inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abaece6878f844759153aacaae836faae inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abaece6878f844759153aacaae836faae"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildRemovedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:abaece6878f844759153aacaae836faae inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8e78f2a7cd6c3f0e32bfd8fa1ae2824a inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8e78f2a7cd6c3f0e32bfd8fa1ae2824a"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnScreenResolutionChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_screen_resolution_event.html">FKUIInterfaceContainerScreenResolutionEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a8e78f2a7cd6c3f0e32bfd8fa1ae2824a inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8730233b9c81c66a3bd7d84fb02d885e inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8730233b9c81c66a3bd7d84fb02d885e"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchStartBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a8730233b9c81c66a3bd7d84fb02d885e inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9cf4cb221a6c68b0389fe398c67bc765 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9cf4cb221a6c68b0389fe398c67bc765"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchEndBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a9cf4cb221a6c68b0389fe398c67bc765 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae60b0cfe63c5a83bc5872161a32e2033 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae60b0cfe63c5a83bc5872161a32e2033"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchPausedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ae60b0cfe63c5a83bc5872161a32e2033 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a58552c2463e83a42ef13b105f643ae50 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a58552c2463e83a42ef13b105f643ae50"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchUnpausedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a58552c2463e83a42ef13b105f643ae50 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a81477fea80ac7b826f4d14a528ce70f9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81477fea80ac7b826f4d14a528ce70f9"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnPlayerDeathBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_player_event.html">FKUIInterfaceContainerPlayerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a81477fea80ac7b826f4d14a528ce70f9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:abb76ad9421d0a9c3d6d305e607a2c4f9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abb76ad9421d0a9c3d6d305e607a2c4f9"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnVisibilityChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_visibility_event.html">FKUIInterfaceContainerVisibilityEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:abb76ad9421d0a9c3d6d305e607a2c4f9 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a9a7c9ddec92937e8c88f7b14b1e8b0a7 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9a7c9ddec92937e8c88f7b14b1e8b0a7"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnFocusBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a9a7c9ddec92937e8c88f7b14b1e8b0a7 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a86d9323b4eb2803355ee10814dca9f75 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a86d9323b4eb2803355ee10814dca9f75"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnBlurBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a86d9323b4eb2803355ee10814dca9f75 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a16689738529ee41887888a7dff0b3456 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16689738529ee41887888a7dff0b3456"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnFocusChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a16689738529ee41887888a7dff0b3456 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2e876be915c4269c2384907a2d576b8f inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2e876be915c4269c2384907a2d576b8f"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildSizeChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a2e876be915c4269c2384907a2d576b8f inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad8391ad88f90cfe900f11b19287cafbe inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8391ad88f90cfe900f11b19287cafbe"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnChildLocationChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_element_event.html">FKUIInterfaceContainerElementEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ad8391ad88f90cfe900f11b19287cafbe inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6aa5502676bc84410e27f3347b1e4085 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6aa5502676bc84410e27f3347b1e4085"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnMatchStateChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_match_state_event.html">FKUIInterfaceContainerMatchStateEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a6aa5502676bc84410e27f3347b1e4085 inherit pro_methods_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pro_methods_class_u_k_u_i_interface_element"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_u_k_u_i_interface_element')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a></td></tr> <tr class="memitem:a6363b4b9c55803cede770d888f90cb22 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6363b4b9c55803cede770d888f90cb22"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>InvalidateRenderCache</b> ()</td></tr> <tr class="separator:a6363b4b9c55803cede770d888f90cb22 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a62037c8094ef4a965af694e913a06a33 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a62037c8094ef4a965af694e913a06a33"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnInitialize</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a62037c8094ef4a965af694e913a06a33 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad216e86f00fc59831d6bb95004a3a250 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad216e86f00fc59831d6bb95004a3a250"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLocationChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_location_change_event.html">FKUIInterfaceContainerLocationChangeEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ad216e86f00fc59831d6bb95004a3a250 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adc93f8fe4c5194a6af5cdae91b0b6360 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc93f8fe4c5194a6af5cdae91b0b6360"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnSizeChange</b> (const <a class="el" href="struct_f_k_u_i_interface_container_size_change_event.html">FKUIInterfaceContainerSizeChangeEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:adc93f8fe4c5194a6af5cdae91b0b6360 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a94e529d8d13e628841bceb450942fd68 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94e529d8d13e628841bceb450942fd68"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAlignLocationInvalidated</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a94e529d8d13e628841bceb450942fd68 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aad0c0d4af2d02f73595214137938e4fc inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aad0c0d4af2d02f73595214137938e4fc"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAlignmentLocationCalculated</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:aad0c0d4af2d02f73595214137938e4fc inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad34b388fbd091706cd7fd06f488e6d61 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad34b388fbd091706cd7fd06f488e6d61"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAddedToContainer</b> (const <a class="el" href="struct_f_k_u_i_interface_element_container_event.html">FKUIInterfaceElementContainerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ad34b388fbd091706cd7fd06f488e6d61 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad80b6e7267d1b0daa054fd840e5af7b1 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad80b6e7267d1b0daa054fd840e5af7b1"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnRemovedFromContainer</b> (const <a class="el" href="struct_f_k_u_i_interface_element_container_event.html">FKUIInterfaceElementContainerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ad80b6e7267d1b0daa054fd840e5af7b1 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8bde3f3d56c7d8ed2e9f8ca813dba0fa inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bde3f3d56c7d8ed2e9f8ca813dba0fa"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnRender</b> (const <a class="el" href="struct_f_k_u_i_interface_element_render_event.html">FKUIInterfaceElementRenderEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a8bde3f3d56c7d8ed2e9f8ca813dba0fa inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a99c123ef49081906674eea4eec3a4e2d inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99c123ef49081906674eea4eec3a4e2d"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnInitializeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a99c123ef49081906674eea4eec3a4e2d inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a20b622ce8e5d8b5588479d825092c937 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20b622ce8e5d8b5588479d825092c937"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnLocationChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_location_change_event.html">FKUIInterfaceContainerLocationChangeEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a20b622ce8e5d8b5588479d825092c937 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a253d9915aa801e5523306e7ea078a05c inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a253d9915aa801e5523306e7ea078a05c"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnSizeChangeBP</b> (const <a class="el" href="struct_f_k_u_i_interface_container_size_change_event.html">FKUIInterfaceContainerSizeChangeEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a253d9915aa801e5523306e7ea078a05c inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a36c459a5fabfc697883ec067f13327b5 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a36c459a5fabfc697883ec067f13327b5"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAlignLocationInvalidatedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a36c459a5fabfc697883ec067f13327b5 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab51d5e8bb549b712e441e444c7c93b07 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab51d5e8bb549b712e441e444c7c93b07"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAlignmentLocationCalculatedBP</b> (const <a class="el" href="struct_f_k_u_i_interface_event.html">FKUIInterfaceEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ab51d5e8bb549b712e441e444c7c93b07 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ae55d97e25b6637c8827fb6f7d0629ff9 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae55d97e25b6637c8827fb6f7d0629ff9"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnAddedToContainerBP</b> (const <a class="el" href="struct_f_k_u_i_interface_element_container_event.html">FKUIInterfaceElementContainerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:ae55d97e25b6637c8827fb6f7d0629ff9 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a015edfa7aa8bf5766cc021e51d853cbf inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a015edfa7aa8bf5766cc021e51d853cbf"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnRemovedFromContainerBP</b> (const <a class="el" href="struct_f_k_u_i_interface_element_container_event.html">FKUIInterfaceElementContainerEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a015edfa7aa8bf5766cc021e51d853cbf inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a59d666889391756a295dd8660583f420 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a59d666889391756a295dd8660583f420"></a> virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>OnRenderBP</b> (const <a class="el" href="struct_f_k_u_i_interface_element_render_event.html">FKUIInterfaceElementRenderEvent</a> &amp;stEventInfo)</td></tr> <tr class="separator:a59d666889391756a295dd8660583f420 inherit pro_methods_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> Protected Attributes</h2></td></tr> <tr class="memitem:a4caa1a764a1fab80725553f84116bdfc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4caa1a764a1fab80725553f84116bdfc"></a> TArray&lt; TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>arRows</b></td></tr> <tr class="separator:a4caa1a764a1fab80725553f84116bdfc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a06054e25eb304cbfd0b7d7e6c4cb31b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06054e25eb304cbfd0b7d7e6c4cb31b3"></a> uint16&#160;</td><td class="memItemRight" valign="bottom"><b>iRowCount</b></td></tr> <tr class="separator:a06054e25eb304cbfd0b7d7e6c4cb31b3"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a75cfc4716736acf2d90a41ef4217e410"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a75cfc4716736acf2d90a41ef4217e410"></a> float&#160;</td><td class="memItemRight" valign="bottom"><b>fSpacing</b></td></tr> <tr class="separator:a75cfc4716736acf2d90a41ef4217e410"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acf908e765782abe7b2d1d9e3d87ed0b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acf908e765782abe7b2d1d9e3d87ed0b9"></a> float&#160;</td><td class="memItemRight" valign="bottom"><b>fMinHeight</b></td></tr> <tr class="separator:acf908e765782abe7b2d1d9e3d87ed0b9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af1326e2fbcbed280e1fba4a468697b37"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af1326e2fbcbed280e1fba4a468697b37"></a> float&#160;</td><td class="memItemRight" valign="bottom"><b>fMaxHeight</b></td></tr> <tr class="separator:af1326e2fbcbed280e1fba4a468697b37"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4f26c279671a0b85446561400fd27cc4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4f26c279671a0b85446561400fd27cc4"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bEnableMultiSelect</b></td></tr> <tr class="separator:a4f26c279671a0b85446561400fd27cc4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad9b1b85b79f03805c725d983d4f33dfc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad9b1b85b79f03805c725d983d4f33dfc"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bEnableSelect</b></td></tr> <tr class="separator:ad9b1b85b79f03805c725d983d4f33dfc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0b784a3319e7a2b77724b223cf6777e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b784a3319e7a2b77724b223cf6777e1"></a> TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ctLastSelected</b></td></tr> <tr class="separator:a0b784a3319e7a2b77724b223cf6777e1"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6b8b195f4ceae921febcf61695a35084"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6b8b195f4ceae921febcf61695a35084"></a> TArray&lt; TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_list_row_container.html">UKUIListRowContainer</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>arSelectedRows</b></td></tr> <tr class="separator:a6b8b195f4ceae921febcf61695a35084"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4c47b610f45f407af32e50062c0c58c0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4c47b610f45f407af32e50062c0c58c0"></a> FKUIListRowContainerSelectionChangeDelegate&#160;</td><td class="memItemRight" valign="bottom"><b>dgSelectionChange</b></td></tr> <tr class="separator:a4c47b610f45f407af32e50062c0c58c0"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adf2aed7cc1277c8e49ba8c17bcdc1cda"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf2aed7cc1277c8e49ba8c17bcdc1cda"></a> <a class="el" href="class_u_k_u_i_simple_click_widget.html">UKUISimpleClickWidget</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>cmClickArea</b></td></tr> <tr class="separator:adf2aed7cc1277c8e49ba8c17bcdc1cda"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pro_attribs_class_u_k_u_i_interface_container"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_u_k_u_i_interface_container')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a></td></tr> <tr class="memitem:a9f93bdd46cc0c751159fec5250c3d6e3 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9f93bdd46cc0c751159fec5250c3d6e3"></a> FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>v2Size</b></td></tr> <tr class="separator:a9f93bdd46cc0c751159fec5250c3d6e3 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5974b242c1f06996a6d9426b251826e5 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5974b242c1f06996a6d9426b251826e5"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bValidLayout</b></td></tr> <tr class="separator:a5974b242c1f06996a6d9426b251826e5 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac60142ea2ee992b319b452b52c9ccf35 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac60142ea2ee992b319b452b52c9ccf35"></a> int16&#160;</td><td class="memItemRight" valign="bottom"><b>iTickRequests</b></td></tr> <tr class="separator:ac60142ea2ee992b319b452b52c9ccf35 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1d6b45daa7329624b69164cbfb517358 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d6b45daa7329624b69164cbfb517358"></a> int16&#160;</td><td class="memItemRight" valign="bottom"><b>iMouseInputRequests</b></td></tr> <tr class="separator:a1d6b45daa7329624b69164cbfb517358 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a07ca71225458f893b1347454e1c2aacc inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07ca71225458f893b1347454e1c2aacc"></a> int16&#160;</td><td class="memItemRight" valign="bottom"><b>iKeyInputRequests</b></td></tr> <tr class="separator:a07ca71225458f893b1347454e1c2aacc inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a839b0f4b1c19043b277e880720674cb7 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a839b0f4b1c19043b277e880720674cb7"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bFocused</b></td></tr> <tr class="separator:a839b0f4b1c19043b277e880720674cb7 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a690591e6e7ed6d093ae7c507156ad7f1 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a690591e6e7ed6d093ae7c507156ad7f1"></a> TArray&lt; <a class="el" href="class_u_k_u_i_interface_widget_child_manager.html">UKUIInterfaceWidgetChildManager</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>arChildManagers</b></td></tr> <tr class="separator:a690591e6e7ed6d093ae7c507156ad7f1 inherit pro_attribs_class_u_k_u_i_interface_container"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="inherit_header pro_attribs_class_u_k_u_i_interface_element"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_class_u_k_u_i_interface_element')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a></td></tr> <tr class="memitem:a10ffcc5437197bb8696606691fe0a012 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a10ffcc5437197bb8696606691fe0a012"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bInitialized</b></td></tr> <tr class="separator:a10ffcc5437197bb8696606691fe0a012 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a09075ea4751a01193f049f4ab264c787 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09075ea4751a01193f049f4ab264c787"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bVisible</b></td></tr> <tr class="separator:a09075ea4751a01193f049f4ab264c787 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afc48ce44edf73b5e3e7a42c91540fe0c inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afc48ce44edf73b5e3e7a42c91540fe0c"></a> FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>v2Location</b></td></tr> <tr class="separator:afc48ce44edf73b5e3e7a42c91540fe0c inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a490dbc7f337e340e8451ec1eb8caab52 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a490dbc7f337e340e8451ec1eb8caab52"></a> FVector4&#160;</td><td class="memItemRight" valign="bottom"><b>v4Margin</b></td></tr> <tr class="separator:a490dbc7f337e340e8451ec1eb8caab52 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acaba84968302ffccf4ab179445385183 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acaba84968302ffccf4ab179445385183"></a> TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_interface_container.html">UKUIInterfaceContainer</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ctContainer</b></td></tr> <tr class="separator:acaba84968302ffccf4ab179445385183 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac378bc5db20e9fe8449a9d2e9fd29197 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac378bc5db20e9fe8449a9d2e9fd29197"></a> uint16&#160;</td><td class="memItemRight" valign="bottom"><b>iZIndex</b></td></tr> <tr class="separator:ac378bc5db20e9fe8449a9d2e9fd29197 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3050fed3d4ac0b73ba647b795c956ad3 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3050fed3d4ac0b73ba647b795c956ad3"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bValidAlignLocation</b></td></tr> <tr class="separator:a3050fed3d4ac0b73ba647b795c956ad3 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a15d12d9eba3ede8bd4e0d40c79525fb5 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a15d12d9eba3ede8bd4e0d40c79525fb5"></a> TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>oAlignedTo</b></td></tr> <tr class="separator:a15d12d9eba3ede8bd4e0d40c79525fb5 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a93cd2f84246335c1a7d604b6e2087ef8 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93cd2f84246335c1a7d604b6e2087ef8"></a> EKUIInterfaceHAlign::Type&#160;</td><td class="memItemRight" valign="bottom"><b>eHAlign</b></td></tr> <tr class="separator:a93cd2f84246335c1a7d604b6e2087ef8 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:add8994f07a5989ff59a82f51dc9a0901 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="add8994f07a5989ff59a82f51dc9a0901"></a> EKUIInterfaceVAlign::Type&#160;</td><td class="memItemRight" valign="bottom"><b>eVAlign</b></td></tr> <tr class="separator:add8994f07a5989ff59a82f51dc9a0901 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4a3e8736358fcc3c90d4e860b681efe6 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4a3e8736358fcc3c90d4e860b681efe6"></a> FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>v2AlignLocation</b></td></tr> <tr class="separator:a4a3e8736358fcc3c90d4e860b681efe6 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a66f6c8d4d4fff3a5e3b991775b944446 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a66f6c8d4d4fff3a5e3b991775b944446"></a> FVector2D&#160;</td><td class="memItemRight" valign="bottom"><b>v2LastScreenRenderLocation</b></td></tr> <tr class="separator:a66f6c8d4d4fff3a5e3b991775b944446 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a94e200a53d1563747801a0e8d306a134 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a94e200a53d1563747801a0e8d306a134"></a> TArray&lt; TWeakObjectPtr&lt; <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>arAlignedToThis</b></td></tr> <tr class="separator:a94e200a53d1563747801a0e8d306a134 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa72d09ae8b3d2aa76009ad640001c1f3 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa72d09ae8b3d2aa76009ad640001c1f3"></a> TWeakObjectPtr&lt; <a class="el" href="class_a_k_u_i_interface.html">AKUIInterface</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>aLastRenderedBy</b></td></tr> <tr class="separator:aa72d09ae8b3d2aa76009ad640001c1f3 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a635e1d3fc0279def8d64ecfeb6df5114 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a635e1d3fc0279def8d64ecfeb6df5114"></a> TArray&lt; FString &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>arTags</b></td></tr> <tr class="separator:a635e1d3fc0279def8d64ecfeb6df5114 inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3ed1805102a6e7140785039f83545e7f inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3ed1805102a6e7140785039f83545e7f"></a> <a class="el" href="class_u_k_u_i_render_cache.html">UKUIRenderCache</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>oRenderCache</b></td></tr> <tr class="separator:a3ed1805102a6e7140785039f83545e7f inherit pro_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a> Private Member Functions</h2></td></tr> <tr class="memitem:aecb32452bb25fd57d80e42c546a1f9da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aecb32452bb25fd57d80e42c546a1f9da"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>UKUIListContainer</b> (const class FObjectInitializer &amp;oObjectInitializer)</td></tr> <tr class="separator:aecb32452bb25fd57d80e42c546a1f9da"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a> Additional Inherited Members</h2></td></tr> <tr class="inherit_header pub_attribs_class_u_k_u_i_interface_element"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_class_u_k_u_i_interface_element')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="class_u_k_u_i_interface_element.html">UKUIInterfaceElement</a></td></tr> <tr class="memitem:a7bd2922547eccc99ed6a947568332712 inherit pub_attribs_class_u_k_u_i_interface_element"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7bd2922547eccc99ed6a947568332712"></a> bool&#160;</td><td class="memItemRight" valign="bottom"><b>bDebug</b></td></tr> <tr class="separator:a7bd2922547eccc99ed6a947568332712 inherit pub_attribs_class_u_k_u_i_interface_element"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>General container that has list layout (defined columns with a list of elements of fixed/varying size.) </p> <p>Definition at line <a class="el" href="_k_u_i_list_container_8h_source.html#l00025">25</a> of file <a class="el" href="_k_u_i_list_container_8h_source.html">KUIListContainer.h</a>.</p> </div><hr/>The documentation for this class was generated from the following files:<ul> <li>Classes/KeshUI/Container/<a class="el" href="_k_u_i_list_container_8h_source.html">KUIListContainer.h</a></li> <li>Public/KeshUI/Container/<a class="el" href="_k_u_i_list_container_8cpp_source.html">KUIListContainer.cpp</a></li> </ul> </div><!-- contents --> </div><!-- doc-content --> <!-- HTML footer for doxygen 1.8.11--> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="class_u_k_u_i_list_container.html">UKUIListContainer</a></li> <li class="footer">Generated on Wed Jan 13 2016 15:31:12 for Kesh UI by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li> </ul> </div> </body> </html>
Daekesh/KeshUI
Docs/html/class_u_k_u_i_list_container.html
HTML
mit
135,002
[ 30522, 1026, 999, 1011, 1011, 16129, 20346, 2005, 2079, 18037, 6914, 1015, 1012, 1022, 1012, 2340, 1011, 1011, 1028, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 1060, 11039, 19968,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- title: Archives --- <h2 id="indicators">Archived Releases</h2> * [apache-cloudstack-4.5.1.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.5.1/apache-cloudstack-4.5.1-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.5.1/apache-cloudstack-4.5.1-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.5.1/apache-cloudstack-4.5.1-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.5.1/apache-cloudstack-4.5.1-src.tar.bz2.sha) ] * [apache-cloudstack-4.4.0.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.4.0/apache-cloudstack-4.4.0-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.4.0/apache-cloudstack-4.4.0-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.4.0/apache-cloudstack-4.4.0-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.4.0/apache-cloudstack-4.4.0-src.tar.bz2.sha) ] * [apache-cloudstack-4.3.1.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.3.1/apache-cloudstack-4.3.1-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.3.1/apache-cloudstack-4.3.1-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.3.1/apache-cloudstack-4.3.1-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.3.1/apache-cloudstack-4.3.1-src.tar.bz2.sha) ] * [apache-cloudstack-4.3.0.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.3.0/apache-cloudstack-4.3.0-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.3.0/apache-cloudstack-4.3.0-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.3.0/apache-cloudstack-4.3.0-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.3.0/apache-cloudstack-4.3.0-src.tar.bz2.sha) ] * [apache-cloudstack-4.2.1.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.2.1/apache-cloudstack-4.2.1-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.2.1/apache-cloudstack-4.2.1-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.2.1/apache-cloudstack-4.2.1-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.2.1/apache-cloudstack-4.2.1-src.tar.bz2.sha) ] * [apache-cloudstack-4.2.0.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.2.0/apache-cloudstack-4.2.0-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.2.0/apache-cloudstack-4.2.0-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.2.0/apache-cloudstack-4.2.0-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.2.0/apache-cloudstack-4.2.0-src.tar.bz2.sha) ] * [apache-cloudstack-4.1.1.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.1.1/apache-cloudstack-4.1.1-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.1.1/apache-cloudstack-4.1.1-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.1.1/apache-cloudstack-4.1.1-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.1.1/apache-cloudstack-4.1.1-src.tar.bz2.sha) ] * [apache-cloudstack-4.1.0.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.1.0/apache-cloudstack-4.1.0-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.1.0/apache-cloudstack-4.1.0-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.1.0/apache-cloudstack-4.1.0-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.1.0/apache-cloudstack-4.1.0-src.tar.bz2.sha) ] * [apache-cloudstack-4.0.2.src.tar.bz2](http://archive.apache.org/dist/cloudstack/releases/4.0.2/apache-cloudstack-4.0.2-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/cloudstack/releases/4.0.2/apache-cloudstack-4.0.2-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/cloudstack/releases/4.0.2/apache-cloudstack-4.0.2-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/cloudstack/releases/4.0.2/apache-cloudstack-4.0.2-src.tar.bz2.sha) ] * [apache-cloudstack-4.0.1-incubating.src.tar.bz2](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.1-incubating/apache-cloudstack-4.0.1-incubating-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.1-incubating/apache-cloudstack-4.0.1-incubating-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.1-incubating/apache-cloudstack-4.0.1-incubating-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.1-incubating/apache-cloudstack-4.0.1-incubating-src.tar.bz2.sha) ] * [apache-cloudstack-4.0.0-incubating.src.tar.bz2](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.0-incubating/apache-cloudstack-4.0.0-incubating-src.tar.bz2) [ [PGP](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.0-incubating/apache-cloudstack-4.0.0-incubating-src.tar.bz2.asc) ][ [MD5](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.0-incubating/apache-cloudstack-4.0.0-incubating-src.tar.bz2.md5) ][ [SHA512](http://archive.apache.org/dist/incubator/cloudstack/releases/4.0.0-incubating/apache-cloudstack-4.0.0-incubating-src.tar.bz2.sha) ] <h3>CloudMonkey release archives</h3> * [apache-cloudstack-cloudmonkey-5.3.1](http://archive.apache.org/dist/cloudstack/releases/cloudmonkey-5.3.1/) * [apache-cloudstack-cloudmonkey-5.3.0](http://archive.apache.org/dist/cloudstack/releases/cloudmonkey-5.3.0/) * [apache-cloudstack-cloudmonkey-5.2.0](http://archive.apache.org/dist/cloudstack/releases/cloudmonkey-5.2.0/) * [apache-cloudstack-cloudmonkey-5.1.0](http://archive.apache.org/dist/cloudstack/releases/cloudmonkey-5.1.0/) * [apache-cloudstack-cloudmonkey-5.0.0](http://archive.apache.org/dist/cloudstack/releases/cloudmonkey-5.0.0/) Releases of CloudStack as a Citrix project prior to the project's acceptance into the incubator can be found on SourceForge.net: Please note the releases listed below are NOT Apache project releases. These links are being provided to the user community, as a convenience only. - [Binaries for Red Hat Enterprise Linux 6.2 and CentOS 6.2](http://sourceforge.net/projects/cloudstack/files/CloudStack%20Acton/3.0.2/CloudStack-oss-3.0.2-1-rhel6.2.tar.gz/download) - [Binaries for Ubuntu 10.04 LTS](http://sourceforge.net/projects/cloudstack/files/CloudStack%20Acton/3.0.2/CloudStack-oss-3.0.2-1-ubuntu10.04.tar.gz/download)
resmo/cloudstack-www
source/archives.markdown
Markdown
apache-2.0
6,615
[ 30522, 1011, 1011, 1011, 2516, 1024, 8264, 1011, 1011, 1011, 1026, 1044, 2475, 8909, 1027, 1000, 20390, 1000, 1028, 9749, 7085, 1026, 1013, 1044, 2475, 1028, 1008, 1031, 15895, 1011, 8044, 2696, 3600, 1011, 1018, 1012, 1019, 1012, 1015, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*------------------------------------------------------------------------- SDCCsymt.h - Header file for Symbols table related structures and MACRO's. Copyright (C) 1998 Sandeep Dutta . sandeep.dutta@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -------------------------------------------------------------------------*/ #ifndef SDCCSYMT_H #define SDCCSYMT_H #define MAX_NEST_LEVEL 256 #define SDCC_SYMNAME_MAX 64 #define SDCC_NAME_MAX 3*SDCC_SYMNAME_MAX // big enough for _<func>_<var>_etc #include "SDCChasht.h" #include "SDCCglobl.h" #include "dbuf.h" #define INTNO_MAX 255 /* maximum allowed interrupt number */ #define INTNO_UNSPEC (INTNO_MAX+1) /* interrupt number unspecified */ #define BITVAR_PAD -1 enum { TYPEOF_INT = 1, TYPEOF_SHORT, TYPEOF_BOOL, TYPEOF_CHAR, TYPEOF_LONG, TYPEOF_LONGLONG, TYPEOF_FLOAT, TYPEOF_FIXED16X16, TYPEOF_BIT, TYPEOF_BITFIELD, TYPEOF_SBIT, TYPEOF_SFR, TYPEOF_VOID, TYPEOF_STRUCT, TYPEOF_ARRAY, TYPEOF_FUNCTION, TYPEOF_POINTER, TYPEOF_FPOINTER, TYPEOF_CPOINTER, TYPEOF_GPOINTER, TYPEOF_PPOINTER, TYPEOF_IPOINTER, TYPEOF_EEPPOINTER }; // values for first byte (or 3 most significant bits) of generic pointer. #if 0 #define GPTYPE_FAR 0x00 #define GPTYPE_NEAR 0x40 #define GPTYPE_XSTACK 0x60 #define GPTYPE_CODE 0x80 #else #define GPTYPE_FAR (port->gp_tags.tag_far) #define GPTYPE_NEAR (port->gp_tags.tag_near) #define GPTYPE_XSTACK (port->gp_tags.tag_xstack) #define GPTYPE_CODE (port->gp_tags.tag_code) #endif #define HASHTAB_SIZE 256 /* hash table bucket */ typedef struct bucket { void *sym; /* pointer to the object */ char name[SDCC_NAME_MAX + 1]; /* name of this symbol */ int level; /* nest level for this symbol */ int block; /* belongs to which block */ struct bucket *prev; /* ptr 2 previous bucket */ struct bucket *next; /* ptr 2 next bucket */ } bucket; typedef struct structdef { char tag[SDCC_NAME_MAX + 1]; /* tag part of structure */ unsigned char level; /* Nesting level */ int block; /* belongs to which block */ struct symbol *fields; /* pointer to fields */ unsigned size; /* sizeof the table in bytes */ int type; /* STRUCT or UNION */ bool b_flexArrayMember; /* has got a flexible array member, only needed for syntax checks */ struct symbol *tagsym; /* tag symbol (NULL if no tag) */ } structdef; /* noun definitions */ typedef enum { V_INT = 1, V_FLOAT, V_FIXED16X16, V_BOOL, V_CHAR, V_VOID, V_STRUCT, V_LABEL, V_BIT, V_BITFIELD, V_BBITFIELD, V_SBIT, V_DOUBLE } NOUN; /* storage class */ typedef enum { S_FIXED = 0, S_AUTO, S_REGISTER, S_SFR, S_SBIT, S_CODE, S_XDATA, S_DATA, S_IDATA, S_PDATA, S_LITERAL, S_STACK, S_XSTACK, S_BIT, S_EEPROM } STORAGE_CLASS; #define TYPE_TARGET_CHAR TYPE_BYTE #define TYPE_TARGET_INT TYPE_WORD #define TYPE_TARGET_LONG TYPE_DWORD #define TYPE_TARGET_UCHAR TYPE_UBYTE #define TYPE_TARGET_UINT TYPE_UWORD #define TYPE_TARGET_ULONG TYPE_UDWORD #define TYPE_TARGET_LONGLONG TYPE_QWORD #define TYPE_TARGET_ULONGLONG TYPE_UQWORD /* specifier is the last in the type-chain */ typedef struct specifier { NOUN noun; /* CHAR INT STRUCTURE LABEL */ STORAGE_CLASS sclass; /* REGISTER,AUTO,FIX,CONSTANT */ struct memmap *oclass; /* output storage class */ unsigned b_long:1; /* 1=long */ unsigned b_longlong:1; /* 1=long long */ unsigned b_short:1; /* 1=short int */ unsigned b_unsigned:1; /* 1=unsigned, 0=signed */ unsigned b_signed:1; /* just for sanity checks only*/ unsigned b_static:1; /* 1=static keyword found */ unsigned b_extern:1; /* 1=extern found */ unsigned b_inline:1; /* inline function requested */ unsigned b_noreturn:1; /* promised not to return */ unsigned b_absadr:1; /* absolute address specfied */ unsigned b_volatile:1; /* is marked as volatile */ unsigned b_const:1; /* is a constant */ unsigned b_restrict:1; /* is restricted */ struct symbol *addrspace; /* is in named address space */ unsigned b_typedef:1; /* is typedefed */ unsigned b_isregparm:1; /* is the first parameter */ unsigned b_isenum:1; /* is an enumerated type */ unsigned b_bitUnnamed:1; /* is an unnamed bit-field */ unsigned _bitStart; /* bit start position */ int _bitLength; /* bit length */ unsigned _addr; /* address of symbol */ unsigned _stack; /* stack offset for stacked v */ int argreg; /* reg no for regparm */ union { /* Values if constant or enum */ TYPE_TARGET_INT v_int; /* 2 bytes: int and char values */ const char *v_char; /* character string */ TYPE_TARGET_UINT v_uint; /* 2 bytes: unsigned int const value */ TYPE_TARGET_LONG v_long; /* 4 bytes: long constant value */ TYPE_TARGET_ULONG v_ulong; /* 4 bytes: unsigned long constant value */ TYPE_TARGET_LONGLONG v_longlong; /* 8 bytes: long long constant value */ TYPE_TARGET_ULONGLONG v_ulonglong;/* 8 bytes: unsigned long long const value */ double v_float; /* floating point constant value */ TYPE_TARGET_ULONG v_fixed16x16; /* 4 bytes: fixed point constant value */ struct symbol *v_enum; /* ptr to enum_list if enum==1 */ } const_val; struct structdef *v_struct; /* structure pointer */ } specifier; /* types of declarators */ typedef enum { POINTER = 0, /* pointer to near data */ FPOINTER, /* pointer to far data */ CPOINTER, /* pointer to code space */ GPOINTER, /* _generic pointer */ PPOINTER, /* paged area pointer */ IPOINTER, /* pointer to upper 128 bytes */ UPOINTER, /* unknown pointer used only when parsing */ EEPPOINTER, /* pointer to eeprom */ ARRAY, FUNCTION } DECLARATOR_TYPE; typedef struct declarator { DECLARATOR_TYPE dcl_type; /* POINTER,ARRAY or FUNCTION */ size_t num_elem; /* # of elems if type==array, */ /* always 0 for flexible arrays */ unsigned ptr_const:1; /* pointer is constant */ unsigned ptr_volatile:1; /* pointer is volatile */ unsigned ptr_restrict:1; /* pointer is resticted */ struct symbol *ptr_addrspace; /* pointer is in named address space */ struct sym_link *tspec; /* pointer type specifier */ } declarator; typedef enum { DECLARATOR = 1, SPECIFIER } SYM_LINK_CLASS; #define DECLSPEC2TXT(select) (select==DECLARATOR?"DECLARATOR":select==SPECIFIER?"SPECIFIER":"UNKNOWN") typedef struct sym_link { SYM_LINK_CLASS xclass; /* DECLARATOR or SPECIFIER */ unsigned tdef:1; /* current link created by */ /* typedef if this flag is set */ union { specifier s; /* if CLASS == SPECIFIER */ declarator d; /* if CLASS == DECLARATOR */ } select; /* function attributes */ struct { struct value *args; /* the defined arguments */ unsigned hasVargs:1; /* functions has varargs */ unsigned calleeSaves:1; /* functions uses callee save */ unsigned hasbody:1; /* function body defined */ unsigned hasFcall:1; /* does it call other functions */ unsigned reent:1; /* function is reentrant */ unsigned naked:1; /* naked function */ unsigned shadowregs:1; /* function uses shadow registers (pic16 port) */ unsigned wparam:1; /* first byte of arguments is passed via WREG (pic16 port) */ unsigned nonbanked:1; /* function has the nonbanked attribute */ unsigned banked:1; /* function has the banked attribute */ unsigned critical:1; /* critical function */ unsigned intrtn:1; /* this is an interrupt routine */ unsigned rbank:1; /* seperate register bank */ unsigned inlinereq:1; /* inlining requested */ unsigned noreturn:1; /* promised not to return */ unsigned smallc:1; /* Parameters on stack are passed in reverse order */ unsigned intno; /* 1=Interrupt service routine */ short regbank; /* register bank 2b used */ unsigned builtin; /* is a builtin function */ unsigned javaNative; /* is a JavaNative Function (TININative ONLY) */ unsigned overlay; /* force parameters & locals into overlay segment */ unsigned hasStackParms; /* function has parameters on stack */ } funcAttrs; struct sym_link *next; /* next element on the chain */ } sym_link; typedef struct symbol { char name[SDCC_SYMNAME_MAX + 1]; /* Input Variable Name */ char rname[SDCC_NAME_MAX + 1]; /* internal name */ short level; /* declaration lev,fld offset */ short block; /* sequential block # of definition */ int key; unsigned flexArrayLength; /* if the symbol specifies a struct with a "flexible array member", then the additional length in bytes for the "fam" is stored here. Because the length can be different from symbol to symbol AND v_struct isn't copied in copyLinkChain(), it's located here in the symbol and not in v_struct or the declarator */ unsigned implicit:1; /* implicit flag */ unsigned undefined:1; /* undefined variable */ unsigned infertype:1; /* type should be inferred from first assign */ unsigned _isparm:1; /* is a parameter */ unsigned ismyparm:1; /* is parameter of the function being generated */ unsigned isitmp:1; /* is an intermediate temp */ unsigned islbl:1; /* is a temporary label */ unsigned isref:1; /* has been referenced */ unsigned isind:1; /* is an induction variable */ unsigned isinvariant:1; /* is a loop invariant */ unsigned cdef:1; /* compiler defined symbol */ unsigned addrtaken:1; /* address of the symbol was taken */ unsigned isreqv:1; /* is the register equivalent of a symbol */ unsigned udChked:1; /* use def checking has been already done */ unsigned generated:1; /* code generated (function symbols only) */ unsigned isinscope:1; /* is in scope */ /* following flags are used by the backend for code generation and can be changed if a better scheme for backend is thought of */ unsigned isLiveFcall:1; /* is live at or across a function call */ unsigned isspilt:1; /* has to be spilt */ unsigned spillA:1; /* spilt be register allocator */ unsigned remat:1; /* can be remateriazed */ unsigned isptr:1; /* is a pointer */ unsigned uptr:1; /* used as a pointer */ unsigned isFree:1; /* used by register allocator */ unsigned islocal:1; /* is a local variable */ unsigned blockSpil:1; /* spilt at block level */ unsigned remainSpil:1; /* spilt because not used in remainder */ unsigned stackSpil:1; /* has been spilt on temp stack location */ unsigned onStack:1; /* this symbol allocated on the stack */ unsigned iaccess:1; /* indirect access */ unsigned ruonly:1; /* used in return statement only */ unsigned spildir:1; /* spilt in direct space */ unsigned ptrreg:1; /* this symbol assigned to a ptr reg */ unsigned noSpilLoc:1; /* cannot be assigned a spil location */ unsigned isstrlit; /* is a string literal and it's usage count */ unsigned accuse; /* can be left in the accumulator On the Z80 accuse is divided into ACCUSE_A and ACCUSE_HL as the idea is quite similar. */ unsigned dptr; /* 8051 variants with multiple DPTRS currently implemented in DS390 only */ int allocreq; /* allocation is required for this variable */ int stack; /* offset on stack */ int xstack; /* offset on xternal stack */ short nRegs; /* number of registers required */ short regType; /* type of register required */ struct reg_info *regs[8]; /* can have at the most 8 registers */ struct asmop *aop; /* asmoperand for this symbol */ struct iCode *fuse; /* furthest use */ struct iCode *rematiCode; /* rematerialise with which instruction */ struct operand *reqv; /* register equivalent of a local variable */ struct symbol *prereqv; /* symbol before register equiv. substitution */ struct symbol *psbase; /* if pseudo symbol, the symbol it is based on */ union { struct symbol *spillLoc; /* register spil location */ struct set *itmpStack; /* symbols spilt @ this stack location */ } usl; signed char bitVar; /* if bitVar != 0: this is a bit variable, bitVar is the size in bits */ char bitUnnamed:1; /* unnamed bit variable */ unsigned offset; /* offset from top if struct */ int lineDef; /* defined line number */ char *fileDef; /* defined filename */ int lastLine; /* for functions the last line */ struct sym_link *type; /* 1st link to declarator chain */ struct sym_link *etype; /* last link to declarator chain */ struct symbol *next; /* crosslink to next symbol */ struct symbol *localof; /* local variable of which function */ struct initList *ival; /* ptr to initializer if any */ struct bitVect *defs; /* bit vector for definitions */ struct bitVect *uses; /* bit vector for uses */ struct bitVect *regsUsed; /* for functions registers used */ int liveFrom; /* live from iCode sequence number */ int liveTo; /* live to sequence number */ int used; /* no. of times this was used */ int recvSize; /* size of first argument */ struct bitVect *clashes; /* overlaps with what other symbols */ struct ast *funcTree; /* function body ast if inlined */ struct symbol *addressmod[2]; /* access functions for named address spaces */ bool for_newralloc; } symbol; extern sym_link *validateLink (sym_link * l, const char *macro, const char *args, const char select, const char *file, unsigned line); /* Easy Access Macros */ #define IS_OP_RUONLY(x) (IS_SYMOP(x) && OP_SYMBOL(x) && OP_SYMBOL(x)->ruonly) #define IS_OP_ACCUSE(x) (IS_SYMOP(x) && OP_SYMBOL(x) && OP_SYMBOL(x)->accuse) #define DCL_TYPE(l) validateLink(l, "DCL_TYPE", #l, DECLARATOR, __FILE__, __LINE__)->select.d.dcl_type #define DCL_ELEM(l) validateLink(l, "DCL_ELEM", #l, DECLARATOR, __FILE__, __LINE__)->select.d.num_elem #define DCL_PTR_CONST(l) validateLink(l, "DCL_PTR_CONST", #l, DECLARATOR, __FILE__, __LINE__)->select.d.ptr_const #define DCL_PTR_VOLATILE(l) validateLink(l, "DCL_PTR_VOLATILE", #l, DECLARATOR, __FILE__, __LINE__)->select.d.ptr_volatile #define DCL_PTR_RESTRICT(l) validateLink(l, "DCL_PTR_RESTRICT", #l, DECLARATOR, __FILE__, __LINE__)->select.d.ptr_restrict #define DCL_PTR_ADDRSPACE(l) validateLink(l, "DCL_PTR_ADDRSPACE", #l, DECLARATOR, __FILE__, __LINE__)->select.d.ptr_addrspace #define DCL_TSPEC(l) validateLink(l, "DCL_TSPEC", #l, DECLARATOR, __FILE__, __LINE__)->select.d.tspec #define FUNC_DEBUG //assert(IS_FUNC(x)); #define FUNC_HASVARARGS(x) (x->funcAttrs.hasVargs) #define IFFUNC_HASVARARGS(x) (IS_FUNC(x) && FUNC_HASVARARGS(x)) #define FUNC_ARGS(x) (x->funcAttrs.args) #define IFFUNC_ARGS(x) (IS_FUNC(x) && FUNC_ARGS(x)) #define FUNC_HASFCALL(x) (x->funcAttrs.hasFcall) #define IFFUNC_HASFCALL(x) (IS_FUNC(x) && FUNC_HASFCALL(x)) #define FUNC_HASBODY(x) (x->funcAttrs.hasbody) #define IFFUNC_HASBODY(x) (IS_FUNC(x) && FUNC_HASBODY(x)) #define FUNC_CALLEESAVES(x) (x->funcAttrs.calleeSaves) #define IFFUNC_CALLEESAVES(x) (IS_FUNC(x) && FUNC_CALLEESAVES(x)) #define FUNC_ISISR(x) (x->funcAttrs.intrtn) #define IFFUNC_ISISR(x) (IS_FUNC(x) && FUNC_ISISR(x)) #define FUNC_INTNO(x) (x->funcAttrs.intno) #define FUNC_REGBANK(x) (x->funcAttrs.regbank) #define FUNC_HASSTACKPARM(x) (x->funcAttrs.hasStackParms) #define FUNC_ISINLINE(x) (x->funcAttrs.inlinereq) #define IFFUNC_ISINLINE(x) (IS_FUNC(x) && FUNC_ISINLINE(x)) #define FUNC_ISNORETURN(x) (x->funcAttrs.noreturn) #define IFFUNC_ISNORETURN(x) (IS_FUNC(x) && FUNC_ISNORETURN(x)) #define FUNC_ISREENT(x) (x->funcAttrs.reent) #define IFFUNC_ISREENT(x) (IS_FUNC(x) && FUNC_ISREENT(x)) #define FUNC_ISSHADOWREGS(x) (x->funcAttrs.shadowregs) #define IFFUNC_ISSHADOWREGS(x) (IS_FUNC(x) && FUNC_ISSHADOWREGS(x)) #define FUNC_ISWPARAM(x) (x->funcAttrs.wparam) #define IFFUNC_ISWPARAM(x) (IS_FUNC(x) && FUNC_ISWPARAM(x)) #define FUNC_ISNAKED(x) (x->funcAttrs.naked) #define IFFUNC_ISNAKED(x) (IS_FUNC(x) && FUNC_ISNAKED(x)) #define FUNC_NONBANKED(x) (x->funcAttrs.nonbanked) #define IFFUNC_NONBANKED(x) (IS_FUNC(x) && FUNC_NONBANKED(x)) #define FUNC_BANKED(x) (x->funcAttrs.banked) #define IFFUNC_BANKED(x) (IS_FUNC(x) && FUNC_BANKED(x)) #define FUNC_ISCRITICAL(x) (x->funcAttrs.critical) #define IFFUNC_ISCRITICAL(x) (IS_FUNC(x) && FUNC_ISCRITICAL(x)) #define FUNC_ISBUILTIN(x) (x->funcAttrs.builtin) #define IFFUNC_ISBUILTIN(x) (IS_FUNC(x) && FUNC_ISBUILTIN(x)) #define FUNC_ISJAVANATIVE(x) (x->funcAttrs.javaNative) #define IFFUNC_ISJAVANATIVE(x) (IS_FUNC(x) && FUNC_ISJAVANATIVE(x)) #define FUNC_ISOVERLAY(x) (x->funcAttrs.overlay) #define IFFUNC_ISOVERLAY(x) (IS_FUNC(x) && FUNC_ISOVERLAY(x)) #define FUNC_ISSMALLC(x) (x->funcAttrs.smallc) #define IFFUNC_ISSMALLC(x) (IS_FUNC(x) && FUNC_ISSMALLC(x)) #define BANKED_FUNCTIONS ( options.model == MODEL_HUGE || \ ( (options.model == MODEL_LARGE || options.model == MODEL_MEDIUM) && \ TARGET_Z80_LIKE ) ) #define IFFUNC_ISBANKEDCALL(x) ( IS_FUNC(x) && \ ( FUNC_BANKED(x) || ( BANKED_FUNCTIONS && !FUNC_NONBANKED(x) ) ) ) #define SPEC_NOUN(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.noun #define SPEC_LONG(x) validateLink(x, "SPEC_LONG", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_long #define SPEC_LONGLONG(x) validateLink(x, "SPEC_LONGLONG", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_longlong #define SPEC_SHORT(x) validateLink(x, "SPEC_LONG", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_short #define SPEC_USIGN(x) validateLink(x, "SPEC_USIGN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_unsigned #define SPEC_SCLS(x) validateLink(x, "SPEC_SCLS", #x, SPECIFIER, __FILE__, __LINE__)->select.s.sclass #define SPEC_ENUM(x) validateLink(x, "SPEC_ENUM", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_isenum #define SPEC_OCLS(x) validateLink(x, "SPEC_OCLS", #x, SPECIFIER, __FILE__, __LINE__)->select.s.oclass #define SPEC_STAT(x) validateLink(x, "SPEC_STAT", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_static #define SPEC_EXTR(x) validateLink(x, "SPEC_EXTR", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_extern #define SPEC_CODE(x) validateLink(x, "SPEC_CODE", #x, SPECIFIER, __FILE__, __LINE__)->select.s._codesg #define SPEC_ABSA(x) validateLink(x, "SPEC_ABSA", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_absadr #define SPEC_BANK(x) validateLink(x, "SPEC_BANK", #x, SPECIFIER, __FILE__, __LINE__)->select.s._regbank #define SPEC_ADDR(x) validateLink(x, "SPEC_ADDR", #x, SPECIFIER, __FILE__, __LINE__)->select.s._addr #define SPEC_STAK(x) validateLink(x, "SPEC_STAK", #x, SPECIFIER, __FILE__, __LINE__)->select.s._stack #define SPEC_CVAL(x) validateLink(x, "SPEC_CVAL", #x, SPECIFIER, __FILE__, __LINE__)->select.s.const_val #define SPEC_BSTR(x) validateLink(x, "SPEC_BSTR", #x, SPECIFIER, __FILE__, __LINE__)->select.s._bitStart #define SPEC_BLEN(x) validateLink(x, "SPEC_BLEN", #x, SPECIFIER, __FILE__, __LINE__)->select.s._bitLength #define SPEC_BUNNAMED(x) validateLink(x, "SPEC_BLEN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_bitUnnamed /* Sleaze: SPEC_ISR_SAVED_BANKS is only used on * function type symbols, which obviously cannot * be of BIT type. Therefore, we recycle the * _bitStart field instead of defining a new field. */ #define SPEC_ISR_SAVED_BANKS(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s._bitStart #define SPEC_VOLATILE(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_volatile #define SPEC_CONST(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_const #define SPEC_RESTRICT(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_restrict #define SPEC_ADDRSPACE(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.addrspace #define SPEC_STRUCT(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.v_struct #define SPEC_TYPEDEF(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_typedef #define SPEC_REGPARM(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_isregparm #define SPEC_ARGREG(x) validateLink(x, "SPEC_NOUN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.argreg #define SPEC_INLINE(x) validateLink(x, "SPEC_INLINE", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_inline #define SPEC_NORETURN(x) validateLink(x, "SPEC_NORETURN", #x, SPECIFIER, __FILE__, __LINE__)->select.s.b_noreturn /* type check macros */ #define IS_DECL(x) ( x && x->xclass == DECLARATOR ) #define IS_SPEC(x) ( x && x->xclass == SPECIFIER ) #define IS_ARRAY(x) (IS_DECL(x) && DCL_TYPE(x) == ARRAY) #define IS_DATA_PTR(x) (IS_DECL(x) && DCL_TYPE(x) == POINTER) #define IS_SMALL_PTR(x) (IS_DECL(x) && (DCL_TYPE(x) == POINTER || \ DCL_TYPE(x) == IPOINTER || \ DCL_TYPE(x) == PPOINTER )) #define IS_PTR(x) (IS_DECL(x) && (DCL_TYPE(x) == POINTER || \ DCL_TYPE(x) == FPOINTER || \ DCL_TYPE(x) == GPOINTER || \ DCL_TYPE(x) == IPOINTER || \ DCL_TYPE(x) == PPOINTER || \ DCL_TYPE(x) == EEPPOINTER || \ DCL_TYPE(x) == CPOINTER || \ DCL_TYPE(x) == UPOINTER )) #define IS_PTR_CONST(x) (IS_PTR(x) && DCL_PTR_CONST(x)) #define IS_PTR_RESTRICT(x) (IS_PTR(x) && DCL_PTR_RESTRICT(x)) #define IS_FARPTR(x) (IS_DECL(x) && DCL_TYPE(x) == FPOINTER) #define IS_CODEPTR(x) (IS_DECL(x) && DCL_TYPE(x) == CPOINTER) #define IS_GENPTR(x) (IS_DECL(x) && DCL_TYPE(x) == GPOINTER) #define IS_FUNCPTR(x) (IS_DECL(x) && (DCL_TYPE(x) == CPOINTER || DCL_TYPE(x) == GPOINTER) && IS_FUNC(x->next)) #define IS_FUNC(x) (IS_DECL(x) && DCL_TYPE(x) == FUNCTION) #define IS_LONG(x) (IS_SPEC(x) && x->select.s.b_long) #define IS_LONGLONG(x) (IS_SPEC(x) && x->select.s.b_longlong) #define IS_UNSIGNED(x) (IS_SPEC(x) && x->select.s.b_unsigned) #define IS_TYPEDEF(x) (IS_SPEC(x) && x->select.s.b_typedef) #define IS_CONSTANT(x) (isConstant (x)) #define IS_RESTRICT(x) (isRestrict (x)) #define IS_STRUCT(x) (IS_SPEC(x) && x->select.s.noun == V_STRUCT) #define IS_ABSOLUTE(x) (IS_SPEC(x) && x->select.s.b_absadr ) #define IS_REGISTER(x) (IS_SPEC(x) && SPEC_SCLS(x) == S_REGISTER) #define IS_RENT(x) (IS_SPEC(x) && x->select.s._reent ) #define IS_STATIC(x) (IS_SPEC(x) && SPEC_STAT(x)) #define IS_INLINE(x) (IS_SPEC(x) && SPEC_INLINE(x)) #define IS_NORETURN(x) (IS_SPEC(x) && SPEC_NORETURN(x)) #define IS_INT(x) (IS_SPEC(x) && x->select.s.noun == V_INT) #define IS_VOID(x) (IS_SPEC(x) && x->select.s.noun == V_VOID) #define IS_BOOL(x) (IS_SPEC(x) && x->select.s.noun == V_BOOL) #define IS_CHAR(x) (IS_SPEC(x) && x->select.s.noun == V_CHAR) #define IS_EXTERN(x) (IS_SPEC(x) && x->select.s.b_extern) #define IS_VOLATILE(x) (isVolatile (x)) #define IS_INTEGRAL(x) (IS_SPEC(x) && (x->select.s.noun == V_INT || \ x->select.s.noun == V_BOOL || \ x->select.s.noun == V_CHAR || \ x->select.s.noun == V_BITFIELD || \ x->select.s.noun == V_BBITFIELD || \ x->select.s.noun == V_BIT || \ x->select.s.noun == V_SBIT )) #define IS_BITFIELD(x) (IS_SPEC(x) && (x->select.s.noun == V_BITFIELD || \ x->select.s.noun == V_BBITFIELD )) #define IS_BITVAR(x) (IS_SPEC(x) && (x->select.s.noun == V_BITFIELD || \ x->select.s.noun == V_BBITFIELD || \ x->select.s.noun == V_BIT || \ x->select.s.noun == V_SBIT )) #define IS_BIT(x) (IS_SPEC(x) && (x->select.s.noun == V_BIT || \ x->select.s.noun == V_SBIT )) #define IS_BOOLEAN(x) (IS_SPEC(x) && (x->select.s.noun == V_BIT || \ x->select.s.noun == V_SBIT || \ x->select.s.noun == V_BBITFIELD || \ x->select.s.noun == V_BOOL )) #define IS_FLOAT(x) (IS_SPEC(x) && x->select.s.noun == V_FLOAT) #define IS_FIXED16X16(x) (IS_SPEC(x) && x->select.s.noun == V_FIXED16X16) #define IS_FIXED(x) (IS_FIXED16X16(x)) #define IS_ARITHMETIC(x) (IS_INTEGRAL(x) || IS_FLOAT(x) || IS_FIXED(x)) #define IS_AGGREGATE(x) (IS_ARRAY(x) || IS_STRUCT(x)) #define IS_LITERAL(x) (IS_SPEC(x) && x->select.s.sclass == S_LITERAL) #define IS_CODE(x) (IS_SPEC(x) && SPEC_SCLS(x) == S_CODE) #define IS_REGPARM(x) (IS_SPEC(x) && SPEC_REGPARM(x)) #define IS_VALID_PARAMETER_STORAGE_CLASS_SPEC(x) (!SPEC_TYPEDEF(x) && !SPEC_EXTR(x) && !SPEC_STAT(x) && SPEC_SCLS(x) != S_AUTO) /* symbol check macros */ #define IS_AUTO(x) (x->level && !IS_STATIC(x->etype) && !IS_EXTERN(x->etype)) /* forward declaration for the global vars */ extern bucket *SymbolTab[]; extern bucket *StructTab[]; extern bucket *TypedefTab[]; extern bucket *LabelTab[]; extern bucket *enumTab[]; extern bucket *AddrspaceTab[]; extern symbol *fsadd; extern symbol *fssub; extern symbol *fsmul; extern symbol *fsdiv; extern symbol *fseq; extern symbol *fsneq; extern symbol *fslt; extern symbol *fslteq; extern symbol *fsgt; extern symbol *fsgteq; extern symbol *fps16x16_add; extern symbol *fps16x16_sub; extern symbol *fps16x16_mul; extern symbol *fps16x16_div; extern symbol *fps16x16_eq; extern symbol *fps16x16_neq; extern symbol *fps16x16_lt; extern symbol *fps16x16_lteq; extern symbol *fps16x16_gt; extern symbol *fps16x16_gteq; /* Dims: mul/div/mod, BYTE/WORD/DWORD/QWORD, SIGNED/UNSIGNED/BOTH */ extern symbol *muldiv[3][4][4]; /* Dims: BYTE/WORD/DWORD/QWORD SIGNED/UNSIGNED */ extern sym_link *multypes[4][2]; /* Dims: to/from float, BYTE/WORD/DWORD/QWORD, SIGNED/USIGNED */ extern symbol *conv[2][4][2]; /* Dims: to/from fixed16x16, BYTE/WORD/DWORD/QWORD/FLOAT, SIGNED/USIGNED */ extern symbol *fp16x16conv[2][5][2]; /* Dims: shift left/shift right, BYTE/WORD/DWORD/QWORD, SIGNED/UNSIGNED */ extern symbol *rlrr[2][4][2]; #define SCHARTYPE multypes[0][0] #define UCHARTYPE multypes[0][1] #define INTTYPE multypes[1][0] #define UINTTYPE multypes[1][1] #define LONGTYPE multypes[2][0] #define ULONGTYPE multypes[2][1] #define LONGLONGTYPE multypes[3][0] #define ULONGLONGTYPE multypes[3][1] extern sym_link *floatType; extern sym_link *fixed16x16Type; #include "SDCCval.h" typedef enum { RESULT_TYPE_NONE = 0, /* operands will be promoted to int */ RESULT_TYPE_BOOL, RESULT_TYPE_CHAR, RESULT_TYPE_INT, RESULT_TYPE_OTHER, /* operands will be promoted to int */ RESULT_TYPE_IFX, RESULT_TYPE_GPTR /* operands will be promoted to generic ptr */ } RESULT_TYPE; /* forward definitions for the symbol table related functions */ void initSymt (); symbol *newSymbol (const char *, int); sym_link *newLink (SYM_LINK_CLASS); sym_link *newFloatLink (); structdef *newStruct (const char *); void addDecl (symbol *, int, sym_link *); sym_link *finalizeSpec (sym_link *); sym_link *mergeSpec (sym_link *, sym_link *, const char *name); sym_link *mergeDeclSpec (sym_link *, sym_link *, const char *name); symbol *reverseSyms (symbol *); sym_link *reverseLink (sym_link *); symbol *copySymbol (symbol *); symbol *copySymbolChain (symbol *); void printSymChain (symbol *, int); void printStruct (structdef *, int); char *genSymName (int); sym_link *getSpec (sym_link *); int compStructSize (int, structdef *); sym_link *copyLinkChain (sym_link *); int checkDecl (symbol *, int); void checkBasic (sym_link *, sym_link *); value *checkPointerIval (sym_link *, value *); value *checkStructIval (symbol *, value *); value *checkArrayIval (sym_link *, value *); value *checkIval (sym_link *, value *); unsigned int getSize (sym_link *); unsigned int bitsForType (sym_link *); sym_link *newIntLink (); sym_link *newCharLink (); sym_link *newLongLink (); sym_link *newBoolLink (); sym_link *newVoidLink (); int compareType (sym_link *, sym_link *); int compareTypeExact (sym_link *, sym_link *, int); int compareTypeInexact (sym_link *, sym_link *); int checkFunction (symbol *, symbol *); void cleanUpLevel (bucket **, int); void cleanUpBlock (bucket **, int); symbol *getAddrspace (sym_link *type); int funcInChain (sym_link *); void addSymChain (symbol **); sym_link *structElemType (sym_link *, value *); symbol *getStructElement (structdef *, symbol *); sym_link *computeType (sym_link *, sym_link *, RESULT_TYPE, int); void processFuncPtrArgs (sym_link *); void processFuncArgs (symbol *); int isSymbolEqual (symbol *, symbol *); int powof2 (TYPE_TARGET_ULONG); void dbuf_printTypeChain (sym_link *, struct dbuf_s *); void printTypeChain (sym_link *, FILE *); void printTypeChainRaw (sym_link *, FILE *); void initCSupport (); void initBuiltIns (); void pointerTypes (sym_link *, sym_link *); void cdbStructBlock (int); void initHashT (); bucket *newBucket (); void addSym (bucket **, void *, char *, int, int, int checkType); void deleteSym (bucket **, void *, const char *); void *findSym (bucket **, void *, const char *); void *findSymWithLevel (bucket **, struct symbol *); void *findSymWithBlock (bucket **, struct symbol *, int); void changePointer (sym_link * p); void checkTypeSanity (sym_link * etype, const char *name); sym_link *typeFromStr (const char *); STORAGE_CLASS sclsFromPtr (sym_link * ptr); sym_link *newEnumType (symbol *); void promoteAnonStructs (int, structdef *); int isConstant (sym_link * type); int isVolatile (sym_link * type); int isRestrict (sym_link * type); value *aggregateToPointer (value *); extern char *nounName (sym_link *); /* noun strings */ extern void printFromToType (sym_link *, sym_link *); #endif
atsidaev/sdcc-z80-gas
src/SDCCsymt.h
C
gpl-2.0
34,198
[ 30522, 1013, 1008, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>1001 - The One After Joey And Rachel Kiss</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <h1 align="center">1001 - The One After Joey And Rachel Kiss</h1> <hr> <p>Written by: Andrew Reich &amp; Ted Cohen<br> Transcribed by: <a href="http://www.friendstranscripts.tk/" target="_blank">Coffee Mug</a></p> <hr> <p>[Scene: Barbados, Monica and Chandler's Room. They both enter from Ross's room. Monica still has her big, frizzy hair.]</p> <p><strong>Monica</strong>: Oh, the way you crushed Mike at ping pong was such a turn-on.You wanna...? (plays with her finger on Chandlers chest)</p> <p><strong>Chandler</strong>: You know, I'd love to, but I'm a little tired.</p> <p><strong>Monica</strong>: I'll put a pillowcase over my head.</p> <p><strong>Chandler</strong>: You're on!</p> <p>(they start to get ready, but then Phoebe enters through the door from Ross's room)</p> <p><strong>Phoebe</strong>: Hey!</p> <p><strong>Monica</strong>: What's up?</p> <p><strong>Phoebe</strong>: Well, okay, Mike's taking a shower, which by the way there's no law against. And then we're gonna grab some food, so if you want...</p> <p>(there's a door slamming in Ross's room, and some indistinct murmuring)</p> <p><strong>Ross</strong>: ... finally...</p> <p><strong>Phoebe</strong>: Is that Ross?</p> <p><strong>Monica</strong>: Yeah, you can hear everything through these stupid walls.</p> <p><strong>Phoebe</strong>: Sounds like he's with someone.</p> <p><strong>Chandler</strong>: He could be alone. This morning I heard him do push-ups, and then talk to his triceps.</p> <p><strong>Monica</strong>: Wait a minute, I think Phoebe's right. You know I hear someone else in there with him.</p> <p>(they all put their ear against the wall to be able to hear what's being said. We move to Ross's room where he and Charlie are kissing.)</p> <p><strong>Charlie</strong>: Ooh... Dr. Geller!</p> <p><strong>Ross</strong>: God, you're amazing... I didn't even have to <em>ask</em> you to call me that.</p> <p><strong>Monica</strong>: Oh my God, that's Charlie!</p> <p><strong>Chandler</strong>: She's cheating on Joey with Ross!</p> <p><strong>Phoebe</strong>: Oh that tart... floozy... giant...</p> <p><strong>Monica</strong>: I'm not sure about this.</p> <p><strong>Phoebe</strong>: Yeah, you're right. This is none of our business.</p> <p><strong>Monica</strong>: No I'm not sure that it's the best way to hear everything. Someone get me a glass!</p> <p><strong>Phoebe</strong>: Oh, I'm not gonna do this, okay? I'm not gonna eavesdrop on my friend.</p> <p><strong>Rachel</strong>: (through wall) Ooh... I <em>love<strong> </strong></em>Barbados! </p> <p>(Phoebe starts to listen at the other wall, where Rachel's room is. There, Joey and Rachel are kissing.)</p> <p><strong>Joey</strong>: Ooh... I can't believe I'm kissing you. <strong>I'm kissing Rachel!</strong></p> <p><strong>Rachel</strong>: I know, I'm her!</p> <p>(they start to kiss again, and Phoebe turns to Chandler and Monica)</p> <p><strong>Phoebe</strong>: (whispering) Rachel and Joey! It's Rachel and Joey!!!</p> <p><strong>Monica</strong>: What?</p> <p><strong>Phoebe</strong>: Get over here!</p> <p>(Chandler and Monica take a sprint to the other wall)</p> <p><strong>Rachel</strong>: ooh...</p> <p><strong>Chandler</strong>: Wow!</p> <p><strong>Monica</strong>: (in her Monica-excited-way... TOO LOUD!) Oh my God, I love how thin these walls are!</p> <p>(In the rooms next door, Joey, Rachel, Ross and Charlie stop kissing and try to understand what the yelling was about. After a while they continue kissing. We're back in Chandler and Monica's room. Monica has some of her own hair stuffed in her mouth by Chandler.)</p> <p><strong>Monica</strong>: (muffled) Thank you.</p> <p align="center"><strong>OPENING CREDITS</strong></p> <p>(Rachel and Joey's)</p> <p><strong>Rachel</strong>: Hey, you know, before you said that nothing could happen between us? What changed?</p> <p><strong>Joey</strong>: Well, I only said that because of Ross, you know. Then I saw him kissing Charlie...</p> <p><strong>Rachel</strong>: What? Ross and Charlie? (Joey nods) Wow! She's really making her way through the group, huh? Ah, who am I to talk?</p> <p>(Chandler and Monica's)</p> <p><strong>Monica</strong>: I can't believe this. Rachel and Joey?</p> <p><strong>Chandler</strong>: How about the dinosaur twins in the other room? No-one is manning that wall!</p> <p><strong>Monica</strong>: I'm on it!</p> <p><strong>Chandler</strong>: Anything?</p> <p><strong>Monica</strong>: I think I hear curtains closing... </p> <p><strong>Phoebe</strong>: We've got shoes being kicked off over here.</p> <p><strong>Monica</strong>: Bedsprings, unmistakable!</p> <p><strong>Chandler</strong>: You do realise that's your brother?</p> <p><strong>Monica</strong>: Not until you said it. Somebody switch! (Chandler makes a clicking sound with his fingers and Phoebe runs to the other wall. Monica returns to Chandlers wall.) Wait a minute... Ross and Charlie, Joey and Rachel, Phoebe and Mike! We're the only people leaving with the same person we came with.</p> <p><strong>Chandler</strong>: That's not true. I came with Monica and I'm leaving with Weird Al.</p> <p><strong>Monica</strong>: Okay, I've had it with the hair jokes. Tomorrow morning, before we leave, I'm going to the salon.</p> <p><strong>Chandler</strong>: Okay Buckwheat!</p> <p><strong>Phoebe</strong>: You gotta hear this, it's great... It's like free porn! (Chandler eagerly rushes over)</p> <p>(Ross and Charlie's)</p> <p><strong>Ross</strong>: Weh...*sigh*</p> <p><strong>Charlie</strong>: uhm... Is everything okay?</p> <p><strong>Ross</strong>: Yeah, It's just... I don't think I can do this...</p> <p><strong>Charlie</strong>: Ooh... Is it because of what might be on the bedspread, because I saw that news report too, with the infra red and the ... I could just...</p> <p><strong>Ross</strong>: No, NO! (they're moving to the side of the bed, where they sit down) Look, I need to talk to Joey. I mean, you guys just broke up. Before anything more happens between us, I need to know he's okay with it.</p> <p><strong>Charlie</strong>: I uhm... I completely understand.</p> <p><strong>Ross</strong>: Alright, I'm gonna go find them... (twitches a bit, looks down) I just need a... need a before I can... you know. (gestures standing up... they sit and wait for a while) Grandma... grandma... grandma... (he tries to concentrate...) Okay, I see you later.</p> <p><strong>Charlie</strong>: Okay...</p> <p>(Chandler and Monica's, all three of them are listening at the wall to Ross and Charlie's)</p> <p><strong>Phoebe</strong>: That's the door. He's gone...</p> <p><strong>Chandler</strong>: And she's... turning on the TV... and watching... Miss Congeniality!</p> <p><strong>Monica</strong>: Honey, if you know it through a wall, you know it too well!</p> <p>(They are still listening at the wall, when Ross enters their room)</p> <p><strong>Ross</strong>: Hey, what are you guys doing?</p> <p><strong>Phoebe</strong>: Oh, we're just... we're sad to go so we're just saying goodbye to the hotel. (hugs the wall) I love you... Paradise Hotel, Golf resort and Spa... (she walks away from the wall)</p> <p><strong>Monica</strong>: (also hugs the wall) Yeah, we had a great time, thank you! (walks to Phoebe)</p> <p><strong>Chandler</strong>: (caresses the wall with his finger) Bye!</p> <p><strong>Ross</strong>: Okay, uhm... Hey, you guys seen Joey anywhere?</p> <p><strong>Chandler</strong>: He's probably in his room with his current girlfriend Charlie. That's the situation as <em>we</em> know it... (walks to Phoebe and Monica)</p> <p><strong>Ross</strong>: Well, if you see him could you <em>please</em> tell him I'm looking for him?</p> <p><strong>Chandler</strong>: You got it!</p> <p><strong>Ross</strong>: Thanks! (walks out of the room and starts hugging the wall) Thank you! (closes the door)</p> <p><strong>Monica</strong>: Other wall, people! Other wall!</p> <p>(they rush to the wall to Rachel and Joey's, and we move to that room)</p> <p><strong>Ross</strong>: (knocks on door) Rach, you there? (Joey and Rachel both get up from the bed)</p> <p><strong>Joey</strong>: Oh my God, it's Ross. What are we gonna do?</p> <p><strong>Rachel</strong>: Oh, ju-ju-just stay calm. Just be calm. For all he knows we're just hanging out together. Right? Just be nonchalant. (Joey like stands at attention with his chest forward and his hands on his sides, looking up at the ceiling with his lips pouted.) That's not nonchalant!</p> <p><strong>Joey</strong>: No idea what it means.</p> <p><strong>Rachel</strong>: Oh... okay, just hide!</p> <p><strong>Ross</strong>: (knocks) Rach?</p> <p><strong>Rachel</strong>: Coming! Try under the bed, try under the bed!</p> <p>(When Rachel starts to look under the bed if Joey would fit under there, Chandler opens the door inbetween the rooms, grabs Joey by his shirt and drags him to his room, and closes the door again)</p> <p><strong>Rachel</strong>: There's no room under the bed. (looks around because she can't find Joey anymore)</p> <p><strong>Ross</strong>: Is everything okay?</p> <p><strong>Rachel</strong>: Yeah... (still looking to see where Joey went, and opens the door)</p> <p><strong>Ross</strong>: Hey.</p> <p><strong>Rachel</strong>: Hi...</p> <p><strong>Ross</strong>: You know where Joey is?</p> <p><strong>Rachel</strong>: ...I really don't... (looks around again)</p> <p><strong>Ross</strong>: Can I talk to you for a minute?</p> <p><strong>Rachel</strong>: Yeah, sure... (looks outside into the corridor if Joey is there)</p> <p>(Monica and Chandler's room. Phoebe, Monica and Chandler have their ears pressed against the wall, and Joey looks at them)</p> <p><strong>Joey</strong>: I don't believe this... Have you guys been...</p> <p><strong>Phoebe</strong>: Shhh... This is the <em>listening</em> side of the wall.</p> <p>(Now Joey also wants to listen, and wants to press his ears against the door, which has a big mirror on it, he hesitates seeing himself in the mirror, but still puts his ear against it. We move again to Rachel's room.)</p> <p><strong>Ross</strong>: And then she told me that she and Joey had broken up, and that part of the reason was that she had feelings for me.</p> <p><strong>Rachel</strong>: (clearly not listening and still trying to find out where Joey went) Uh-huh... right... yeah...</p> <p><strong>Ross</strong>: And you know I wanted to ask Charlie out since the day I met her.</p> <p><strong>Rachel</strong>: (still searching) Oh, I know... I know it's been really hard for you.</p> <p><strong>Ross</strong>: Anyway, one thing lead to another, and... oh... before you know it, we were kissing. I mean, how angry do you think Joey is gonna be?</p> <p><strong>Rachel</strong>: (now looking up at the ceiling) That is hard to say, Ross. That is hard to say.</p> <p><strong>Ross</strong>: You know, I gotta go find him. He's gotta be here someplace.</p> <p><strong>Rachel</strong>: You would think!</p> <p>(Ross leaves the room)</p> <p><strong>Rachel</strong>: Joey!</p> <p><strong>Joey</strong>: Is he gone?</p> <p><strong>Rachel</strong>: (still can't find him) How are you doing this?</p> <p>(Joey now enters the room through the door, Monica, Chandler and Phoebe are following him.)</p> <p><strong>Joey</strong>: Pssst...</p> <p><strong>Rachel</strong>: How... wha... Hey! What are you... What is this? Have you guys been listening this entire time?</p> <p><strong>Monica, Chandler and Phoebe</strong>: YE-AH!</p> <p><strong>Phoebe</strong>: Now, what is this?</p> <p><strong>Rachel</strong>: Ah, what <em>is</em> this? Well, lets see, we kissed for ten minutes and now we're talking to our friends about it, so I guess this is sixth grade!</p> <p><strong>Phoebe</strong>: Oh no... Have you thought about it how complicated this could get? What about Ross?</p> <p><strong>Joey</strong>: Well, he's with Charlie now.</p> <p><strong>Monica</strong>: Yeah, but he wants to talk to you before anything really happens with her. And as his friend, I mean, don't you think he deserves the same from you?</p> <p><strong>Joey</strong>: (long pause and he twitches a bit) You're a pain in my ass, Geller!</p> <p><strong>Rachel</strong>: All right, look you guys... Look, we appreciate all the advice, but this is between Joey and me and I think we can handle it...</p> <p><strong>Chandler</strong>: Okay, well we'll go back in there, but will you do <em>one </em>thing for us? The people that care about you?</p> <p><strong>Rachel</strong>: Sure...</p> <p><strong>Chandler</strong>: Enunciate!</p> <p><strong>Rachel</strong>: Get out!</p> <p>(They leave and Rachel locks the door.)</p> <p><strong>Rachel</strong>: Are they right?</p> <p><strong>Joey</strong>: Probably, yeah... I mean, maybe we should... hold off until we talk to Ross.</p> <p><strong>Rachel</strong>: Yeah... <em>Yeah</em>, we can wait, we don't have to do anything <em>tonight</em>.</p> <p><strong>Joey</strong>: Yeah, I think that'd be best... So, so I'm gonna... I'm gonna take off...</p> <p><strong>Rachel</strong>: (Joey walks to the door) Although... </p> <p><strong>Joey</strong>: (turns around very fast) I like although!</p> <p><strong>Rachel</strong>: I mean, you know... Ross and I haven't dated in like... six years...</p> <p><strong>Joey</strong>: Six years? Wow... It's almost as long as highschool...</p> <p><strong>Rachel</strong>: Plus, you know, he is with Charlie now.</p> <p><strong>Joey</strong>: Absolutely! He's not thinking about <em>you</em>.</p> <p><strong>Rachel</strong>: No...</p> <p><strong>Joey</strong>: I'm thinking about you...</p> <p><strong>Rachel</strong>: Yeah...</p> <p><strong>Joey</strong>: Let's forget about Ross...</p> <p><strong>Rachel</strong>: Forgotten.</p> <p>(They want to kiss, but just before their lips touch, Rachel pulls back quickly, gasping)</p> <p><strong>Joey</strong>: What's wrong?</p> <p><strong>Rachel</strong>: Nothing...</p> <p><strong>Joey's voice, but she sees Ross</strong>: Seriously... What is it?</p> <p><strong>Rachel</strong>: Nothing... It's really... It's nothing... Come here, come here...</p> <p>(again, just before their lips touch, she pulls back, gasping)</p> <p><strong>Joey's voice/Ross</strong>: What's wrong?</p> <p><strong>Rachel</strong>: Sorry, I just uhm... I can't seem to get Ross out of my head...</p> <p><strong>Joey</strong>: Well, maybe I can help. (he grabs her head passionately, closes his eyes and kisses... Ross in Rachel's dress! He realises it too late, and when he does, pushes Ross's/Rachel's head away)</p> <p><strong>Rachel/Ross</strong>: Ooh, your lips are so soft... Do that again... (and she/he moves in for another kiss. Joey, pushes her head away again...)</p> <p><strong>Joey</strong>: Yeah... we really need to talk to Ross...</p> <p><strong>Both</strong>: Yeah</p> <p align="center"><strong>COMMERCIAL BREAK</strong></p> <p>[Scene: Chandler and Monica's room. Chandler is packing when Ross knocks on the door and enters...]</p> <p><strong>Ross</strong>: Hey!</p> <p><strong>Chandler</strong>: Hey!</p> <p><strong>Ross</strong>: You guys ready to go?</p> <p><strong>Chandler</strong>: Not quite. Monica's still at the salon, and I'm just finishing packing.</p> <p><strong>Ross</strong>: Dude! You're not taking your Bible?</p> <p><strong>Chandler</strong>: You're not supposed to take that. Besides, it's a New Testament, what are <em>you</em> gonna do with it?</p> <p><strong>Ross</strong>: Learn about Jesus...</p> <p>(Charlie now also enters the room, Chandler walks to the bathroom)</p> <p><strong>Ross</strong>: Hey!</p> <p><strong>Charlie</strong>: So, did you talk to Joey?</p> <p><strong>Ross</strong>: Uh, no... no. I couldn't find him. I'm just gonna talk to him on the plane.</p> <p><strong>Charlie</strong>: Yeah, sounds like a good idea... <em>Dr.</em> Geller!</p> <p><strong>Ross</strong>: Stop it!</p> <p><strong>Charlie</strong>: PHD</p> <p><strong>Ross</strong>: You're filthy!</p> <p>(Phoebe enters)</p> <p><strong>Phoebe</strong>: Hey, have you guys seen Monica?</p> <p><strong>Ross</strong>: Uh, actually I think she went to the salon.</p> <p><strong>Phoebe</strong>: Oh yeah, oh, she went to the salon alright...</p> <p>(Monica enters, with her hair braided and little shells at the end)</p> <p><strong>Monica</strong>: Check it out!</p> <p><strong>Phoebe</strong>: Who's day just got better? <strong>CHANDLER!</strong></p> <p>(Chandler enters from the bathroom)</p> <p><strong>Chandler</strong>: Hey!... aaaaaahhhh!</p> <p><strong>Monica</strong>: What do you think?</p> <p><strong>Chandler</strong>: I think.... I think I can see your scalp.</p> <p><strong>Monica</strong>: Don't you just love it?</p> <p><strong>Ross</strong>: Ye... Yeah... Yeah... You got shellfish in your head.</p> <p><strong>Charlie</strong>: It's so... something... <em>You go girlfriend!</em></p> <p><strong>Ross</strong>: You've never said that in your life, have you?</p> <p><strong>Charlie</strong>: Not once.</p> <p><strong>Ross</strong>: I thought so.</p> <p><strong>Monica</strong>: And listen to this... (shakes her body so the shells tingle)</p> <p><strong>Chandler</strong>: What d'ya know... It's a treat for the eyes <em>and</em> the ears.</p> <p>[Scene: Boarding the plane.]</p> <p><strong>Joey</strong>: Whoo, whoo. Wow, it's uhm... kinda weird that I'm sitting next to Charlie after we broke up.</p> <p><strong>Chandler</strong>: Yeah, it's almost if Air Barbados doesn't care about your social life.</p> <p><strong>Joey</strong>: Look, does someone mind switching to sit with Charlie?</p> <p><strong>Ross</strong>: Oh, I uh, I mean, I... dude, I spent the whole conference with Charlie.</p> <p><strong>Joey</strong>: I understand...</p> <p><strong>Ross</strong>: No, I'll do it. (he quickly grabs Joey's boarding pass and gives Joey his one.)</p> <p><strong>Chandler</strong>: Wish I could switch with someone. I really don't wanna sit with Allen Iverson over there.</p> <p>(Switch to Phoebe and Mike, who are kissing)</p> <p><strong>Phoebe</strong>: Uhm... You know, once we're in the air and the captain turns off the seatbelt sign... you feel free to roam about my cabin...</p> <p><strong>Mike</strong>: You should be careful when checking your overhead bins, 'cause items may shift during...</p> <p><strong>Phoebe</strong>: Aaah... you're not good at this...</p> <p><strong>Mike</strong>: You don't have to go home tonight, do you?</p> <p><strong>Phoebe</strong>: No, I think I can come over. It's Saturday, right?</p> <p><strong>Mike</strong>: Oh...</p> <p><strong>Phoebe</strong>: What?</p> <p><strong>Mike</strong>: Uhm... I can't do anything tonight.</p> <p><strong>Phoebe</strong>: Why not?</p> <p><strong>Mike</strong>: I have a date.</p> <p><strong>Phoebe</strong>: You have a... You have a date? With who?</p> <p><strong>Mike</strong>: Oh, it's... my girlfriend.</p> <p><strong>Phoebe</strong>: (lets go of his hand) You have... have a girlfriend?</p> <p><strong>Mike</strong>: Yeah... Well, when... you and I broke up I started seeing someone.</p> <p><strong>Phoebe</strong>: For how long?</p> <p><strong>Mike</strong>: Three months.</p> <p><strong>Phoebe</strong>: Three months? Okay... This is probably none of my business, but uhm, how long do you think you're gonna keep seeing her?</p> <p><strong>Mike</strong>: I'll tell her that it's over tonight at dinner. I promise.</p> <p><strong>Phoebe</strong>: Oh, okay... good. You do that. And then when you get home, maybe there'll be a special delivery package waiting for you.</p> <p><strong>Mike</strong>: Maybe I'll sign for it. Tear it open. Pull out the packing material...</p> <p><strong>Phoebe</strong>: You know what, we're gonna have sex. Let's just leave it there.</p> <p>(cut to Charlie and Ross)</p> <p><strong>Ross</strong>: Right, I'm gonna go talk to Joey. I think this is the right time. He's always in a good mood after the flight attendant says &quot;duty free&quot;.</p> <p><strong>Charlie</strong>: Okay... Good luck.</p> <p>(Ross gets up and gestures to Rachel, we cut to Joey and Rachel)</p> <p><strong>Rachel</strong>: Ross is coming over. I think now would be a really good time to talk to him.</p> <p><strong>Joey</strong>: I guess so. I'm just... really nervous.</p> <p><strong>Rachel</strong>: Okay, well keep in mind that by the time you're done, they'll probably be serving dinner.</p> <p><strong>Joey</strong>: Ooh...</p> <p><strong>Rachel</strong>: Still nervous?</p> <p><strong>Joey</strong>: I'm gonna get the lasagna.</p> <p><strong>Ross</strong>: Hey Rach...</p> <p><strong>Rachel</strong>: Yeah!</p> <p><strong>Ross</strong>: Do you mind if I sit here for a sec.?</p> <p><strong>Rachel</strong>: Yeah, yeah sure! Yeah! (mouths &quot;Good luck&quot; to Joey and gets up from her seat)</p> <p><strong>Ross</strong>: Hey!</p> <p><strong>Joey</strong>: Hey!</p> <p><strong>Ross</strong>: So, I uhm... kinda need to talk to you about Charlie.</p> <p><strong>Joey</strong>: Yeah?</p> <p><strong>Ross</strong>: Okay, last night after you guys broke up... <em>so</em> sorry to hear about that, by the way... Well, Charlie and I were talking, and..., well...</p> <p><strong>Joey</strong>: You kissed.</p> <p><strong>Ross</strong>: Wha... (gasps) What? What would give you that idea?</p> <p><strong>Joey</strong>: I saw you.</p> <p><strong>Ross</strong>: Yeah, we kissed, but... nothing else... nothing else happened, okay.</p> <p><strong>Joey</strong>: Ross, Ross, Ross... It's okay.</p> <p><strong>Ross</strong>: What?</p> <p><strong>Joey</strong>: It's <em>okay</em>. You know, I totally understand, alright? You guys, make way more sense than her and I ever did, you know. And... I want you to be happy.</p> <p><strong>Ross</strong>: Are you serious?</p> <p><strong>Joey</strong>: Yeah... Now I have something...</p> <p><strong>Ross</strong>: I am speachless... I mean the fact that you would put my happiness first like that. I mean, you're an incredible friend, you know that?</p> <p><strong>Joey</strong>: Oh... uh... look... before you...</p> <p><strong>Ross</strong>: No, I mean it. You are so loyal man, and selfless, and generous...</p> <p><strong>Joey</strong>: I am those things, yeah.</p> <p><strong>Ross</strong>: You know what? I know Chandler longer, so I always think of him as my best friend, but <em>now</em>... I may have to rethink some stuff...</p> <p><strong>Joey</strong>: <em>Dude!</em></p> <p><strong>Ross</strong>: Hey, if there is ever, anything I can do for you...</p> <p><strong>Joey</strong>: I can't think of anything.</p> <p>(They both hug, and Rachel, who was in the back of the plane, sees this and smiles.)</p> <p><strong>Ross</strong>: Thanks!</p> <p><strong>Joey</strong>: Yeah.</p> <p>(Ross walks to the back of the plane, where Rachel is.)</p> <p><strong>Rachel</strong>: So hi!</p> <p><strong>Ross</strong>: Hi!</p> <p><strong>Rachel</strong>: So you eh, you talked to Joey?</p> <p><strong>Ross</strong>: Ah, yeah. We had a really good talk.</p> <p><strong>Rachel</strong>: Oh! That's great!</p> <p><strong>Ross</strong>: Yeah!</p> <p><strong>Rachel</strong>: Oh, so everything's okay?</p> <p><strong>Ross</strong>: Oh, no, it's great. It's great. He is... He is an amazing guy.</p> <p><strong>Rachel</strong>: Ah... Well, obviously I think so too.</p> <p><strong>Ross</strong>: Well, I'm so excited about this.</p> <p><strong>Rachel</strong>: Really? Excited?</p> <p><strong>Ross</strong>: Are you kidding? I have had some <em>very</em> dirty dreams about this...</p> <p><strong>Rachel</strong>: Excuse me! (and she walks back to Joey, who is still looking very impressed about what Ross said to him. Rachel looks at him and hits him.) You didn't tell him, did you?</p> <p><strong>Joey</strong>: I couldn't. He was saying all these really nice things about me. I didn't want him to get mad and take 'em all back. I'm on a edge on Chandler.</p> <p><strong>Rachel</strong>: Oh God! Alright, fine. You know what Joey, forget it. When we go back to New York, I will tell him.</p> <p><strong>Joey</strong>: Thank you. Yeah, I appreciate that.</p> <p>(Chandler walks by and Joey lets out an evil &quot;muhahaho&quot;.)</p> <p align="center"><strong>COMMERCIAL BREAK</strong></p> <p>[Scene: Mike's apartment. Phoebe's there and the phone rings.]</p> <p><strong>Phoebe</strong>: Hi, Mike's place.</p> <p><strong>Mike</strong>: Hey, it's Mike.</p> <p><strong>Phoebe</strong>: Ooh, that was fast.</p> <p><strong>Mike</strong>: Oh, err... no, she's not here yet. You know, I think I'm just gonna take off and break up with her over the phone...</p> <p><strong>Phoebe</strong>: Yeah, you can't do that! Oh, come on Mike, strap on a pair.Why don't you just tell her that we got back together. You know, women appreciate honesty. We also appreciate gentle spanking once in a while. Just F.Y.I.</p> <p><strong>Mike</strong>: One more thing... There... might be a picture of Precious on my coffee table.</p> <p><strong>Phoebe</strong>: Her name is Precious? Is she a purebreed or did you pick her up at the pound?</p> <p><strong>Mike</strong>: Anyway, I just wanna give you a heads up. </p> <p><strong>Phoebe</strong>: Okay, oh and you know, if she gets upset, just scratch her tummy and give her a liver snout. (laughs and hangs up the phone)</p> <p>(there's knocking on the door which Phoebe opens)</p> <p><strong>Precious</strong>: Hi, I'm Precious, who are you?</p> <p><strong>Phoebe</strong>: (stunned) I... I'm Phoebe.</p> <p><strong>Precious</strong>: Phoebe? Mike's ex-girlfriend Phoebe, the love of his life? That Phoebe?</p> <p><strong>Phoebe</strong>: Enchant&eacute; (she holds out her hand, and they shake hands)</p> <p>[Scene: Chandler and Monica's apartment. Monica's carrying the laundry hamper to their coffee table.]</p> <p><strong>Monica</strong>: Oh, I can't wait for everyone at work to see these... (plays with her hair to make the shells tingle again) Ow!</p> <p><strong>Chandler</strong>: You go back to work tomorrow night, right?</p> <p><strong>Monica</strong>: Yeah!</p> <p><strong>Chandler</strong>: So if you want people to see them, then by definition you're not having them taken out... say, at the break of dawn?</p> <p><strong>Monica</strong>: Well, if I had them taken out, then I wouldn't be able to do <em>this</em>. (she pushes Chandler on the couch and brushes her hair and shells against Chandler's chest) You like that, right? (again, she brushes her hair against his chest and hums...)</p> <p><strong>Chandler</strong>: What are you singing?</p> <p><strong>Monica</strong>: It's &quot;Bolero&quot; from &quot;10&quot;.</p> <p><strong>Chandler</strong>: It's &quot;Ride of the Valkyries&quot; from &quot;Apocalypse Now&quot;... See, here's the thing: The corn rose were really a solution to your frizzy hair problem. And now that we're home, we don't have that problem anymore, so if you think about it... <em>I <strong>hate</strong> them!</em></p> <p><strong>Monica</strong>: You what? You said you liked them.</p> <p><strong>Chandler</strong>: Did I? Let's refresh. I believe what I said was that I could see your scalp.</p> <p><strong>Monica</strong>: Fine, so you don't like them. Everybody else does.</p> <p><strong>Chandler</strong>: Again, let's journey back... As I recall what Rachel said, was she had never notice the shape of your skull before. And Joey... Well, Joey didn't realise that there was anything different.</p> <p><strong>Monica</strong>: You know what? I don't care. I like it like this, and I'm gonna keep it. You're just jealous because your hair can't do this... (and she shakes her head more violently) OUCH!</p> <p><strong>Chandler</strong>: Hit yourself in the tooth?</p> <p><strong>Monica</strong>: And the eye!</p> <p>[Scene: Ross's apartment.Someone's knocking on the door. Ross rushes to the door and it's Rachel with Emma.]</p> <p><strong>Ross</strong>: (gasps) Hi... There she is. Hi Emma. Oh my God, I missed you. (kisses her) Oh Emma, I missed you <em>so</em> much. Hey... Did you have a good time with grandma Green? Huh? Did she give you a bottle of anti-depressants again <strong>to use as a rattle</strong>? (to Rachel)</p> <p><strong>Rachel</strong>: That was one time, Ross, and they were only like 5 milligrams.</p> <p><strong>Ross</strong>: Ooh hey, Emma, daddy has some presents for you okay? Okay? I want you to wait right here. Come here sweetie.</p> <p><strong>Rachel</strong>: Aaah... Ross, actually there's something that I really need to talk to you about.</p> <p><strong>Ross</strong>: (unpacking his bag) Okay, shoot!</p> <p><strong>Rachel</strong>: Okay, uhm... alright, here's the deal.</p> <p><strong>Ross</strong>: (gasps) <strong>OH NO!</strong></p> <p><strong>Rachel</strong>: What? What is it?</p> <p><strong>Ross</strong>: Oh, major shampoo explosion!</p> <p><strong>Rachel</strong>: Uh, look Ross, this really isn't easy.</p> <p><strong>Ross</strong>: Oh, it's all over <strong>everything</strong>. Why? Why me? (looks up)</p> <p><strong>Rachel</strong>: Because you took three hundred bottles of shampoo?</p> <p><strong>Ross</strong>: I'm sorry, I'm sorry. You were saying?</p> <p><strong>Rachel</strong>: Well, yeah... Okay, look it's about me and...</p> <p><strong>Ross</strong>: Oh, not another one! Oh my G... And this is moisturiser. It's even harder to clean! Why? Why do <em>bad</em> things happen to good people?</p> <p><strong>Rachel</strong>: Wow! Well, clearly this is not a good time.</p> <p><strong>Ross</strong>: Duh, <strong>you think</strong>? (enters the kitchen)</p> <p>[Scene: Mike's place. Phoebe is on the phone.]</p> <p><strong>Phoebe</strong>: Okay, bye. Alright, so Mike's on his way over. See, you thought you guys were meeting here, and he thought you were meeting at the restaurant, so you know... Doesn't really matter who's right or wrong. Point is... I'm gonna take off.</p> <p><strong>Precious</strong>: I'm not letting you leave until you tell me what's going on here. I mean, are you guys getting back together or something?</p> <p><strong>Phoebe</strong>: Alright... Susie, can I call you Susie?</p> <p><strong>Precious</strong>: My name is Precious.</p> <p><strong>Phoebe</strong>: Yeah, I can't say that. uhm... Susie, I'm gonna be straight with you... Mike and I <em>are</em> back together... and uhm... unfortunately that effectively ends your relationship with him. And he's very sorry about that and wishes you the best of luck in all your endeavours.</p> <p><strong>Precious</strong>: I just can't believe this... Why?</p> <p><strong>Phoebe</strong>: Well, I don't...</p> <p><strong>Precious</strong>: Oh, why would he do this? I mean, what's wrong with me?</p> <p><strong>Phoebe</strong>: Nothing, there's nothing wrong with you.</p> <p><strong>Precious</strong>: I mean, what the hell am I supposed to do now?</p> <p><strong>Phoebe: Damn it woman, pull yourself together! </strong>Have some pride,<strong> for the <em>love</em> of God.</strong></p> <p>(Precious starts crying)</p> <p><strong>Phoebe</strong>: Okay, not a fan of the tough love.</p> <p><strong>Precious</strong>: I just can't believe that Mike didn't give me any warning.</p> <p><strong>Phoebe</strong>: But he didn't really know, you know. He wasn't planning on coming to Barbados and proposing to me...</p> <p><strong>Precious</strong>: He proposed to you? This is the worst birthday <em>ever</em>. (she starts to cry again)</p> <p><strong>Phoebe</strong>: Look, <em>Precious...</em> Mike's not worth this. You're an attractive, intelligent woman and let's face it, Mike's kind of a wang. I mean, he proposed to me while he was still seeing you... He was gonna break-up with you on your <em>birthday</em>? And, I don't like to kiss-and-tell, but he cheated on you <em>a lot</em> this weekend.</p> <p><strong>Precious</strong>: Oh, my God, maybe you're right. Maybe I don't need him. I deserve to be treated with respect.</p> <p>(Mike enters the apartment.)</p> <p><strong>Precious</strong>: Screw you, Mike. You're a coward and a bastard, and I hope you rot in hell. </p> <p>(she slaps him in the face, Mike looks like he doesn't believe what just happened. Precious leaves, and he turns to Phoebe.)</p> <p><strong>Phoebe</strong>: You're welcome!</p> <p>[Scene: Chandler and Monica's. Only Chandler is in the living room and walks to the bathroom.]</p> <p><strong>Chandler</strong>: Honey, you've been in there for a long time... Is everything okay?</p> <p><strong>Monica</strong>: Not really. </p> <p>(Chandler enters the bathroom, and Monica is standing there in a towel, with her hair stuck in the shower curtain.)</p> <p><strong>Monica</strong>: I have a problem.</p> <p><strong>Chandler</strong>: Really? What happened?</p> <p><strong>Monica</strong>: Well, I was dancing around, and singing &quot;No Woman, No Cry&quot; and I got stuck.</p> <p><strong>Chandler</strong>: You can't move at all?</p> <p><strong>Monica</strong>: Oh, well, I can move... (she moves back and forth the shower curtain rail, opening and closing the shower curtain with her hair as she goes)</p> <p><strong>Chandler</strong>: If I untangle you, will you please get rid of the corn rose?</p> <p><strong>Monica</strong>: (looking disappointed) I guess so...</p> <p><strong>Chandler</strong>: (trying to untangle her) Some of these look a little frayed.</p> <p><strong>Monica</strong>: Yeah, I tried to gnaw myself free.</p> <p>[Scene: Rachel and Joey's apartment. Joey enters.]</p> <p><strong>Joey</strong>: Hey!</p> <p><strong>Rachel</strong>: Hi!</p> <p><strong>Joey</strong>: So, did you err... did you tell Ross?</p> <p><strong>Rachel</strong>: Well, I tried, but then he had a shampoo related emergency. So I guess now it's your turn again.</p> <p><strong>Joey</strong>: No, no, no, no, no, no, no, no... I think it's better if you tell him, you know. It's easier for a woman. That way, you know, if he gets mad, all you have to do is go... <em>I didn't mean it. I'm so so--ooory.</em> (he pushes his breasts together from the side)</p> <p><strong>Rachel</strong>: Yeah, 'cause <em>that's</em> what we do.</p> <p><strong>Joey</strong>: Alright, alright, okay, uhm... How 'bout this, how about this? Tomorrow... tomorrow we'll both go and we'll tell him together.</p> <p><strong>Rachel</strong>: Okay, that sounds fair. It just means that once again we can't...</p> <p><strong>Joey</strong>: I know, I know..., but that's okay. I mean, we can control ourselves, we're not animals.</p> <p><strong>Rachel</strong>: No! Of course we can wait. Alright, so I guess that means good night then?</p> <p><strong>Joey</strong>: Yeah! Good night! (they give each other a small kiss on the mouth, and stare at each other for a while)</p> <p><strong>Rachel</strong>: Goo--ood night!</p> <p><strong>Joey</strong>: Good night! (they give each other a kiss again, but this time it lasts longer)</p> <p><strong>Rachel</strong>: Seriously, good night!</p> <p><strong>Joey</strong>: Stop saying good night.</p> <p><strong>Rachel</strong>: Okay.</p> <p>(Now they kiss passionately... and then Ross enters with Emma. They freeze, pull away and look at Ross who looks like he just can't believe what he's seeing. Joey straightens his shirt, and Rachel says <em>I'm so-oo sorry<strong>, </strong></em>and presses her breasts together, just like Joey did before.)</p> <p align="center"><strong>COMMERCIAL BREAK</strong></p> <p>[Scene: Monica and Chandler's. Monica walks in with one of those knitted Rasta hats.]</p> <p><strong>Monica</strong>: Look what I found in the drawer... (Chandler looks up from his book.) And you said I'd never wear this...</p> <p><strong>Chandler</strong>: Now that I untangled you, how 'bout you doing a little something for me?</p> <p><strong>Monica</strong>: Sure, what do you have in mind?</p> <p><strong>Chandler</strong>: I think you know.</p> <p><strong>Monica</strong>: Really? I don't really feel like it.</p> <p><strong>Chandler</strong>: This is what I want to do.</p> <p><strong>Monica</strong>: Okay, I just don't get why you like it so much.</p> <p><strong>Chandler</strong>: (Picks up the &quot;Miss Congeniality&quot; DVD) She's an FBI agent, <em>posing</em> as a beauty contestant.</p> <p align="center"><strong>THE END</strong></p> </body> </html>
edersoncorbari/edersoncorbari.github.io
friends-scripts/season/1001.html
HTML
mit
36,730
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 2516, 1028, 2531, 2487, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * QEMU aio implementation * * Copyright IBM, Corp. 2008 * * Authors: * Anthony Liguori <aliguori@us.ibm.com> * * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. * * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. */ #include "qemu-common.h" #include "block/block.h" #include "qemu/queue.h" #include "qemu/sockets.h" struct AioHandler { GPollFD pfd; IOHandler *io_read; IOHandler *io_write; AioFlushHandler *io_flush; int deleted; int pollfds_idx; void *opaque; QLIST_ENTRY(AioHandler) node; }; static AioHandler *find_aio_handler(AioContext *ctx, int fd) { AioHandler *node; QLIST_FOREACH(node, &ctx->aio_handlers, node) { if (node->pfd.fd == fd) if (!node->deleted) return node; } return NULL; } void aio_set_fd_handler(AioContext *ctx, int fd, IOHandler *io_read, IOHandler *io_write, AioFlushHandler *io_flush, void *opaque) { AioHandler *node; node = find_aio_handler(ctx, fd); /* Are we deleting the fd handler? */ if (!io_read && !io_write) { if (node) { g_source_remove_poll(&ctx->source, &node->pfd); /* If the lock is held, just mark the node as deleted */ if (ctx->walking_handlers) { node->deleted = 1; node->pfd.revents = 0; } else { /* Otherwise, delete it for real. We can't just mark it as * deleted because deleted nodes are only cleaned up after * releasing the walking_handlers lock. */ QLIST_REMOVE(node, node); g_free(node); } } } else { if (node == NULL) { /* Alloc and insert if it's not already there */ node = g_malloc0(sizeof(AioHandler)); node->pfd.fd = fd; QLIST_INSERT_HEAD(&ctx->aio_handlers, node, node); g_source_add_poll(&ctx->source, &node->pfd); } /* Update handler with latest information */ node->io_read = io_read; node->io_write = io_write; node->io_flush = io_flush; node->opaque = opaque; node->pollfds_idx = -1; node->pfd.events = (io_read ? G_IO_IN | G_IO_HUP | G_IO_ERR : 0); node->pfd.events |= (io_write ? G_IO_OUT | G_IO_ERR : 0); } aio_notify(ctx); } void aio_set_event_notifier(AioContext *ctx, EventNotifier *notifier, EventNotifierHandler *io_read, AioFlushEventNotifierHandler *io_flush) { aio_set_fd_handler(ctx, event_notifier_get_fd(notifier), (IOHandler *)io_read, NULL, (AioFlushHandler *)io_flush, notifier); } bool aio_pending(AioContext *ctx) { AioHandler *node; QLIST_FOREACH(node, &ctx->aio_handlers, node) { int revents; revents = node->pfd.revents & node->pfd.events; if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR) && node->io_read) { return true; } if (revents & (G_IO_OUT | G_IO_ERR) && node->io_write) { return true; } } return false; } static bool aio_dispatch(AioContext *ctx) { AioHandler *node; bool progress = false; /* * We have to walk very carefully in case qemu_aio_set_fd_handler is * called while we're walking. */ node = QLIST_FIRST(&ctx->aio_handlers); while (node) { AioHandler *tmp; int revents; ctx->walking_handlers++; revents = node->pfd.revents & node->pfd.events; node->pfd.revents = 0; if (!node->deleted && (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR)) && node->io_read) { node->io_read(node->opaque); progress = true; } if (!node->deleted && (revents & (G_IO_OUT | G_IO_ERR)) && node->io_write) { node->io_write(node->opaque); progress = true; } tmp = node; node = QLIST_NEXT(node, node); ctx->walking_handlers--; if (!ctx->walking_handlers && tmp->deleted) { QLIST_REMOVE(tmp, node); g_free(tmp); } } return progress; } bool aio_poll(AioContext *ctx, bool blocking) { AioHandler *node; int ret; bool busy, progress; progress = false; /* * If there are callbacks left that have been queued, we need to call them. * Do not call select in this case, because it is possible that the caller * does not need a complete flush (as is the case for qemu_aio_wait loops). */ if (aio_bh_poll(ctx)) { blocking = false; progress = true; } if (aio_dispatch(ctx)) { progress = true; } if (progress && !blocking) { return true; } ctx->walking_handlers++; g_array_set_size(ctx->pollfds, 0); /* fill pollfds */ busy = false; QLIST_FOREACH(node, &ctx->aio_handlers, node) { node->pollfds_idx = -1; /* If there aren't pending AIO operations, don't invoke callbacks. * Otherwise, if there are no AIO requests, qemu_aio_wait() would * wait indefinitely. */ if (!node->deleted && node->io_flush) { if (node->io_flush(node->opaque) == 0) { continue; } busy = true; } if (!node->deleted && node->pfd.events) { GPollFD pfd = { .fd = node->pfd.fd, .events = node->pfd.events, }; node->pollfds_idx = ctx->pollfds->len; g_array_append_val(ctx->pollfds, pfd); } } ctx->walking_handlers--; /* No AIO operations? Get us out of here */ if (!busy) { return progress; } /* wait until next event */ ret = g_poll((GPollFD *)ctx->pollfds->data, ctx->pollfds->len, blocking ? -1 : 0); /* if we have any readable fds, dispatch event */ if (ret > 0) { QLIST_FOREACH(node, &ctx->aio_handlers, node) { if (node->pollfds_idx != -1) { GPollFD *pfd = &g_array_index(ctx->pollfds, GPollFD, node->pollfds_idx); node->pfd.revents = pfd->revents; } } if (aio_dispatch(ctx)) { progress = true; } } assert(progress || busy); return true; }
emonty/vhd-util
tools/qemu-xen/aio-posix.c
C
gpl-2.0
6,817
[ 30522, 1013, 1008, 1008, 1053, 6633, 2226, 9932, 2080, 7375, 1008, 1008, 9385, 9980, 1010, 13058, 1012, 2263, 1008, 1008, 6048, 1024, 1008, 4938, 5622, 12193, 10050, 1026, 4862, 12193, 10050, 1030, 2149, 1012, 9980, 1012, 4012, 1028, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...