1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

65 Commits

Author SHA1 Message Date
Tim Düsterhus 03fd405423 Use php_info_print_table_header for actual column headers only (#9485)
Using php_info_print_table_header() for "Foo: bar" looks odd and out of place,
because the whole line is colored. It is also questionable from a HTML
semantics point of view, because it does not described the columns that follow.

The use of this across extensions is inconsistent. It was part of the skeleton,
but ext/date or ext/json already use a regular row.
2022-09-06 08:48:22 +02:00
Max Semenik 2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Máté Kocsis 21cfa03f17 Generate function entries for another batch of extensions
Closes GH-5352
2020-04-05 21:15:30 +02:00
ZoDream 28afaef6fa Repair ext_skel.php to create the basic framework for a PHP extension
Copy the arginfo stubs file, and drop the %EXTNAME%_ to make things line up.

Closes GH-5289.
2020-03-23 09:25:06 +01:00
Máté Kocsis 736b22dc0b Add stubs for aliases
Closes GH-5187
2020-02-18 21:10:36 +01:00
Craig Duncan a9e8cd2b6b Convert the example skeleton extension to use arginfo stubs 2019-11-18 11:41:24 +01:00
Peter Kokot 92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Vincent JARDIN 91e44a27f6 skeleton: support PHP 7.2
skeleton can still be leveraged with older PHP releases, including
PHP 7.2.

I wanted to add this capability since PHP 7.2 is still widely provided
with most Linux distributions.

I am using ext_skel.php on a vanilla Ubuntu 18.04 and Windows
in order to illustrate how to develop a PHP extension for both
OS using the default tools provided by the distributions.
  see: https://github.com/vjardin/php-bonjour
2019-01-02 11:21:25 +01:00
Peter Kokot 1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Dmitry Stogov 9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Kalle Sommer Nielsen f35f45906e Redesigned ext_skel to be written entirely in PHP with no dependencies, this means it will now run on Windows without Cygwin and other nonsense.
It no longer includes a way to generate XML documentation (the PHP documentation utilities already got tools for that in svn under phpdoc/doc-base) and it no longer support function stubs.

$ php ext_skel.php --help
php ext_skel.php --ext=<name> [--experimental] [--author=<name>]
                 [--dir=<path>] [--std] [--onlyunix]
                 [--onlywindows] [--help]

  --ext=<name>          The name of the extension defined as <name>
  --experimental        Passed if this extension is experimental, this creates
                        the EXPERIMENTAL file in the root of the extension
  --author=<name>       Your name, this is used if --header is passed and
                        for the CREDITS file
  --dir=<path>          Path to the directory for where extension should be
                        created. Defaults to the directory of where this script
                        lives
  --std                 If passed, the standard header and vim rules footer used

                        in extensions that is included in the core, will be used

  --onlyunix            Only generate configure scripts for Unix
  --onlywindows         Only generate configure scripts for Windows
  --help                This help

Example usage:
$ php ext_skel.php --ext test --std --experimental
$ php ext_skel.php --ext kalle --author "Kalle Sommer Nielsen"
$ php ext_skel.php --ext phpfi --dir "/home/kalle/dev/" --onlyunix
2017-07-23 10:36:35 +02:00
Nikita Popov 1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Stanislav Malyshev 80bd148cc9 Merge branch 'pull-request/1235'
* pull-request/1235:
  modify skeleton confirm_extname_compiled
  modify skeleton.c function
2015-04-18 19:36:37 -07:00
王星星 73a0c96ac3 modify skeleton confirm_extname_compiled 2015-04-12 20:59:11 +08:00
王星星 22bef96315 modify skeleton.c function 2015-04-12 20:35:48 +08:00
Anatol Belski af3ca74501 made ZEND_TSRMLS_CACHE_* macros look like function calls
which also comply with the current semantics for such macros
2015-02-16 17:19:32 +01:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski e1fcb9ea66 integrated the static tsrmls cache into ext/skel 2014-12-17 12:37:50 +01:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski 3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Xinchen Hui 979c665f21 There is memleak 2014-05-08 22:01:50 +08:00
krakjoe 29a48fe73b update skeleton 2014-05-08 12:29:56 +01:00
Anatol Belski dcfd753104 fixed skeleton to produce the normalized ext version macros
See http://news.php.net/php.pecl.dev/11191 for more info.
2013-10-14 14:37:39 +02:00
Johannes Schlüter f7e204d7ed Slightly modernize ext_skel and sekelton/
- .svnignore ->.gitignore
- Add .gitignore entries for DSO stand-alone builds stuff
- Docs don't use CVS but SVN
- reorder extname.c file so it needs less forward declarations
- take forward declarations out of php_extname.h
- Drop #if for 12 years old PHP version compatibility
2013-07-17 23:18:13 +02:00
Carson McDonald 39bc1bd25f Fix typo 2013-04-05 23:27:34 +08:00
Felipe Pena 4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Dmitry Stogov 6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Marcus Boerger 50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Dmitry Stogov 1dbaae2795 Added automatic module globals management 2006-06-15 18:33:09 +00:00
foobar 4cbde95247 MFH 2005-12-05 23:53:05 +00:00
Hartmut Holzgraefe f355c4c5bb ok, re-adding this mostly un-maintained awk/sed/sh nightmare for now ... 2003-06-29 16:07:18 +00:00
Hartmut Holzgraefe 7218a70ff6 ext_skel is no more, and ext_skel_ng is moving to PEAR::PECL_Gen 2003-06-29 12:21:58 +00:00
foobar 3c9155e0cb Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
Rasmus Lerdorf 0c5e2d2439 Oops, FOO_VERSION doesn't exist 2001-12-02 00:59:44 +00:00
Rasmus Lerdorf 8dce85c2f2 Make ext_skel generate backward compatible module sources
(flight from London to Paris is too short for any real work)
2001-12-02 00:42:22 +00:00
Rasmus Lerdorf 374a351444 These were supposed to match 2001-10-27 12:22:22 +00:00
Stig Bakken 689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Rui Hirokawa 8b8d3d35c2 fixed name of global variables in ext/skelton. 2001-10-06 04:39:37 +00:00
Derick Rethans 78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Sterling Hughes ca5eb34608 New extensions should put this in by default 2001-08-24 01:09:10 +00:00
Zeev Suraski ef18947e5a sync with CODING_STANDARDS 2001-08-16 20:57:55 +00:00
Rasmus Lerdorf 2b4c2a2ff5 Commit a bit of random plane hacking.
- A slight exif fix from the latest version of jhead
 - Make ext_skel's confirm_module_compiled function consistent
2001-08-16 00:16:00 +00:00
Rasmus Lerdorf c359e40a57 More ext_skel cleanup 2001-08-09 04:47:47 +00:00
Zeev Suraski 527689ca81 Beautify 2001-08-02 00:11:20 +00:00
Zeev Suraski 797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
foobar 9b131c2633 added missing include 2001-06-24 23:29:13 +00:00
foobar a8382659f9 added missing ending fold tag. 2001-06-24 21:58:47 +00:00
Rasmus Lerdorf 81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf 25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Stig Bakken 1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00