code stringlengths 10 1.34M | language stringclasses 1
value |
|---|---|
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimesp... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
const ARCH = "arm"
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Linux system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates system ... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Netlink sockets and messages
package syscall
import (
"unsafe"
)
// Round the length of a netlink message up to align it properly.
func nlmAlignOf(msgle... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimesp... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
//sys Chown(path string, uid int, gid int) (errno int)
//sys Fchown(fd int, uid int, gid int) (errno int)
//sys Fstat(fd int, stat *Stat_t) (er... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
const ARCH = "amd64"
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
var (
Stdin = 0
Stdout = 1
Stderr = 2
)
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
func Syscall6(trap, a1, a2, a3, a4, a... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// BSD system call wrappers shared by *BSD based systems
// including OS X (Darwin) and FreeBSD. Like the other
// syscall_*.go files it is compiled as Go code... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package syscall contains an interface to the low-level operating system
// primitives. The details vary depending on the underlying system.
// Its primary u... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Fork, exec, wait, etc.
package syscall
import (
"sync"
"unsafe"
)
// Lock synchronizing creation of new file descriptors with fork.
//
// We want the ch... | Go |
// hand generated
package syscall
const (
SYS_SYSCALL_BASE = 0
SYS_RESTART_SYSCALL = (SYS_SYSCALL_BASE + 0)
SYS_EXIT = (SYS_SYSCALL_BASE + 1)
SYS_FORK = (SYS_SYSCALL_BASE + 2)
SYS_READ = (SYS_SYSCALL_BASE + 3)
SYS_WRITE = (SYS_SYSCAL... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Plan 9 system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates system... | Go |
// Copyright 2009,2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// FreeBSD system calls.
// This file is compiled as ordinary Go code,
// but it is also input to mksyscall,
// which parses the //sys lines and generates ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Fork, exec, wait, etc.
package syscall
import (
"sync"
"unsafe"
"utf16"
)
var ForkLock sync.RWMutex
// EscapeArg rewrites command line argument s as p... | Go |
package syscall
// TODO(brainman): autogenerate types in ztypes_windows_386.go
//import "unsafe"
// Constants
const (
sizeofPtr = 0x4
sizeofShort = 0x2
sizeofInt = 0x4
sizeofLong = 0x4
sizeofLongLong = 0x8
PathMax = 0x1000
SizeofLinger = 0x8
SizeofMsghdr = 0x1c
SizeofCmsghdr = 0... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func itoa(val int) string { // do it here rather than with fmt to avoid dependency
if val < 0 {
return "-" + itoa(-val)
}
var buf [32]byte... | Go |
package syscall
// Constants
const (
// Invented values to support what package os expects.
O_CREAT = 0x02000
O_NOCTTY = 0x00000
O_TRUNC = 0x00000
O_NONBLOCK = 0x00000
O_APPEND = 0x00000
O_SYNC = 0x00000
O_ASYNC = 0x00000
S_IFMT = 0x1f000
S_IFIFO = 0x1000
S_IFCHR = 0x2000
S_IFDIR = ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
import "unsafe"
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func Getpagesize() int { return 4096 }
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
import "unsafe"
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
... | Go |
// nothing to see here
package syscall
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
func Getpagesize() int { return 4096 }
func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
func NsecToTimesp... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Routing sockets and messages
package syscall
import (
"unsafe"
)
const darwinAMD64 = OS == "darwin" && ARCH == "amd64"
// Round the length of a raw soc... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package syscall
const ARCH = "386"
| Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Windows system calls.
package syscall
import (
"unsafe"
"utf16"
)
const OS = "windows"
/*
small demo to detect version of windows you are running:
p... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The os package provides a platform-independent interface to operating
// system functionality. The design is Unix-like.
package os
import (
"syscall"
)
f... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// Process stores the information about a process created by StartProcess.
type Process struct {
Pid int
hand... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// StartProcess starts a new process with the program, arguments and attributes
// specified by name, argv and att... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
// Time returns the current time, in whole seconds and
// fractional nanoseconds, plus an Error if any. The current
// time is th... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
// MkdirAll creates a directory named path,
// along with any necessary parents, and returns nil,
// or else returns an error.
// The permission bi... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package inotify implements a wrapper for the Linux inotify system.
Example:
watcher, err := inotify.NewWatcher()
if err != nil {
log.Fatal(e... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Process etc.
package os
import "syscall"
var Args []string // provided by runtime
var Envs []string // provided by runtime
// Getuid returns the numeric... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func fileInfoFromStat(fi *FileInfo, d *Dir) *FileInfo {
fi.Dev = uint64(d.Qid.Vers) | uint64(d.Qid.Type<<32)
fi.Ino = d.Qid.Path... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func isSymlink(stat *syscall.Stat_t) bool {
return stat.Mode&syscall.S_IFMT == syscall.S_IFLNK
}
func fileInfoFromStat(name stri... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// Auxiliary information if the File describes a directory
type dirInfo struct {
buf [syscall.STATMAX]byte // bu... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Linux-specific
package os
// Hostname returns the host name reported by the kernel.
func Hostname() (name string, err Error) {
f, err := Open("/proc/sys/... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package user
import (
"fmt"
"os"
"runtime"
"strings"
"unsafe"
)
/*
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <stdlib.h>
stati... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package user
import (
"fmt"
"os"
"runtime"
)
func Lookup(username string) (*User, os.Error) {
return nil, fmt.Errorf("user: Lookup not implemented on %s/%... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package user allows user account lookups by name or id.
package user
import (
"strconv"
)
// User represents a user account.
type User struct {
Uid ... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
func (file *File) Readdirnames(n int) (names []string, err Error) {
fis, err := file.Readdir(n)
names = make([]string, len(fis))
for i, fi := ran... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
// An operating-system independent representation of Unix data structures.
// OS-specific routines in this directory convert the O... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func fileInfoFromStat(name string, fi *FileInfo, lstat, stat *syscall.Stat_t) *FileInfo {
return fileInfoFromWin32finddata(fi, &s... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func isSymlink(stat *syscall.Stat_t) bool {
return stat.Mode&syscall.S_IFMT == syscall.S_IFLNK
}
func fileInfoFromStat(name stri... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Plan 9-specific
package os
func Hostname() (name string, err Error) {
f, err := Open("#c/sysname")
if err != nil {
return "", err
}
defer f.Close()
... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Plan 9 environment variables.
package os
import "syscall"
// ENOENV is the Error indicating that an environment variable does not exist.
var ENOENV = New... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// Auxiliary information if the File describes a directory
type dirInfo struct {
buf []byte // buffer for direct... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// Options for Wait.
const (
WNOHANG = syscall.WNOHANG // Don't wait if no process has exited.
WSTOPPED = s... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// A Signal can represent any operating system signal.
type Signal interface {
String() string
}
type UnixSignal... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// General environment variables.
package os
func setenv_c(k, v string)
// Expand replaces ${var} or $var in the string based on the mapping function.
// In... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
// An Error can represent any printable error condition.
type Error interface {
String() string
}
// A helper type that can be embedded or wrapped... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package signal implements operating system-independent signal handling.
package signal
import (
"os"
"runtime"
)
// Incoming is the global signal channel... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
func (p *Process) Wait(options int) (w *Waitmsg, err Error) {
s, e := syscall.WaitForSingleObject(int32(p.handle)... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"syscall"
)
// Readdir reads the contents of the directory associated with file and
// returns an array of up to n FileInfo structures, a... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package os provides a platform-independent interface to operating system
// functionality. The design is Unix-like.
package os
import (
"runtime"
"sync"
... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Windows environment variables.
package os
import (
"syscall"
"utf16"
"unsafe"
)
// ENOENV is the Error indicating that an environment variable does no... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
const (
PathSeparator = '/' // OS-specific path separator
PathListSeparator = ':' // OS-specific path list separator
)
// IsPathSeparator ret... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import syscall "syscall"
// Errno is the Unix error number. Names such as EINVAL are simple
// wrappers to convert the error number into an Error.... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import syscall "syscall"
// SyscallError records an error from a specific system call.
type SyscallError struct {
Syscall string
Err string
}... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"syscall"
)
const (
blockSize = 4096
)
// Readdirnames reads and returns a slice of names from the directory f.
//
// If n > 0, Readdir... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// os code shared between *BSD systems including OS X (Darwin)
// and FreeBSD.
package os
import "syscall"
func Hostname() (name string, err Error) {
var er... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func isSymlink(stat *syscall.Stat_t) bool {
return stat.Mode&syscall.S_IFMT == syscall.S_IFLNK
}
func fileInfoFromStat(name stri... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"syscall"
)
// Getwd returns a rooted path name corresponding to the
// current directory. If the current directory can be
// reached vi... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Unix environment variables.
package os
import (
"sync"
)
// ENOENV is the Error indicating that an environment variable does not exist.
var ENOENV = New... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
const (
PathSeparator = '/' // OS-specific path separator
PathListSeparator = 0 // OS-specific path list separator
)
// IsPathSeparator ret... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import "syscall"
func Hostname() (name string, err Error) {
s, e := syscall.ComputerName()
if e != 0 {
return "", NewSyscallError("ComputerNam... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
const (
PathSeparator = '\\' // OS-specific path separator
PathListSeparator = ':' // OS-specific path list separator
)
// IsPathSeparator r... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
import (
"runtime"
"syscall"
)
// Auxiliary information if the File describes a directory
type dirInfo struct {
stat syscall.Stat_t
use... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ycbcr provides images from the Y'CbCr color model.
//
// JPEG, VP8, the MPEG family and other codecs use this color model. Such
// codecs often use t... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package image
// All Colors can convert themselves, with a possible loss of precision,
// to 64-bit alpha-premultiplied RGBA. Each channel value ranges within
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package png
import (
"bufio"
"compress/zlib"
"hash/crc32"
"image"
"io"
"os"
"strconv"
)
type encoder struct {
w io.Writer
m image.Image
cb... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package png implements a PNG image decoder and encoder.
//
// The PNG specification is at http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html
package pn... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package draw provides image composition functions
// in the style of the Plan 9 graphics library
// (see http://plan9.bell-labs.com/magic/man2html/2/draw)
/... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package image
import (
"bufio"
"io"
"os"
)
// An UnknownFormatErr indicates that decoding encountered an unknown format.
var UnknownFormatErr = os.NewError... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package image
import (
"strconv"
)
// A Point is an X, Y coordinate pair. The axes increase right and down.
type Point struct {
X, Y int
}
// String return... | Go |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package image
var (
// Black is an opaque black ColorImage.
Black = NewColorImage(Gray16Color{0})
// White is an opaque white ColorImage.
White = NewColorI... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package gif implements a GIF image decoder.
//
// The GIF specification is at http://www.w3.org/Graphics/GIF/spec-gif89a.txt.
package gif
import (
"bufio"
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package image implements a basic 2-D image library.
package image
// A Config consists of an image's color model and dimensions.
type Config struct {
Color... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package bmp implements a BMP image decoder.
//
// The BMP specification is at http://www.digicamsoft.com/bmp/bmp.html.
package bmp
import (
"image"
"io"
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package jpeg
import (
"io"
"os"
)
// Each code is at most 16 bits long.
const maxCodeLength = 16
// Each decoded value is a uint8, so there are at most 256... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package jpeg
import (
"bufio"
"image"
"image/ycbcr"
"io"
"os"
)
// min returns the minimum of two integers.
func min(x, y int) int {
if x < y {
return... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package jpeg implements a JPEG image decoder and encoder.
//
// JPEG is defined in ITU-T T.81: http://www.w3.org/Graphics/JPEG/itu-t81.pdf.
package jpeg
imp... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package jpeg
// This file implements a Forward Discrete Cosine Transformation.
/*
It is based on the code in jfdctint.c from the Independent JPEG Group,
found... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package jpeg
// This is a Go translation of idct.c from
//
// http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_13818-4_2004_Conformance_Testing... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package tiff implements a TIFF image decoder.
//
// The TIFF specification is at http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
package tiff
i... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tiff
import (
"io"
"os"
)
// buffer buffers an io.Reader to satisfy io.ReaderAt.
type buffer struct {
r io.Reader
buf []byte
}
func (b *buffer)... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package tiff
// A tiff image file contains one or more images. The metadata
// of each image is contained in an Image File Directory (IFD),
// which contains e... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Package shed defines colors for bike sheds.
See http://red.bikeshed.org/ for more details.
TODO: More colors, colour support, stripes, methods, ponies.
*/
... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ebnf
import (
"go/scanner"
"go/token"
"os"
"strconv"
)
type parser struct {
fset *token.FileSet
scanner.ErrorVector
scanner scanner.Scanner
p... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ebnf is a library for EBNF grammars. The input is text ([]byte)
// satisfying the following grammar (represented itself in EBNF):
//
// Production =... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// HTTP Response reading and parsing.
package http
import (
"bufio"
"io"
"net/textproto"
"os"
"strconv"
"strings"
)
var respExcludeHeader = map[string]... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Parse URLs (actually URIs, but that seems overly pedantic).
// RFC 3986
package http
import (
"os"
"strconv"
"strings"
)
// URLError reports an error a... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"expvar"
"flag"
"fmt"
"http"
"io"
"log"
"os"
"strconv"
)
// hello world, the web server
var helloRequests = expvar.New... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http
import (
"bufio"
"compress/gzip"
"crypto/tls"
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
"strings"
"sync"
)
// Default... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Primitive HTTP client. See RFC 2616.
package http
import (
"encoding/base64"
"fmt"
"io"
"os"
"strings"
)
// A Client is an HTTP client. Its zero valu... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http
import (
"bytes"
"fmt"
"io"
"os"
"sort"
"strconv"
"strings"
"time"
)
// This implementation is done according to RFC 6265:
//
// http:... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// HTTP file system request handler
package http
import (
"fmt"
"io"
"mime"
"os"
"path/filepath"
"strconv"
"strings"
"time"
"utf8"
)
// Heuristic: b... | Go |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http
import (
"bufio"
"io"
"net"
"net/textproto"
"os"
"sync"
)
var (
ErrPersistEOF = &ProtocolError{"persistent connection closed"}
ErrPipelin... | Go |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package httptest provides utilities for HTTP testing.
package httptest
import (
"bytes"
"http"
"os"
)
// ResponseRecorder is an implementation of http.R... | Go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.