Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,800 for FClose (0.19 sec)

  1. src/cmd/cgo/internal/swig/testdata/stdio/main.go

    	f := Fopen("main.go", "r")
    	if f.Swigcptr() == 0 {
    		fatal("fopen failed")
    	}
    	if Fgetc(f) != '/' || Fgetc(f) != '/' || Fgetc(f) != ' ' || Fgetc(f) != 'C' {
    		fatal("read unexpected characters")
    	}
    	if Fclose(f) != 0 {
    		fatal("fclose failed")
    	}
    
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:07 UTC 2023
    - 975 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/swig/testdata/stdio/main.swig

    %typemap(in) const char * %{
    	$1 = malloc($input.n + 1);
    	memcpy($1, $input.p, $input.n);
    	$1[$input.n] = '\0';
    %}
    %typemap(freearg) const char * %{
    	free($1);
    %}
    
    FILE *fopen(const char *name, const char *mode);
    int fclose(FILE *);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:07 UTC 2023
    - 563 bytes
    - Viewed (0)
  3. tensorflow/c/experimental/filesystem/plugins/posix/posix_filesystem.cc

      // TODO(b/144055243): This should use `fsync`/`sync`.
      Flush(file, status);
    }
    
    static void Close(const TF_WritableFile* file, TF_Status* status) {
      auto posix_file = static_cast<PosixFile*>(file->plugin_file);
    
      if (fclose(posix_file->handle) != 0)
        TF_SetStatusFromIOError(status, errno, posix_file->filename);
      else
        TF_SetStatus(status, TF_OK, "");
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Mar 24 20:08:23 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  4. testing/performance/src/templates/native-dependents-resources/googleTest/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h

    #endif
    inline int FClose(FILE* fp) { return fclose(fp); }
    #if !GTEST_OS_WINDOWS_MOBILE
    inline int Read(int fd, void* buf, unsigned int count) {
      return static_cast<int>(read(fd, buf, count));
    }
    inline int Write(int fd, const void* buf, unsigned int count) {
      return static_cast<int>(write(fd, buf, count));
    }
    inline int Close(int fd) { return close(fd); }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 67.2K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/snippets/native-binaries/google-test/groovy/libs/googleTest/1.7.0/include/gtest/internal/gtest-port.h

    #endif
    inline int FClose(FILE* fp) { return fclose(fp); }
    #if !GTEST_OS_WINDOWS_MOBILE
    inline int Read(int fd, void* buf, unsigned int count) {
      return static_cast<int>(read(fd, buf, count));
    }
    inline int Write(int fd, const void* buf, unsigned int count) {
      return static_cast<int>(write(fd, buf, count));
    }
    inline int Close(int fd) { return close(fd); }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 67.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/test.go

    }
    
    func testErrno(t *testing.T) {
    	p := C.CString("no-such-file")
    	m := C.CString("r")
    	f, err := C.fopen(p, m)
    	C.free(unsafe.Pointer(p))
    	C.free(unsafe.Pointer(m))
    	if err == nil {
    		C.fclose(f)
    		t.Fatalf("C.fopen: should fail")
    	}
    	if err != syscall.ENOENT {
    		t.Fatalf("C.fopen: unexpected error: %v", err)
    	}
    }
    
    func testMultipleAssign(t *testing.T) {
    	p := C.CString("234")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
  7. internal/http/close.go

    	"io"
    
    	xioutil "github.com/minio/minio/internal/ioutil"
    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  8. testing/integ-test/src/integTest/groovy/org/gradle/integtests/StdioIntegrationTest.groovy

                    super.connect(snk)
                    write(TextUtil.toPlatformLineSeparators("abc\n123\nclose\nmore-stuff").bytes)
                }
            })
            run "echo"
    
            then:
            output.contains("[abc][123]")
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 30 05:02:18 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  9. src/net/nss.go

    			if len(srcs) > 0 && srcs[0] == '[' {
    				bclose := bytealg.IndexByteString(srcs, ']')
    				if bclose == -1 {
    					conf.err = errors.New("unclosed criterion bracket")
    					return conf
    				}
    				var err error
    				criteria, err = parseCriteria(srcs[1:bclose])
    				if err != nil {
    					conf.err = errors.New("invalid criteria: " + srcs[1:bclose])
    					return conf
    				}
    				srcs = srcs[bclose+1:]
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:15:51 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  10. pkg/kubelet/logs/container_log_manager.go

    	sort.Strings(inuse)
    	return append(inuse, log), nil
    }
    
    // compressReadCloser wraps gzip.Reader with a function to close file handler.
    type compressReadCloser struct {
    	f *os.File
    	*gzip.Reader
    }
    
    func (rc *compressReadCloser) Close() error {
    	ferr := rc.f.Close()
    	rerr := rc.Reader.Close()
    	if ferr != nil {
    		return ferr
    	}
    	if rerr != nil {
    		return rerr
    	}
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top