资源简介

The Go Programming Language Alan A. A. Donovan Google Inc. Brian W. Kernighan Princeton University

资源截图

代码片段和文件信息

// Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan.
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/

// See page 362.
//
// The version of this program that appeared in the first and second
// printings did not comply with the proposed rules for passing
// pointers between Go and C described here:
// https://github.com/golang/proposal/blob/master/design/12416-cgo-pointers.md
//
// The version below which appears in the third printing
// has been corrected.  See bzip2.go for explanation.

//!+
/* This file is gopl.io/ch13/bzip/bzip2.c         */
/* a simple wrapper for libbzip2 suitable for cgo. */
#include 

int bz2compress(bz_stream *s int action
                char *in unsigned *inlen char *out unsigned *outlen) {
  s->next_in = in;
  s->avail_in = *inlen;
  s->next_out = out;
  s->avail_out = *outlen;
  int r = BZ2_bzCompress(s action);
  *inlen -= s->avail_in;
  *outlen -= s->avail_out;
  s->next_in = s->next_out = NULL;
  return r;
}

//!-

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        587  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\dup1\main.go

     文件        931  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\dup2\main.go

     文件        695  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\dup3\main.go

     文件        363  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\echo1\main.go

     文件        353  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\echo2\main.go

     文件        308  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\echo3\main.go

     文件        619  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\fetch\main.go

     文件       1021  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\fetchall\main.go

     文件        266  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\helloworld\main.go

     文件       2081  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\lissajous\main.go

     文件        541  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\server1\main.go

     文件        798  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\server2\main.go

     文件        836  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch1\server3\main.go

     文件        333  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch10\cross\main.go

     文件       1016  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch10\jpeg\main.go

     文件        716  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\echo\echo.go

     文件       1023  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\echo\echo_test.go

     文件       1110  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\storage1\storage.go

     文件       1232  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\storage2\quota_test.go

     文件       1195  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\storage2\storage.go

     文件        437  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\word1\word.go

     文件        893  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\word1\word_test.go

     文件        628  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\word2\word.go

     文件       3254  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch11\word2\word_test.go

     文件       2366  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\display\display.go

     文件       5900  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\display\display_test.go

     文件       1278  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\format\format.go

     文件        641  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\format\format_test.go

     文件        621  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\methods\methods.go

     文件       1238  2016-12-06 14:57  The Go Programming Language\gopl.io-master\ch12\methods\methods_test.go

............此处省略284个文件信息

评论

共有 条评论