dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

51 Commits

Author SHA1 Message Date
tilghman 7326fe3151 Reorder option flags. Change guidelines so that example code is consistent with guidelines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@231369 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-26 02:09:58 +00:00
tilghman 336c5f3dc6 Merged revisions 211583 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r211583 | tilghman | 2009-08-10 14:48:48 -0500 (Mon, 10 Aug 2009) | 1 line
  
  Conversion specifiers, not format specifiers
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211584 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:49:41 +00:00
tilghman d1ec1aa57d AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10 19:20:57 +00:00
snuffy f72d38b433 (closes issue #15515)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209958 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-01 23:25:16 +00:00
russell 31f259bed4 Note that we use tabs instead of spaces for indentation.
I'm surprised this was never actually in here...


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@207925 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21 22:22:18 +00:00
kpfleming a2c426f29f Last batch of 'static' qualifiers for module-level global variables.
Fix up modules in the 'apps' directory, and also correct the bad example of
enum definitions in include/asterisk/app.h, which many developers followed
(thanks for reading the documentation!). In addition, add some basic usage
examples of the 'pahole' and 'pglobal' tools to the coding guidelines.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200656 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15 19:10:10 +00:00
seanbright 8be2e20ea4 Update references to bugs.digium.com and reviewboard.digium.com to the new URLs.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@197824 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-28 21:50:27 +00:00
seanbright 6313d8d59e Mostly just whitespace, but also convert 'CVS' to 'SVN' in a couple
places and fix a few typos I found in the CODING_GUIDELINES.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@167061 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-31 23:07:14 +00:00
murf 6499c3c6d4 (closes issue #13557)
Reported by: nickpeirson
Patches:
      pbx.c.patch uploaded by nickpeirson (license 579)
      replace_bzero+bcopy.patch uploaded by nickpeirson (license 579)
Tested by: nickpeirson, murf

1. replaced all refs to bzero and bcopy to memset and memmove instead.
2. added a note to the CODING-GUIDELINES
3. add two macros to asterisk.h to prevent bzero, bcopy from creeping
   back into the source
4. removed bzero from configure, configure.ac, autoconfig.h.in




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-09 14:17:33 +00:00
russell ffd283a966 Add a locking section to the coding guidelines document.
This section covers some locking fundamentals, as well as some information on
locking as it is used in Asterisk.  It describes some of the ways that are used
and could be used to achieve deadlock avoidance.  It also demonstrates the
unfortunate conclusion that with the use of recursive locks, none of the
constructs in use today are failsafe from deadlocks.  Finally, it makes some
recommendations for new code being written.  As proper locking strategies is a
complex subject, this section still has room for expansion and improvement.

This is a result of collaboration between Luigi Rizzo and myself on the 
asterisk-dev mailing list.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127363 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-02 12:08:33 +00:00
russell 90c61af3eb a few minor updates and typo fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126515 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-30 12:49:56 +00:00
mvanbaak c342cdeaf3 Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19 20:48:33 +00:00
tilghman 084bd8a463 fileio.h does not exist; io.h does, though.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114202 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-17 15:12:52 +00:00
tilghman 14f9996743 1) Make braces mandatory for if/for/while, even around single statements.
2) Revise the argument parsing section, showing use of the standard macros.
3) Fix a typo.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104176 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26 18:40:26 +00:00
oej d170d5e82b A minor update, caused by a recent bug report ;-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93557 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 07:56:29 +00:00
rizzo b0d3c91caf small documentation update (nothing important).
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 07:22:26 +00:00
rizzo 58ddf93b1d add a bit of info on the build infrastructure
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92084 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10 04:38:49 +00:00
rizzo df2c28a200 new info on the management of headers
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89526 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22 07:10:37 +00:00
mmichelson 6b50c0110b Merged revisions 82376 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82376 | mmichelson | 2007-09-14 09:42:29 -0500 (Fri, 14 Sep 2007) | 5 lines

Fixing a typo in the coding guidelines

(closes issue #10717, reported and patched by leedm777)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82377 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-14 14:44:15 +00:00
russell bb30ecd290 add a note about inline comments
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67273 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 14:59:34 +00:00
russell ed238ab532 add a note about using the intenal API for creating detached threads
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65991 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24 19:11:09 +00:00
murf 066fef6a86 a small upgrade to the coding standard, and an update to the code that triggered the upgrade.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63048 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04 17:49:20 +00:00
tilghman ec1f8bd536 More spelling fixes (issue 7930)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42735 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-11 17:02:37 +00:00
russell 3e20c6f417 fix minor typo in coding guidelines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42684 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-11 04:17:23 +00:00
russell 1e98de70e7 update to mention svn instead of cvs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38089 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-23 02:50:25 +00:00
russell 25faafd4f6 fix typo in the provided indent command
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18694 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-10 01:54:13 +00:00
oej 48e3469f05 Clarify syntax of new manager events that reports a status.
We do not longer approve "ThisEventOn" and "ThisEventOff" named events,
they need to be named "ThisEvent" with a status header showing the
current status.
(Approved by Mark)
Old events won't be changed to keep backwards compatibility,
until we have a revision plan for the AMI.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17199 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-04 07:59:02 +00:00
kpfleming 5d9ed5739a major dialplan functions update
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL()


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9674 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-12 04:28:58 +00:00
russell c68a2d2d8e Various cleanups from comments in an email from Luigi Rizzo. Thank you!
- Use a cleaner syntax for declaring the allocation macros
- Fix return value for ast_strdup/ast_strndup
- remove safe_strdup from app_macro, since ast_strup does the same thing
- fix a place in app_queue where ast_calloc+strncpy was used instead of
  ast_strdup.  If you are helping out with these conversions, please watch out
  for other places where this is done.
- add a note to the coding guidelines about the fix to app_queue


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8065 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-13 18:38:55 +00:00
russell 56f4aec652 fix typo, thanks Qwell!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7953 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-11 00:06:15 +00:00
russell 1eb7a651e2 Add wrappers for commonly used memory allocation functions. These wrappers
add an automatically generated Asterisk log message if the allocation fails
for some reason.  Otherwise, they are functionally the same, with the
exception of ast_strdup and ast_strndup.  These functions have the added
ability to accept a NULL argument without error, which will just be ignored
without generating an error. The coding guidelines have also been updated to 
reflect all of this information.  (issue #4996)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7952 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-10 23:51:42 +00:00
kpfleming 24c1e3c222 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b 2005-11-29 18:24:39 +00:00
russell a83209ea26 issue #5709
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7050 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-10 23:08:00 +00:00
kpfleming f049081ead various text/formatting updates (issue #5503 plus some minor additions)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6909 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-31 22:47:58 +00:00
russell 524b1abe1d update guidelines to explain indent parameteres (bug #4742)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6163 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-19 17:59:27 +00:00
kpfleming 195b213e41 more thoughts
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6078 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-10 23:58:07 +00:00
kpfleming cf7dd25e04 minor fixes, and more topics covered
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6077 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-10 23:51:10 +00:00
kpfleming ea0c7ad984 update guidelines to follow their own rules for whitespace (bug #4486)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5880 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-07 21:28:56 +00:00
kpfleming 7309cfd429 add guidelines for doxygen documentation writing (bug #4417, with mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5818 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-02 19:38:55 +00:00
kpfleming 6e17dfcd50 add a minor allocation/zeroing guideline
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5817 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-02 19:17:04 +00:00
kpfleming 10d27ab9b4 add IAXPEER function (bug #4310, with minor formatting and doc changes)
add note to CODING-GUIDELINES about minimizing indentation in function bodies


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5733 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-19 04:31:02 +00:00
kpfleming 5e4013d613 more strncpy -> ast_copy_string conversions, fixing some buglets along the way
add recommendation to CODING-GUIDELINES to use ast_copy_string instead of strncpy in new code


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5686 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-15 23:26:45 +00:00
kpfleming 77f1ac1f1b add some notes regarding the distinction between applications and functions
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5542 f38db490-d61c-443f-a65b-d21fe96a405b
2005-05-01 19:34:50 +00:00
kpfleming befaca8efd add guideline comment about not using '%i' with scanf
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5501 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-23 15:11:28 +00:00
kpfleming 68428cbd9d Update README to reflect modern Asterisk features and requirements
Add note in UPGRADE.txt about compiler requirements
Add note to CODING-GUIDELINES about new policy for CLI command structure


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5335 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-01 04:38:12 +00:00
anthm c488473cf0 Modify code example suggestion
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4844 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-19 02:34:59 +00:00
markster 23ed5b2332 Additional coding guidelines (bug #3374)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4840 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-18 23:35:30 +00:00
markster 9bf25014a8 Provide "ident" command line (at least the start of one)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4185 f38db490-d61c-443f-a65b-d21fe96a405b
2004-11-08 02:49:33 +00:00
markster 18d5476e23 Update coding guidelines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3000 f38db490-d61c-443f-a65b-d21fe96a405b
2004-05-18 05:52:52 +00:00
markster 83ced88193 Update coding guidelines, fix "say.c" compile on older compilers, update coding guidelines (includes bug #1631)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2967 f38db490-d61c-443f-a65b-d21fe96a405b
2004-05-15 15:34:31 +00:00