Skip to content

Commit

Permalink
More source cleanups, added nice comments in methods_xxx files
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Sep 26, 2010
1 parent 24e3b52 commit e362b37
Show file tree
Hide file tree
Showing 32 changed files with 593 additions and 79 deletions.
96 changes: 48 additions & 48 deletions MUSHclient.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions scripting/methods/methods.cpp
Expand Up @@ -39,3 +39,61 @@
*/



/*
-- Lua code to work out what functions are in what file:
require "commas"
funcs = {}
for _, v in ipairs (utils.functionlist ()) do
funcs [v] = true
end -- for
-- this function is called for every found file
function load_file (name, stats)
print (string.rep ("-", 40))
local n = string.match (name, "[%w._]+$")
print (n)
print ""
print ("// Implements:")
print ""
local f = assert (io.open (name, "r")) -- open it
local s = f:read ("*a") -- read all of it
f:close () -- close it
local t = {}
for w in string.gmatch (s, "CMUSHclientDoc::([%w_]+)") do
if funcs [w] then
table.insert (t, w)
end -- if a script function
end -- for
table.sort (t)
local done = {}
for _, name in ipairs (t) do
if not done [name] then
print ("// ", name)
end -- if
done [name] = true
end -- for
print ""
end -- load_file
scan_dir ("\\source\\mushclient\\scripting\\methods", load_file)
*/
11 changes: 5 additions & 6 deletions scripting/methods/methods_accelerators.cpp
Expand Up @@ -2,12 +2,6 @@

#include "stdafx.h"
#include "..\..\MUSHclient.h"

//=============================================================
// IMPORTANT - when adding methods here remember to add the 'glue'
// routine in lua_methods.cpp and add it to the library table
// - see comments at the end of methods.cpp
//=============================================================
#include "..\..\doc.h"
#include "..\..\MUSHview.h"
#include "..\..\mainfrm.h"
Expand All @@ -16,6 +10,11 @@
#include "..\..\childfrm.h"
#include "..\..\sendvw.h"

// Implements:

// Accelerator
// AcceleratorList
// AcceleratorTo


// accelerator finding functor
Expand Down
24 changes: 15 additions & 9 deletions scripting/methods/methods_aliases.cpp
Expand Up @@ -4,22 +4,28 @@

#include "stdafx.h"
#include "..\..\MUSHclient.h"

//=============================================================
// IMPORTANT - when adding methods here remember to add the 'glue'
// routine in lua_methods.cpp and add it to the library table
// - see comments at the end of methods.cpp
//=============================================================
#include "..\..\doc.h"
#include "..\..\MUSHview.h"
#include "..\..\mainfrm.h"
#include "..\..\flags.h"
#include "..\errors.h"

// ******************************************************************************
// **************************** ALIASES ****************************************
// ******************************************************************************

// Implements:

// AddAlias
// DeleteAlias
// DeleteAliasGroup
// DeleteTemporaryAliases
// EnableAlias
// EnableAliasGroup
// GetAlias
// GetAliasInfo
// GetAliasList
// GetAliasOption
// GetAliasWildcard
// IsAlias
// SetAliasOption


#define AO(arg) offsetof (CAlias, arg), sizeof (((CAlias *)NULL)->arg)
Expand Down
23 changes: 23 additions & 0 deletions scripting/methods/methods_arrays.cpp
Expand Up @@ -7,6 +7,29 @@
#include "..\..\doc.h"
#include "..\errors.h"


// Implements:

// ArrayClear
// ArrayCount
// ArrayCreate
// ArrayDelete
// ArrayDeleteKey
// ArrayExists
// ArrayExport
// ArrayExportKeys
// ArrayGet
// ArrayGetFirstKey
// ArrayGetLastKey
// ArrayImport
// ArrayKeyExists
// ArrayListAll
// ArrayListKeys
// ArrayListValues
// ArraySet
// ArraySize


/*
arrays test:
Expand Down

0 comments on commit e362b37

Please sign in to comment.