Skip to content

Commit

Permalink
Rename the project
Browse files Browse the repository at this point in the history
  • Loading branch information
dennwc committed Jan 10, 2021
1 parent b5eae93 commit 0ad920b
Show file tree
Hide file tree
Showing 79 changed files with 134 additions and 134 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Although it can successfully transpile multiple projects, it might _change the b
## Installation

```bash
go get -u github.com/dennwc/cxgo/cmd/cxgo
go get -u github.com/gotranspile/cxgo/cmd/cxgo
```

## How to use
Expand Down
2 changes: 1 addition & 1 deletion bools.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"go/token"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

// BoolExpr is a expression that returns a bool value.
Expand Down
2 changes: 1 addition & 1 deletion c_decl.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/ast"
"go/token"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

type Range struct {
Expand Down
2 changes: 1 addition & 1 deletion c_decl_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cxgo

import (
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion c_expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"go/token"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

type Expr interface {
Expand Down
2 changes: 1 addition & 1 deletion c_stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"go/ast"
"go/token"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

const optimizeStatements = false
Expand Down
2 changes: 1 addition & 1 deletion c_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"unicode"
"unicode/utf8"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
"modernc.org/cc/v3"
"modernc.org/token"
)
Expand Down
2 changes: 1 addition & 1 deletion casts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"math"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

func (g *translator) cCast(typ types.Type, x Expr) Expr {
Expand Down
6 changes: 3 additions & 3 deletions cmd/cxgo/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/spf13/cobra"

"github.com/dennwc/cxgo"
"github.com/dennwc/cxgo/libs"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo"
"github.com/gotranspile/cxgo/libs"
"github.com/gotranspile/cxgo/types"
)

func init() {
Expand Down
8 changes: 4 additions & 4 deletions cmd/cxgo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/spf13/cobra"
"gopkg.in/yaml.v3"

"github.com/dennwc/cxgo"
"github.com/dennwc/cxgo/internal/git"
"github.com/dennwc/cxgo/libs"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo"
"github.com/gotranspile/cxgo/internal/git"
"github.com/gotranspile/cxgo/libs"
"github.com/gotranspile/cxgo/types"
)

var Root = &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"path/filepath"
"testing"

"github.com/dennwc/cxgo/libs"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/libs"
"github.com/gotranspile/cxgo/types"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -100,9 +100,9 @@ func goProject(t testing.TB, out, cxgo string) {
gomod := fmt.Sprintf(`module main
go 1.13
require (
github.com/dennwc/cxgo v0.0.0
github.com/gotranspile/cxgo v0.0.0
)
replace github.com/dennwc/cxgo => %s`, cxgo)
replace github.com/gotranspile/cxgo => %s`, cxgo)

err = ioutil.WriteFile(filepath.Join(out, "go.mod"), []byte(gomod), 0644)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
"modernc.org/cc/v3"
"modernc.org/token"
)
Expand Down
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It should generate a file `main.go` with content similar to this:
```go
package main

import "github.com/dennwc/cxgo/runtime/stdio"
import "github.com/gotranspile/cxgo/runtime/stdio"

func main() {
stdio.Printf("Hello world!\n")
Expand All @@ -38,7 +38,7 @@ func main() {

This single-file mode is useful when testing `cxgo` behavior in comparison with `gcc` and other compilers.

Note that the file imports `github.com/dennwc/cxgo/runtime` - this is the C standard library that `cxgo` uses.
Note that the file imports `github.com/gotranspile/cxgo/runtime` - this is the C standard library that `cxgo` uses.
Although we try to use Go stdlib as much as possible, in some cases it's still necessary to use wrappers to preserve
different C semantics.

Expand Down Expand Up @@ -131,7 +131,7 @@ This mode is useful when generating types, constants and functions from a self-c
The downside is that it gives no control regarding variable/function names, Go types used, etc.
For more control, see [this example](#using-a-config-file).

Note that the Go code has no references to `github.com/dennwc/cxgo/runtime` this time, although the original C code
Note that the Go code has no references to `github.com/gotranspile/cxgo/runtime` this time, although the original C code
did use the `stdlib.h`. cxgo recognizes some common patterns like struct and array allocation and automatically replaces
them with Go equivalents.

Expand Down
14 changes: 7 additions & 7 deletions examples/potrace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ files:
"math"
"testing"
"github.com/dennwc/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/runtime/libc"
)
func TestPotrace(t *testing.T) {
Expand Down Expand Up @@ -538,8 +538,8 @@ import (
"os"
"testing"
"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/runtime/stdio"
)
func TestPotrace(t *testing.T) {
Expand Down Expand Up @@ -747,8 +747,8 @@ import (
"os"
"testing"
"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/runtime/stdio"
)
func TestPotrace(t *testing.T) {
Expand Down Expand Up @@ -1124,8 +1124,8 @@ files:
"os"
"testing"
"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/runtime/stdio"
)
func TestPotrace(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion examples/potrace/cxgo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ files:
"os"
"testing"
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/runtime/stdio"
)
func checkErr(t testing.TB, err error) {
Expand Down
4 changes: 2 additions & 2 deletions flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"
"testing"

"github.com/dennwc/cxgo/libs"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/libs"
"github.com/gotranspile/cxgo/types"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"go/ast"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

func ToFuncExpr(exp types.Type) *types.FuncType {
Expand Down
2 changes: 1 addition & 1 deletion gcc.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cxgo

import "github.com/dennwc/cxgo/libs"
import "github.com/gotranspile/cxgo/libs"

const gccPredefine = `
#include <` + libs.BuiltinH + `>
Expand Down
10 changes: 5 additions & 5 deletions gcc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"strings"
"testing"

"github.com/dennwc/cxgo/internal/git"
"github.com/dennwc/cxgo/libs"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/internal/git"
"github.com/gotranspile/cxgo/libs"
"github.com/gotranspile/cxgo/types"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -79,9 +79,9 @@ func TestGCCExecute(t *testing.T) {
err = ioutil.WriteFile(filepath.Join(out, "go.mod"), []byte(fmt.Sprintf(`module main
go 1.13
require (
github.com/dennwc/cxgo v0.0.0
github.com/gotranspile/cxgo v0.0.0
)
replace github.com/dennwc/cxgo => %s`, wd)), 0644)
replace github.com/gotranspile/cxgo => %s`, wd)), 0644)
require.NoError(t, err)

for _, path := range files {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dennwc/cxgo
module github.com/gotranspile/cxgo

go 1.13

Expand Down
2 changes: 1 addition & 1 deletion go_print.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"strings"

"github.com/dennwc/cxgo/libs"
"github.com/gotranspile/cxgo/libs"
)

func PrintGo(w io.Writer, pkg string, decls []GoDecl) error {
Expand Down
4 changes: 2 additions & 2 deletions libs/arpa_inet.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/cnet"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/cnet"
"github.com/gotranspile/cxgo/types"
)

// https://pubs.opengroup.org/onlinepubs/000095399/basedefs/arpa/inet.h.html
Expand Down
4 changes: 2 additions & 2 deletions libs/assert.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/types"
)

// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html
Expand Down
8 changes: 4 additions & 4 deletions libs/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"strconv"
"sync/atomic"

"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/types"
)

// TODO: spec URL
Expand All @@ -17,7 +17,7 @@ const (

typeFixedIntPref = "_cxgo_"

RuntimePackage = "github.com/dennwc/cxgo"
RuntimePackage = "github.com/gotranspile/cxgo"
RuntimePackageVers = "main"
RuntimePrefix = RuntimePackage + "/runtime/"
RuntimeLibc = RuntimePrefix + "libc"
Expand Down
2 changes: 1 addition & 1 deletion libs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package libs
import (
"errors"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
)

// NewEnv creates a new environment. It uses GOARCH env to set sensible defaults.
Expand Down
4 changes: 2 additions & 2 deletions libs/ctype.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package libs
import (
"unicode"

"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions libs/dlfcn.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/dlopen"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/dlopen"
"github.com/gotranspile/cxgo/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions libs/errno.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/libc"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/libc"
"github.com/gotranspile/cxgo/types"
)

// https://pubs.opengroup.org/onlinepubs/9699919799/
Expand Down
4 changes: 2 additions & 2 deletions libs/fenv.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/cmath"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/cmath"
"github.com/gotranspile/cxgo/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions libs/glob.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package libs

import (
"github.com/dennwc/cxgo/runtime/stdio"
"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/runtime/stdio"
"github.com/gotranspile/cxgo/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion libs/libcc/libcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package libcc
import (
"encoding/binary"

"github.com/dennwc/cxgo/types"
"github.com/gotranspile/cxgo/types"
"modernc.org/cc/v3"
)

Expand Down
Loading

0 comments on commit 0ad920b

Please sign in to comment.