summaryrefslogtreecommitdiff
path: root/portato/eix/eix_utils.pyx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/eix/eix_utils.pyx57
1 files changed, 0 insertions, 57 deletions
diff --git a/portato/eix/eix_utils.pyx b/portato/eix/eix_utils.pyx
index 57fa5d7..0ea9603 100644
--- a/portato/eix/eix_utils.pyx
+++ b/portato/eix/eix_utils.pyx
@@ -1,15 +1,3 @@
-class EndOfFileError (IOError):
-
- def __init__ (self, filename = None):
- self.message = "End of file reached while not expecting it"
- self.filename = filename
-
- def __str__ (self):
- if self.filename is not None:
- return "%s: %s" % (self.message, self.filename)
- else:
- return self.message
-
cdef char* strdup (char * other) except NULL:
cdef size_t len
cdef char* new
@@ -25,48 +13,3 @@ cdef char* strdup (char * other) except NULL:
return NULL
return strcpy(new, other)
-
-
-cdef File* fopen (char* path, char* mode) except NULL:
- cdef File* f
-
- f = <File*> PyMem_Malloc(sizeof(File))
-
- if f is NULL:
- raise MemoryError, "Malloc of File"
- return NULL
-
- f.file = c_fopen(path, mode)
-
- if f.file is NULL:
- raise IOError, (errno, strerror(errno), path)
- return NULL
-
- f.name = strdup(path)
-
- if f.name is NULL:
- return NULL
-
- return f
-
-cdef void fclose (File* f):
- c_fclose(f.file)
- ffree(f.name)
- PyMem_Free(f)
-
-cdef void ffree (void* p):
- PyMem_Free(p)
-
-cdef char* fget (File* f, size_t n) except NULL:
- cdef char* buf
- buf = <char*> PyMem_Malloc(n)
-
- if buf is NULL:
- raise MemoryError, "Malloc"
- return NULL
-
- if (fread(buf, 1, n, f.file) != n):
- PyMem_Free(buf)
- raise EndOfFileError, f.name
-
- return buf
ver-highlight'> 2012-02-23Unify cci outputRené Neumann1-10/+15 2012-02-23Make the stg-version into a variable ... no need to run python multiple timesRené Neumann1-6/+5 2012-02-23Port cci to new stgit versionRené Neumann2-4/+19 2012-02-23Do not use the find-theorems-form in PGRené Neumann1-1/+1 2012-01-30ebuild_error_on_trailing_whitespace is deprecatedRené 'Necoro' Neumann1-1/+0 2012-01-10Add 'block' command to mako syntaxRené 'Necoro' Neumann1-2/+2 2012-01-10Changes needed for haddock browser.René 'Necoro' Neumann1-1/+2 2011-12-09Update haskellmodeRené Neumann1-2/+1 2011-12-09Update haskellmodeRené Neumann5-82/+228 2011-11-21Set Poly/ML as the default SML interpreter.René Neumann1-0/+3 2011-11-21Added support for jedit.René Neumann2-4/+11 2011-11-16Make 'hg k' work similar to 'git k'René 'Necoro' Neumann1-0/+3 2011-10-14'tabgroup' -> 'tabgroups'René 'Necoro' Neumann1-1/+1 2011-10-14Switch from openoffice alias to libreoffice (ooffice -> soffice)René 'Necoro' Neumann1-2/+2 2011-10-14Make the quotes in ProofGeneral to be nearly invisibleRené Neumann1-1/+1 2011-08-23Disable hightlighting of the domain in the FF urlbarRené Neumann1-0/+3 2011-08-12Enhance IE scriptRené Neumann1-6/+7 2011-08-11BlaRené 'Necoro' Neumann1-0/+2 2011-08-11Local fontsRené 'Necoro' Neumann1-13/+22 2011-08-11Better inconsolata thingsRené Neumann4-4/+13 2011-08-10Moved some functions to their own filesRené Neumann3-124/+120 2011-08-10More advanced IE scriptRené Neumann2-1/+74 2011-08-10Inconsolata also in emacsRené Neumann1-1/+1 2011-08-10Better vim fontsRené 'Necoro' Neumann1-1/+1 2011-08-09ooffice aliasRené Neumann1-0/+2 2011-08-09Update the needed hg-extensions.René Neumann1-1/+2 2011-06-08gtkrc stuff for Qt-Gtk-StyleRené 'Necoro' Neumann2-0/+8 2011-06-08Updated fonts.conf to work better on lcdsRené 'Necoro' Neumann1-17/+6