1. 29 Feb, 2000 7 commits
    • Unknown User's avatar
    • Justin Mitchell's avatar
      New public release version 2.3(.0) · 8f2acf5c
      Justin Mitchell authored
      8f2acf5c
    • Steve Hill's avatar
      · b12c0035
      Steve Hill authored
      Errm... can't remember exactly what I've done other than this, but it now
      catches SIGUSR2 when the wrappers are off so you don't accidentally kill
      your MW session by attempting to look at the wrappers while they're turned
      off... (Coz it got annoying!)
      
       - Steve
      b12c0035
    • Chris Fry's avatar
      · 28c6e132
      Chris Fry authored
      Fixed more leaks in add.c
      
      Fry
      28c6e132
    • Steve Hill's avatar
      · 91560db6
      Steve Hill authored
      Wrappers now do rl_copy_text()
      Fixed mem leak in add.c (the buffer was never free()d).
      Errm - I think that's all...
      
       - Steve
      91560db6
    • Chris Fry's avatar
      · 1751db7f
      Chris Fry authored
      Latest bug-fixes
      
      Fry
      1751db7f
    • Steve Hill's avatar
      · 97379e6d
      Steve Hill authored
      I think that's all the memory bugs fixed - how about this :)
      ------
      talk{0}-* !quit
      SHUTDOWN
      Current allocated memory not including memory allocated by wrappers (most
      recent at top):
      Total: 0 bytes
      Total malloc() calls during runtime: 6085
      Total calloc() calls during runtime: 605
      Total realloc() calls during runtime: 0
      Total free() calls during runtime: 13804
      Total strdup() calls during runtime: 7093
      Total outstanding memory blocks: 0
      
      Doing garbage collection
      [firefury@sucs firefury]$
      ------
      
      I've put in free()s at the following locations:
      new.c: lines 83 & 103
      read.c: line 252
      
      These should fix the following leaks:
      read.c: line 250 - 3 bytes allocated at 0x80b5008 using strdup() at time 951783524
      new.c: line 79 - 64 bytes allocated at 0x80b43c0 using malloc() at time 951783524
      
      I have also updated the wrappers code - it now tells you when you try and
      free() something it doesn't know about (this might give you a bit of a
      warning about a millisecond before a SEGV <grin>).  calloc() is now
      supported (this accounts for some of the excess free()s fry found).
      Free(NULL) now supported - this accounts for the rest of the excess free()s.
      The outstanding block counter now actually counts the number of records in
      the list, instead of relying on the counters, so it is accurate.
      
      Unless anyone can find any other leaks or bugs for the moment, I recommend
      releasing this as the live version.
      
       - Steve
      97379e6d
  2. 28 Feb, 2000 10 commits
    • Chris Fry's avatar
      · 8249c756
      Chris Fry authored
      Oooodles of leak-removing fixes.
      
      Fry
      8249c756
    • Chris Fry's avatar
      · 3ab5ef0e
      Chris Fry authored
      Latest Leak fixes.
      
      Theres only script.c (and poss tscript.c - havent checked) left now, and I
      think I know where at least half of those are :)
      
      Fry
      3ab5ef0e
    • Chris Fry's avatar
      · 47afde5b
      Chris Fry authored
      OK, I've spent *ages* tonight working on fixing leaks in mw.
      
      I've removed *all* the leaks from rooms.c, colours.c, strings.c etc..., the
      only files left to look at are init.c, and script.c (or tscript.c or
      whatever).
      
      NOTE: one leak was mine in the screen_height/width detection stuff, one was
            finnw's in the stack_msg routines or whatever, and the other hideous
            amounts were all arthurs :) - see the Devel folder in mw for details
      
      Fry
      47afde5b
    • Chris Fry's avatar
      · 0425fb1d
      Chris Fry authored
      Added and fixed the 'tidyup' command, and 'topten' command updated again
      too.
      
      Fry
      0425fb1d
    • Finn Wilcox's avatar
      · e4aebc59
      Finn Wilcox authored
      Improved the readablity of ThreadState() and DoScript() in tscript.c
      Removed the testing operations from ThreadState().  It now just modifies the
      flags.
      Restored some dependencies on bb.h in Makefile (those that caused conflicts)
      e4aebc59
    • Chris Fry's avatar
      · afb2a8a6
      Chris Fry authored
      Integrated the 'topten' command, and updated it from its *evil* old code to
      something remotely resembling ANSI C.
      
      Fry
      afb2a8a6
    • Justin Mitchell's avatar
      Extracted version number out of the C code and into the Makefile · 8e93666d
      Justin Mitchell authored
      also stopped carrying the devel binary in the archive.
      8e93666d
    • Justin Mitchell's avatar
    • Justin Mitchell's avatar
      Remove wrappers.o from the archive (be more careful) · a58cc5d2
      Justin Mitchell authored
      added new #def RELEASE
      only to be used when doing final compiles,
      if not defined, versions are marked as development.
      
      use as 'CFLAGS=-DRELEASE make'
      (sorry for earlier 'make -DRELEASE' type confusions)
      a58cc5d2
    • Justin Mitchell's avatar
      Changed some of Firefury's stupidities with the malloc · 16c18345
      Justin Mitchell authored
      wrappers, that was a really messy #def you did there.
      you can now do 'make -DWRAPPERS' rather than having to
      change the makefile (also an option)
      
      also rearranged Makefile slightly so you can now just
      uncomment sections that you want turned on,
      i.e. WRAPPERS, Electric fence, gdb support. etc.
      
      Also 'static'ed the global variables in wrappers.c that are
      not used anywhere outside that function, you should do this
      to the approporiate functions too.
      16c18345
  3. 27 Feb, 2000 2 commits
    • Steve Hill's avatar
      · 58175815
      Steve Hill authored
      Argh, sorry guys, I forgot to add the new wrappers files <doh>
      
       - Steve
      58175815
    • Steve Hill's avatar
      · ebc76c53
      Steve Hill authored
      Written a fairly advanced set of wrappers to (hopefully) help track
      memory leaks...  They wrap malloc(), realloc(), free() and strdup().
      If USE_WRAPPERS is set to 1 in the Makefile, the wrappers are used, if
      it's set to 0, they aren't, although they seem pretty fast, so it should
      be fine to keep them turned on during development.  Information is stored
      in a linked list:
      
      malloc() and strdup() - these prepend streight to the head of the list,
      so should be pretty fast all the time.
      
      realloc() and free() - since the most recent allocations are at the head
      of the list, these should be fairly fast for memory that has just been
      allocated (the stuff that is mostly going to be free()d or realloc()ed.
      In addition, realloc() keeps a history of past realloc()s for each memory
      block.  When free() is called, this history is nuked, together with the
      information about it ever being allocated.
      
      If you send SIGUSR2 to the process, a list of currently allocated memory
      blocks and any realloc() history will be printed.
      Also, if you start milliways with -exitinfo, this list will be printed
      just before exit (ideally, this list should be empty, showing that
      everything has been free()d, but in reality, Milliways generates a few
      hundred lines of information, so use this option with care).
      
      If the wrappers are turned on, a garbage-colleciton routine will clean
      up when the process exits - not really necessary under Linux, but it's a bit
      nicer than just leaving the OS to do it.
      
      These wrappers are effective in anything that #includes "wrappers.h"
      (currently everything except red.c).  If you create a new c file, it might
      be wise to #include "wrappers.h".
      
       - Steve (bugger, that's the longest CVS message ever :)
      ebc76c53
  4. 24 Feb, 2000 4 commits
    • Chris Fry's avatar
      · b9723df7
      Chris Fry authored
      Latest memory leak fixes :)
      
      Fry
      b9723df7
    • Chris Fry's avatar
      · cc744176
      Chris Fry authored
      Umm.. stuff about tab-completion - fixed a memory leak and updated it abit
      
      Fry
      cc744176
    • Chris Fry's avatar
      · 6b43df1b
      Chris Fry authored
      Made 'ExecEvent' return a value incase function to exec doesnt exist...
      
      Well... it may be useful...
      
      Fry
      6b43df1b
    • Chris Fry's avatar
      · bb918d11
      Chris Fry authored
      Made a couple more changes to incoming.c
      
      Finnw> for now I've remarked the partial message thingy, cos its irritating,
      and ignores the rest of it anyway (only sends max of 1024 chars now anyway)
      
      Fry
      bb918d11
  5. 23 Feb, 2000 1 commit
    • Chris Fry's avatar
      · edb06cfb
      Chris Fry authored
      Fixed hideous amounts of buffer overruns, and stuff.
      
      Added a constant MAXTEXTLENGTH in bb.h for any function to use, so I dont
      have to keep changing 1024 etc.. if it needs changing. Recommend using this
      if calling any functions that 'fiddle' with strings, eg, apply_gag,
      quotetext, and the send routines, talk_send, broadcast etc.. - reason being
      is that *THEY* all use it, so if you dont it'll get truncated anyway if too
      big! :P
      
      Fixed other wacky stuff, all to do with sprintf, strcpy's etc.. with dont
      check string sizes.
      
      Now seems to work faster, with less memory leaks, and I haven't been able to
      crash it yet (.e crosses fingers :)
      
      Fry
      edb06cfb
  6. 22 Feb, 2000 1 commit
    • Chris Fry's avatar
      · 8b42dc40
      Chris Fry authored
      Fixed a couple of bugs in the makefile, and removed firefury's snapshot
      thingy (firefury - just do a 'tar' like a normal person).
      
      Plus, various buffer overruns fixed, if I haven't already submitted them.
      
      Fry
      8b42dc40
  7. 20 Feb, 2000 1 commit
    • Steve Hill's avatar
      · 0763ab6f
      Steve Hill authored
      Made following changes to the Makefile:
      
      Removed fry's "beep" rule and integrated it into the "bb" and "red" rules so
      it now works in a parallelised make.
      
      Added "srcsnapshot" rule - this takes a snapshot of the src directory (i.e.
      the "." directory and all subdirectories).
      
      Added "snapshot" rule - this takes a snapshot of the whole BBS (i.e. the
      ".." directory and all subdirectories).
      
      The snapshots are tgz files with timestamped filenames.  The base dir is
      defined by $(SNAPSHOTBASE), and shouldn't be inside the devtree (ATM it's
      set to "../../", which is safe).
      
       - Steve
      0763ab6f
  8. 19 Feb, 2000 1 commit
    • Finn Wilcox's avatar
      · f2f0cd1f
      Finn Wilcox authored
      Improved the speed of the threaded version
      
      Added an extra buffer overrun check in incoming.c
      f2f0cd1f
  9. 18 Feb, 2000 2 commits
    • Chris Fry's avatar
      · e6319ac1
      Chris Fry authored
      Fixed the buffer overrun problems in incoming.c
      
      Fry
      e6319ac1
    • Chris Fry's avatar
      · e48eeb44
      Chris Fry authored
      I've fixed the beeping if you had beeps on, and looked at 'ignorelist'.
      
      God knows whatelse I've done - if any files are altered, its probably minor
      spelling fixes :)
      
      Fry
      e48eeb44
  10. 17 Feb, 2000 5 commits
    • Chris Fry's avatar
      · 053847c0
      Chris Fry authored
      Fixed the 'sayto' log to log who you said it to.
      
      Fry
      053847c0
    • Chris Fry's avatar
      · 133986ab
      Chris Fry authored
      Corrected makefile *again* (tnarg/firefury, plz stop doing this!)
      
      Fry
      133986ab
    • Chris Fry's avatar
      · aeb8d16c
      Chris Fry authored
      Updated the login banner back to the original version rather than FireFury's
      oooooooh-so manky version :P
      
      Fry
      aeb8d16c
    • Robert Grant's avatar
      · 96a5ac32
      Robert Grant authored
      update sayto command so the recver knows that the message was only sent to
      him
      96a5ac32
    • Finn Wilcox's avatar
      · 8cba19ca
      Finn Wilcox authored
      Optimised idle() and ScriptStep() a bit in tbbs - they can still be
      improved though.  eval_arg() takes up the most time now (~20% of total
      run time)
      8cba19ca
  11. 16 Feb, 2000 4 commits
    • Chris Fry's avatar
      · 4eeb1cc7
      Chris Fry authored
      Fixed 'whisper' and 'sayto' commands, so they detect if user is also logged
      on, and not just whether they exist.
      
      Changed the 'summon' help text to something more recent.
      
      Fry
      4eeb1cc7
    • Chris Fry's avatar
      · f02f66c0
      Chris Fry authored
      Ermm.. added '.sayto' command in talker (needs 'raw' priv)
      
      Changed force commands in incoming.c to cope with finnws new proper message
      stack, rather than single buffer (muliple stacked forces now available
      anyone? now all we need is file access, and firefury can write a script to
      multiple force ppl to write a new script, load it, and execute it ->
      'chainmail' scripts :)
      
      Fry
      f02f66c0
    • Chris Fry's avatar
      · 4da0f3ee
      Chris Fry authored
      Added the 'incoming.o' make definition into 'Makefile'
      
      Anything else included is just minor/touched - is it just me, or has CVS
      started showing *all* files in the 'CVS: Modified Files:' bit, rather than
      just the modified ones? 'cos its difficult to remember what I changed unless
      I see the filenames there :/
      
      Fry
      4da0f3ee
    • Finn Wilcox's avatar
      · 581e8fc7
      Finn Wilcox authored
      Added strings.h - now essential for compiling strings.c and new.c
      581e8fc7
  12. 15 Feb, 2000 2 commits
    • Finn Wilcox's avatar
      · 4855fee6
      Finn Wilcox authored
      split handle_mesg (formerly part of incoming_mesg) into 10 separate
      functions.
      
      Fixed a bug in Parse.c that segfaulted if you typed a single '.' on
      a line
      
      Extended the 'stack_str' stack.  Its now a real stack not just a
      single-line buffer.  Also added a flags field.  I plan to implement a
      safer 'boardexec' with it in the threaded version.
      
      modified the alarm system slightly.  It used to occasionally deadlock
      during 'sleep' (I'm not sure why).  Now it puts a limit on the waiting
      time.
      
      Threaded version should now compile OK.  Some instructions (eg input,
      boardexec) are still not thread-safe.  For the moment do 'busy on'
      before using them.
      4855fee6
    • Chris Fry's avatar
      · 0a1a1f15
      Chris Fry authored
      Added 'sayto' function finally.
      
      Allows perfect 'say' to a specific user. If user has global on, then shows
      room the sender is in.
      
      Needs 'raw' priv to use.
      
      Fry
      0a1a1f15