/usr/lib/swi-prolog/library/pldoc.pl is in swi-prolog-nox 7.2.3+dfsg-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /* Part of SWI-Prolog
Author: Jan Wielemaker
E-mail: J.Wielemaker@vu.nl
WWW: http://www.swi-prolog.org
Copyright (C): 2006-2013, University of Amsterdam
VU University Amsterdam
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
As a special exception, if you link this library with other files,
compiled with a Free Software compiler, to produce an executable, this
library does not by itself cause the resulting executable to be covered
by the GNU General Public License. This exception does not however
invalidate any other reasons why the executable file might be covered by
the GNU General Public License.
*/
:- module(pldoc,
[ doc_collect/1, % +Bool
pldoc_loading/0 % True if we are loading
]).
:- dynamic
pldoc_loading/0.
pldoc_loading.
:- dynamic user:file_search_path/2.
:- multifile user:file_search_path/2.
user:file_search_path(pldoc, library(pldoc)).
user:file_search_path(package_documentation, swi('doc/packages')).
:- multifile
tag_order/2. % +Tag, -Order
:- create_prolog_flag(pldoc_collecting, false, []).
doc_collect(OnOff) :-
set_prolog_flag(pldoc_collecting, OnOff).
:- doc_collect(true).
:- load_files([ pldoc(doc_process),
pldoc(doc_register),
pldoc(doc_modes),
pldoc(doc_wiki),
library(debug),
library(option),
library(lists),
library(operators),
library(prolog_source)
],
[ silent(true),
if(not_loaded)
]).
/*******************************
* DOCUMENTATION *
*******************************/
/** <module> Process source documentation
The pldoc module processes structured comments in Prolog source files.
These comments can be saved to file. During development the
documentation system can start a web-server to view the documentation of
loaded sources through your browser. The server is defined in the file
doc_http.pl and started through doc_server/1.
During development, a typical scenario is to first start the
documentation server and start a browser at <http://localhost:4000>.
Note that by default the web-pages allow for starting an editor only if
the connection comes from =localhost=. See doc_server/2 to realise a
different setup.
==
:- doc_server(4000).
:- [application].
==
@author Jan Wielemaker
@license LGPL
@see doc_server/1, doc_server/2, doc_collect/1.
*/
%% doc_collect(+Bool) is det.
%
% Switch collecting comments true/false. This autoload predicate
% can be used to force loading the pldoc library. In a typical
% development setup loading pldoc is normally triggered using
% doc_server/1.
%% pldoc_loading is semidet.
%
% True if we are loading the PlDoc libraries. Required internally
% to avoid undefined predicates while re-loading and document
% itself.
%% tag_order(?Tag, ?Order) is semidet.
%
% Hook that allows for defining additional tags.
%
% @see pldoc_wiki:tag_order/2 for the default definition.
/*******************************
* FINISH UP *
*******************************/
:- retract(pldoc_loading),
process_stored_comments.
|