Skip to content

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
Prior to a mass rename of the RST sources and utilities.
  • Loading branch information
kaduk committed Oct 15, 2012
1 parent aec4aad commit ee26c4b
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 146 deletions.
2 changes: 1 addition & 1 deletion doc/rst_source/README
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To build the documentation as HTML pages run:

sphinx-build source_dir destination_dir

where
where
source_dir is the source directory which includes configuration file conf.py and all source files;
destination_dir is the directory for the built documentation.

Expand Down
4 changes: 2 additions & 2 deletions doc/rst_source/krb_appldev/refs/types/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Public
krb5_int32.rst
krb5_kdc_rep.rst
krb5_kdc_req.rst
krb5_keyblock.rst
krb5_keyblock.rst
krb5_keytab_entry.rst
krb5_keyusage.rst
krb5_kt_cursor.rst
Expand Down Expand Up @@ -72,7 +72,7 @@ Public
krb5_timestamp.rst
krb5_tkt_authent.rst
krb5_trace_callback.rst
krb5_trace_info.rst
krb5_trace_info.rst
krb5_transited.rst
krb5_typed_data.rst
krb5_ui_4.rst
Expand Down
2 changes: 1 addition & 1 deletion doc/rst_source/krb_basic/stash_file_def.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The file should not be part of any backup of the machine, unless
access to the backup data is secured as tightly as access to the
master password itself.

.. note:: If you choose not to install a stash file, the KDC will prompt you for the master key each time it starts up.
.. note:: If you choose not to install a stash file, the KDC will prompt you for the master key each time it starts up.
This means that the KDC will not be able to start automatically, such as after a system reboot.


2 changes: 1 addition & 1 deletion doc/rst_source/krb_plugindev/locate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ addresses for the realm, KRB5_PLUGIN_NO_HANDLE if it wants to let
other location mechanisms determine the server addresses, or another
code if it experienced a failure which should abort the location
process.

A module can create and destroy per-library-context state objects by
implementing the **init** and **fini** methods. State objects have
the type void \*, and should be cast to an internal type for the state
Expand Down
64 changes: 32 additions & 32 deletions doc/rst_tools/docmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def __init__(self, **argkw):
self.short_description = argkw.get('short_description')
self.long_description = argkw.get('long_description')
self.version = argkw.get('version')

def __repr__(self):
result = list()
for (attr,value) in self.__dict__.iteritems():
result.append('%s=%s' % (attr,value))
return 'Attribute: %s' % ','.join(result)


class CompositeType():
def __init__(self, **argkw):
Expand All @@ -58,18 +58,18 @@ def __init__(self, **argkw):
self.friends = argkw.get('friends')
self.type = argkw.get('type')
self.attributes = self._setAttributes(argkw.get('attributes'))

def __repr__(self):
result = list()
for (attr,value) in self.__dict__.iteritems():
if attr == 'attributes':
if value is not None:
attributes = ['%s' % a for a in value]
value = '\n %s' % '\n '.join(attributes)
result.append('%s: %s' % (attr,value))

result.append('%s: %s' % (attr,value))
result = '\n'.join(result)

return result

def _setAttributes(self, attributes):
Expand All @@ -78,19 +78,19 @@ def _setAttributes(self, attributes):
result = list()
for a in attributes:
result.append(Attribute(**a))

return result

def struct_reference(self, name):
result = re.sub(r'_', '-', name)
result = '_%s-struct' % result

return result

def macro_reference(self, name):
result = re.sub(r'_', '-', name)
result = '_%s-data' % result

return result

class Parameter(object):
Expand All @@ -102,11 +102,11 @@ def __init__(self, **argkw):
self.typeId = argkw.get('typeId')
self.description = argkw.get('description')
self.version = argkw.get('version')

def __repr__(self):
content = (self.name,self.direction,self.seqno,self.type,self.typeId,self.description)
return 'Parameter: name=%s,direction=%s,seqno=%s,type=%s,typeId=%s,descr=%s' % content

class Function(object):
def __init__(self, **argkw):
self.category = 'function'
Expand All @@ -126,27 +126,27 @@ def __init__(self, **argkw):
self.long_description = argkw.get('long_description')
self.deprecated_description = argkw.get('deprecated_description')
self.friends = argkw.get('friends')

def _setParameters(self, parameters):
result = None
if parameters is not None:
result = list()
for p in parameters:
result.append(Parameter(**p))

return result

def getObjectRow(self):
result = [str(self.Id),
result = [str(self.Id),
self.name,
self.category]

return ','.join(result)

def getObjectDescriptionRow(self):
result = [self.Id,
self.active,
self.version,
result = [self.Id,
self.active,
self.version,
self.short_description,
self.long_description]

Expand Down Expand Up @@ -177,14 +177,14 @@ def __repr__(self):
lines.append('Function return type description:\n%s' % self.return_description)
lines.append('Function retval description:\n%s' % self.retval_description)
lines.append('Function short description:\n%s' % self.short_description)
lines.append('Function long description:\n%s' % self.long_description)
lines.append('Function long description:\n%s' % self.long_description)
lines.append('Warning description:\n%s' % self.warn_description)
lines.append('See also description:\n%s' % self.sa_description)
lines.append('NOTE description:\n%s' % self.notes_description)
lines.append('NOTE description:\n%s' % self.notes_description)
lines.append('Version introduced:\n%s' % self.version_num)
lines.append('Deprecated description:\n%s' % self.deprecated_description)
result = '\n'.join(lines)

return result


Expand All @@ -197,13 +197,13 @@ def __init__(self, **argkw):
self.function = Function(**argkw)
elif argkw['category'] == 'composite':
self.category = 'composite'
self.composite = CompositeType(**argkw)
self.composite = CompositeType(**argkw)

def __repr__(self):
obj = getattr(self,self.category)
print type(obj)
return str(obj)

def signature(self):
param_list = list()
for p in self.function.parameters:
Expand All @@ -214,9 +214,9 @@ def signature(self):
param_list = ', '.join(param_list)
result = '%s %s(%s)' % (self.function.return_type,
self.function.name, param_list)

return result

def save(self, path, template_path):
f = open(template_path, 'r')
t = Template(f.read(),self)
Expand All @@ -231,22 +231,22 @@ def __init__(self):
doc_path = '../docutil/example.yml'
argkw = yaml.load(open(doc_path,'r'))
super(DocModelTest,self).__init__(**argkw)

def run_tests(self):
self.test_save()

def test_print(self):
print 'testing'
print self


def test_save(self):
template_path = '../docutil/function2edit.html'

path = '/var/tsitkova/Sources/v10/trunk/documentation/test_doc.html'

self.save(path, template_path)
self.save(path, template_path)

if __name__ == '__main__':
tester = DocModelTest()
tester.run_tests()
6 changes: 3 additions & 3 deletions doc/rst_tools/doxy.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'''
Copyright 2011 by the Massachusetts
Institute of Technology. All Rights Reserved.
Export of this software from the United States of America may
require a specific license from the United States Government.
It is the responsibility of any person or organization contemplating
export to obtain such a license before exporting.
WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
distribute this software and its documentation for any purpose and
without fee is hereby granted, provided that the above copyright
Expand Down Expand Up @@ -48,7 +48,7 @@ def processOptions():

if in_dir is None or out_dir is None:
parser.error("Input and output directories are required")

if action == "all" or action == "typedef":
tester = DoxyTypesTest(in_dir, out_dir)
tester.run_tests()
Expand Down

0 comments on commit ee26c4b

Please sign in to comment.