Commit Graph

297 Commits

Author SHA1 Message Date
Guido van Rossum 9bfef44d97 * Changed all copyright messages to include 1993.
* Stubs for faster implementation of local variables (not yet finished)
* Added function name to code object.  Print it for code and function
  objects.  THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
  number has changed accordingly)
* Print address of self for built-in methods
* New internal functions getattro and setattro (getattr/setattr with
  string object arg)
* Replaced "dictobject" with more powerful "mappingobject"
* New per-type functio tp_hash to implement arbitrary object hashing,
  and hashobject() to interface to it
* Added built-in functions hash(v) and hasattr(v, 'name')
* classobject: made some functions static that accidentally weren't;
  added __hash__ special instance method to implement hash()
* Added proper comparison for built-in methods and functions
1993-03-29 10:43:31 +00:00
Sjoerd Mullender 6b517fdc95 Added conversion routines to sv module. 1993-03-16 12:25:30 +00:00
Guido van Rossum e537240c25 * Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file.
* modsupport.[ch]: added vmkvalue().
* intobject.c: use mkvalue().
* stringobject.c: added "formatstring"; renamed string* to string_*;
  ceval.c: call formatstring for string % value.
* longobject.c: close memory leak in divmod.
* parsetok.c: set result node to NULL when returning an error.
1993-03-16 12:15:04 +00:00
Guido van Rossum ccd5bad471 Extensive changes to regex module (group(), casefold, etc.) 1993-02-23 13:42:39 +00:00
Jack Jansen 337b20e23e Added audioop.reverse() which reverses an audio sample 1993-02-23 13:39:57 +00:00
Guido van Rossum 36d330bf36 * regexmodule.c: added use of translation table, substring() method. 1993-02-21 20:12:16 +00:00
Guido van Rossum 778983b481 Added new module "array" (for now optional) defining array objects. 1993-02-19 15:55:02 +00:00
Jack Jansen 4fada9c8e0 Added converters for rgb<->rgb8 and rgb<->grey 1993-02-19 15:51:41 +00:00
Jack Jansen fa1b9f63c9 Added dither() routine 1993-02-19 12:53:12 +00:00
Jack Jansen a90805f1c0 This time really check in the new routines :-) 1993-02-17 14:29:28 +00:00
Jack Jansen dd8a6eac57 Added lin2lin, findmax, findfactor and fintfit routines 1993-02-17 14:21:09 +00:00
Sjoerd Mullender 22e44cd0b5 * clmodule.c: the documentation was wrong, so changed the interface
accordingly: SetMin, SetMax, SetDefault are no longer methods of the
  compressor/decompressor but are functions of the cl module and they
  take a first argument which is a compression scheme
1993-02-17 09:11:14 +00:00
Sjoerd Mullender 4e2a4278e8 * clmodule.c: use function prototypes (found and fixed some bugs this
way); more efficiently check whether parameters are float; removed
  one argument from DecompressImage method; use clGetParam instead of
  clGetParams where it makes sense; convert int parameters in
  SetParams, SetParam, SetMin, SetMax, and SetDefault to float when
  needed; added QuerySchemeFromHandle method
* Makefile: interchanged cstubs and cgen.py so that $> in rule gets
  them in the right order
1993-02-16 11:55:17 +00:00
Jack Jansen 5fc677363f Added readdisplay() routine 1993-02-16 09:25:15 +00:00
Jack Jansen e8a3c28f8d Added new audio library functionality (getstatus, float sample fmts) 1993-02-10 14:10:56 +00:00
Sjoerd Mullender 38a22baea9 Fixed some memory leaks when things go wrong. 1993-02-10 13:31:01 +00:00
Jack Jansen 55cea47bae Changed adpcm routines to use 2-element state (was 3 element) 1993-02-10 13:21:59 +00:00
Guido van Rossum bf80e5407f * stdwinmodule.c: various new commands: setwin{pos,size},
listfontnames, bitmap ops.
* listobject.c: use mkvalue() when possible; avoid weird error when
  calling append() without args.
* modsupport.c: new feature in getargs(): if the format string
  contains a semicolor the string after that is used as the error
  message instead of "bad argument list (format %s)" when there's an
  error.
1993-02-08 15:49:17 +00:00
Guido van Rossum 6f5afc9a73 * ceval.c: ifdef out the last argument passing compat hack.
* Fixed memory leaks in socket, select and sv modules: mkvalue("O", v)
  does INCREF(v) so if v is brand new it should be XDECREF'd
1993-02-05 09:46:15 +00:00
Sjoerd Mullender 3a997279d5 CL.py, clmodule.c: Adapted to new CL library. Lots of new methods.
aifc.py: Several small improvements.  Use new methods from CL module.
1993-02-04 16:43:28 +00:00
Guido van Rossum 34679b7661 * Added Fixcprt.py: script to fix copyright message.
* various modules: added 1993 to copyright.
* thread.c: added copyright notice.
* ceval.c: minor change to error message for "+"
* stdwinmodule.c: check for error from wfetchcolor
* config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h)
* Add declaration of inittab to import.h
* sysmodule.c: added sys.builtin_module_names
* xxmodule.c, xxobject.c: fix minor errors
1993-01-26 13:33:44 +00:00
Jack Jansen d26b458325 Added tovideo routine 1993-01-22 15:34:43 +00:00
Guido van Rossum 0b0db8e3a0 Added separate main program for the Mac: macmain.c
stdwinmodule.c: wsetfont can now return an error
Makefile: add CL_USE and CL_LIB*S; config.c: move CL part around
New things in imgfile; also in Makefile.
longobject.c: fix comparison of negative long ints...  [REAL BUG!]
marshal.c: add dumps() and loads() to read/write strings
timemodule.c: make sure there's always a floatsleep()
posixmodule.c: rationalize struct returned by times()
Makefile: add test target, disable imgfile by default
thread.c: Improved coexistance with dl module (sjoerd)
stdwinmodule.c: Change include stdwin.h if macintosh
rotormodule.c: added missing last argument to RTR_?_region calls
confic.c: merged with configmac.c, added 1993 to copyright message
fileobject.c: int compared to NULL in writestring(); change fopenRF ifdef
timemodule.c: simplify times() using mkvalue; include myselect.h
  earlier (for sequent).
posixmodule: for sequent, include unistd.h instead of explicit
  extern definitions and don't define rename()
Makefile: change misleading/wrong MD5 comments
1993-01-21 16:07:51 +00:00
Jack Jansen 09cbf9a7a6 Use full path for izoom.h include file 1993-01-19 15:33:13 +00:00
Jack Jansen 3c2eb5c5cb Added (optional) better scaling to readscaled 1993-01-19 15:17:13 +00:00
Guido van Rossum e35399ea7b Checking in last-minute changes that are already part of release 0.9.8 1993-01-10 18:33:56 +00:00
Guido van Rossum 775f4dacbc * Makefile: use cp -r to install the library
* ceval.c: use #ifdef COMPAT_HACKS instead of #if 0
* Makefile: fix to make clmodule.c compile;
  make config.o dependent on libpython.a (so date is always correct)
* timemodule.c: now sleep() also takes a float argument.
* posixmodule.c: added nice().
1993-01-09 17:18:52 +00:00
Jack Jansen d513f0bcb6 Fixed various bugs in the adpcm routines 1993-01-08 14:40:53 +00:00
Sjoerd Mullender ed59d205a9 Various changes.
* Makefile: svmodule.c.proto and svgen.py are gone, svmodule.c came in
	their stead.  Also, pass -DUSE_DL flag to thread.c and give
	the user a possibility to add the -DDEBUG to just thread.c.
* ceval.c: init_save_thread() can be called more than once now.
* svgen.py, svmodule.c.proto, svmodule.c: Removed prototype file and
	replaced it by the generated file.
* thread.c: Added some more checks; added call to DL library when it
	is also used to tell it where the shared arena is so that DL
	can use some other area.
* threadmodule.c: Call init_save_thread from another place.  Also,
	added new function getlocklock() which does to lock objects
	what getfilefile does to file objects.
1993-01-06 13:36:38 +00:00
Guido van Rossum a2b7f40513 * Configure.py: use #!/usr/local/bin/python
* posixmodule.c: move extern function declarations to top
* listobject.c: cmp() arguments must be void* if __STDC__
* Makefile, allobjects.h, panelmodule.c, modsupport.c: get rid of
  strdup() -- it is a portability risk
* Makefile: enclosed ranlib command in parentheses for Sequent Make
  which aborts if the command is not found even if '-' is present
* timemodule.c: time() returns a floating point number, in microsecond
  precision if BSD_TIME is defined.
1993-01-04 09:09:59 +00:00
Jack Jansen de3adf9ef7 Added 2 and 4 bits grey formats 1992-12-22 14:05:55 +00:00
Guido van Rossum 5f59d6018e * mymalloc.h: always allocate one extra byte, since some malloc's
return NULL for malloc(0) or realloc(p, 0).  (This should be done
  differently than wasting one byte, but alas...)
* Moved "add'l libraries" option in Makefile to an earlier place.
* Remove argument compatibility hacks (b) and (c).
* Add grey2mono, dither2mono and mono2grey to imageop.
* Dup the fd in socket.fromfd().
* Added new modules mpz, md5 (by JH, requiring GNU MP 1.2).  Affects
  Makefile and config.c.
* socketmodule.c: added socket.fromfd(fd, family, type, [proto]),
  converted socket() to use of getargs().
1992-12-14 16:59:51 +00:00
Sjoerd Mullender 8dd054d918 adapted to newest version of CL library. 1992-12-14 13:17:29 +00:00
Guido van Rossum 8ed294150e Added new modules mpz, md5 (by JH, requiring GNU MP). 1992-12-08 16:10:18 +00:00
Guido van Rossum 2a7178efe1 socketmodule.c: added socket.fromfd(fd, family, type, [proto]);
converted socket() to use of getargs().
1992-12-08 13:38:24 +00:00
Guido van Rossum c89705d697 * config.c: Added audioop to lists.
* Makefile: change default source directory
* socketmodule.c: added getsockname and getpeername
* bltinmodule.c: corrected typo in type() error message
* Added new built-in functions str() and repr(): repr(x) == `x`;
  str(x) == x if x is a string, otherwise str(x) == repr(x).
* Added joinfields to stropmodule.c (string.join calls joinfields now)
1992-11-26 08:54:07 +00:00
Guido van Rossum 0317a4719b Added imageopmodule.c, also added them to Makefile and config.c.
Fixed a bug in Addmodule.sh that caused a crash in Configure.py.
Fixed the crash in Configure.py...
1992-10-26 13:40:15 +00:00
Guido van Rossum a9e7dc1081 * bltinmodule.c: added built-in function cmp(a, b)
* flmodule.c: added {do,check}_only_forms to fl's list of functions;
  and don't print a message when an unknown object is returned.

* pythonrun.c: catch SIGHUP and SIGTERM to do essential cleanup.

* Made jpegmodule.c smaller by using getargs() and mkvalue() consistently.

* Increased parser stack size to 500 in parser.h.

* Implemented custom allocation of stack frames to frameobject.c and
  added dynamic stack overflow checks (value stack only) to ceval.c.
  (There seems to be a bug left: sometimes stack traces don't make sense.)
1992-10-18 18:53:57 +00:00
Sjoerd Mullender 384f24816b Lots of little fixes.
- merged CloseCompressor and CloseDecompressor into one function
- keep existing errors in error function (for exceptions raised in the
  Compress or Decompress callback functions)
- remove newline from error string generated by error function
- allocate less memory when compressing multiple frames
- keep existing errors when clCompress or clDecompress fails
- raise an exception when compressed data doesn't fit within
  dataMaxSize bytes
- allocate frameSize bytes for decompression buffer instead of
  dataMaxSize
- use mkvalue more often
- new function QueryParams which will accept CL.AUDIO and CL.VIDEO
  args
- changed some function names
1992-09-29 16:43:43 +00:00
Guido van Rossum 3a40ae4ef3 New shell script Addmodule.sh makes it easier to add a new optional
module by editing Makefile and config.c in all the right places.
Used it to add most modules currently known.  Added markers to help
the script to Makefile and config.c.
1992-09-25 21:54:05 +00:00
Sjoerd Mullender 7c4eb40a1a Changed an ifdef from IRIX_405 to CDsetcallback. 1992-09-25 11:15:58 +00:00
Sjoerd Mullender 37f17b726c Fixed the last known bugs. 1992-09-25 10:28:20 +00:00
Sjoerd Mullender 46927bac96 Defined exception cd.error which is used for errors other than
TypeError, MemoryError and such.
1992-09-24 10:48:40 +00:00
Sjoerd Mullender d53a4f3d14 New built-in module "cl" (Compression Library). Only for Irix 4.0.5
and higher.  Made a few improvements to previous version.
1992-09-24 10:37:39 +00:00
Sjoerd Mullender c431549e21 New built-in module cl, the Compression Library. 1992-09-23 14:53:00 +00:00
Guido van Rossum 7066dd75c5 * Makefile: added IMGFILE; moved some stuff around.
* flmodule.c: added some missing functions; changed readonly flags of
  some data members based upon FORMS documentation.
* listobject.c: fixed int/long arg lint bug (bites PC compilers).
* several: removed redundant print methods (repr is good enough).
* posixmodule.c: added (still experimental) process group functions.
1992-09-17 17:54:56 +00:00
Guido van Rossum c2670a000b posix: added setpgrp() and, if sgi, setsid() and setpgid(pid, pgid) 1992-09-13 20:07:29 +00:00
Guido van Rossum 5c85062e1c Makefile uses $> more often; cgen supports filename argument; added
lower, upper and swapcase to strop; cosmetics.
1992-09-11 23:55:51 +00:00
Guido van Rossum aee087946d Made struct a standard built-in module; added string args to {set,get}sockopt;
added gl.gversion().
1992-09-08 09:05:33 +00:00
Guido van Rossum 94472a0374 classobject.c moduleobject.c stdwinmodule.c xxobject.c:
raise AttributeError, not KeyError, when attribute deletion fails.
sunaudiodevmodule.c: check for deletion before calling setmember.
1992-09-04 09:45:18 +00:00
Guido van Rossum 97f0277208 Restructured (yet again) to treat all modules more alike. 1992-09-03 20:49:55 +00:00
Guido van Rossum a5f61380f8 Got rid the bogus cache code and fix some unchecked errors. 1992-09-03 20:41:22 +00:00
Guido van Rossum aa7ca2dc1a Use getargs() everywhere now. Standardize lay-out yet more (an ongoing
project :-).  Change object administration: objects are removed from the
list of known objects as soon as their form is destroyed.
1992-09-03 20:37:02 +00:00
Guido van Rossum 3d1e146086 Improve check for offset out of range 1992-09-03 20:35:01 +00:00
Guido van Rossum e270b432f3 Re-implement some operations from string.py in C, for speed. 1992-09-03 20:21:07 +00:00
Jack Jansen e1b4d7ce14 Added rms, maxpp and avgpp methods. 1992-08-24 14:36:31 +00:00
Jack Jansen 8eace20f68 Removed debug statement 1992-08-24 14:35:38 +00:00
Jack Jansen 3accf984b3 Added method to write image files. 1992-08-20 11:54:27 +00:00
Guido van Rossum b001f7adb1 rearranged modules alphabetically 1992-08-19 16:44:41 +00:00
Guido van Rossum 90ddb7b5cb unpack() now returns a tuple, not a list 1992-08-19 16:44:15 +00:00
Guido van Rossum 3af03d8f3e don't call gl.foreground and create a new window after all (seems to
break window positions in .Xdefaults)
1992-08-19 16:42:53 +00:00
Guido van Rossum 448f4bf45a added getname, getdefault and getminmax functions 1992-08-19 16:41:15 +00:00
Guido van Rossum f9f2e82fca New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()
to avoid hanging in cleanup().
1992-08-17 08:59:08 +00:00
Guido van Rossum 0297512a08 struct: pack/unpack binary structs; fcntl: fcntl(), ioctl(). 1992-08-17 08:55:12 +00:00
Guido van Rossum 6d946f98bd * macmodule.c: include allobjects.h, not .c
* timemodule.c: the mac has no unistd.h
* classobject.c: fixed several cases of return NULL that should be
  return -1 !!!
1992-08-14 13:49:30 +00:00
Guido van Rossum 39789030bd Fix bug introduced by Jack (duplicate def of qread) 1992-08-13 14:23:56 +00:00
Jack Jansen 743db36cd2 Modified to allow other threads to run in a multithreaded environment. 1992-08-13 14:13:11 +00:00
Guido van Rossum 423d6c6bca DO_TIMES must now be defined in the Makefile 1992-08-12 15:34:02 +00:00
Guido van Rossum 38fbf52b8e Made module regex optional; added optional module nis. 1992-08-12 15:28:52 +00:00
Guido van Rossum 3562d52e93 Added error handling and free resources. 1992-08-12 15:26:16 +00:00
Guido van Rossum 9de7a01e0e NIS interface by Fred Gansevles <Fred.Gansevles@cs.utwente.nl>. 1992-08-12 14:57:12 +00:00
Guido van Rossum a1ed37cb59 Last-minute changes for release. 1992-08-10 14:55:00 +00:00
Guido van Rossum 21803b8a6f Makefile, Configure.py: ##ask --> ##[el]if[yes|no]
posixmodule.c: waitpid() is separate
1992-08-09 12:55:27 +00:00
Guido van Rossum de126a6ff8 Replaced max=-1 by max = -1. 1992-08-06 16:53:58 +00:00
Guido van Rossum ff4949eeee * Makefile: cosmetics
* socketmodule.c: get rid of makepair(); fix makesocketaddr to fix
  broken recvfrom()
* socketmodule: get rid of getStrarg()
* ceval.h: move eval_code() to new file eval.h, so compile.h is no
  longer needed.
* ceval.c: move thread comments to ceval.h; always make save/restore
  thread functions available (for dynloaded modules)
* cdmodule.c, listobject.c: don't include compile.h
* flmodule.c: include ceval.h
* import.c: include eval.h instead of ceval.h
* cgen.py: add forground(); noport(); winopen(""); to initgl().
* bltinmodule.c, socketmodule.c, fileobject.c, posixmodule.c,
  selectmodule.c:
  adapt to threads (add BGN/END SAVE macros)
* stdwinmodule.c: adapt to threads and use a special stdwin lock.
* pythonmain.c: don't include getpythonpath().
* pythonrun.c: use BGN/END SAVE instead of direct calls; also more
  BGN/END SAVE calls etc.
* thread.c: bigger stack size for sun; change exit() to _exit()
* threadmodule.c: use BGN/END SAVE macros where possible
* timemodule.c: adapt better to threads; use BGN/END SAVE; add
  longsleep internal function if BSD_TIME; cosmetics
1992-08-05 19:58:53 +00:00
Guido van Rossum 25bec8c8dc Sometimes, recvfrom() returns an empty address; this is not an error.
Also, get rid of makepair() in favor of mkvalue().
1992-08-05 19:00:45 +00:00
Guido van Rossum 1984f1e1c6 * Makefile adapted to changes below.
* split pythonmain.c in two: most stuff goes to pythonrun.c, in the library.
* new optional built-in threadmodule.c, build upon Sjoerd's thread.{c,h}.
* new module from Sjoerd: mmmodule.c (dynamically loaded).
* new module from Sjoerd: sv (svgen.py, svmodule.c.proto).
* new files thread.{c,h} (from Sjoerd).
* new xxmodule.c (example only).
* myselect.h: bzero -> memset
* select.c: bzero -> memset; removed global variable
1992-08-04 12:41:02 +00:00
Guido van Rossum 4fbf798f86 * myselect.h: bzero -> memset
* select.c: bzero -> memset; removed global variable
1992-08-04 09:13:45 +00:00
Guido van Rossum f16eda5ff8 cdmodule.c: 2 minor changes by Sjoerd. 1992-08-03 19:06:59 +00:00
Guido van Rossum 7b2c03f39b New rotor methods: setkey(), encryptmore() and decryptmore(). 1992-08-02 09:00:06 +00:00
Guido van Rossum e6e9fe18bb Changes to make it compile under SGI -- revamped new/dealloc a bit. 1992-07-31 15:11:01 +00:00
Guido van Rossum 500982062f New file rotormodule.c (by Lance Ellinghouse). 1992-07-31 15:10:13 +00:00
Guido van Rossum b64e63545f Added conversions to/from ADPCM(-4); renamed adpcm to adpcm3 (what it
really was).
1992-07-06 14:21:56 +00:00
Guido van Rossum 3ee199e0cd added WE_KEY detail format to stdwinmodule.c. 1992-06-30 12:48:26 +00:00
Guido van Rossum dd9ed839d6 Added qgetfd() to cstubs for GL.
Added new module dbm (interface to ndbm).
1992-06-29 17:10:40 +00:00
Guido van Rossum 8e7a0f026e Added adpcm2lin and lin2adpcm. 1992-06-23 15:23:57 +00:00
Guido van Rossum 9d47992719 Use "myselect.h" as intended. 1992-06-23 15:23:28 +00:00
Guido van Rossum ed233a5696 Changes for new UNIX-specific built-in module 'select' and new header for
interfaces to variants of select() system call, "myselect.h".  This includes
adding fileno() methods to files, sockets and stdwin.
1992-06-23 09:07:03 +00:00
Guido van Rossum 710e1df585 Some UNIX types want the exact size of the address structure 1992-06-12 10:39:36 +00:00
Guido van Rossum dfd6e46779 Fix for SEQUENT by Jaap Vermeulen 1992-06-12 10:39:22 +00:00
Guido van Rossum aad5344fc1 Fix bug in ulaw2lin for 4-byte values 1992-06-05 15:11:56 +00:00
Guido van Rossum 0e69587dc0 Added {get,set}sockopt(). allowbroadcast is now obsolete. 1992-06-05 15:11:30 +00:00
Guido van Rossum 3dd8c9895e fixed bugs in generic_setattr (returned NULL instead of
-1 for errors)
1992-06-03 17:07:49 +00:00
Guido van Rossum f0476350b8 Added 1992 to copyright notice 1992-06-03 17:07:06 +00:00
Guido van Rossum 2c4be64f20 added readscaled() function. 1992-06-03 17:06:36 +00:00
Guido van Rossum 9c52e0ff32 Initial revision 1992-06-03 17:06:14 +00:00
Guido van Rossum c888bf7cae append the default path to $PYTHONPATH; ignore empty $PYTHONPATH.
default DATE is now 3 Jun 1992
1992-06-03 17:05:13 +00:00
Guido van Rossum b66efa0d75 Initial revision 1992-06-01 16:01:24 +00:00
Guido van Rossum 5773798e50 Mark's name is Callow, not Callows 1992-05-15 11:06:29 +00:00
Guido van Rossum 178969df92 Added support for CD module 1992-05-15 11:06:12 +00:00