summaryrefslogtreecommitdiff
path: root/src/str.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright statements for 2013.Michael Jennings2013-03-221-1/+1
|
* Remove RCS keyword strings; Git doesn't support them.Michael Jennings2013-03-221-2/+0
|
* Updated the autotools stuff some. Bumped version to 0.8.Michael Jennings2013-03-051-8/+16
| | | | | | | | | | Reformatted some macros in libast.h. Fixed the sprintf() methods of the str, ustr, and mbuff classes. Added check for compiler support of compound statement expressions. Fixed a spec file bug.
* Revert and re-apply badnull patchLucas De Marchi2010-08-261-2/+1
| | | | | | | | | | | Revert previous patch generated by badnull.cocci script, and apply the new one. The main difference is that assert and assert-like functions are not touched anymore. SVN revision: 51650
* Revert coccinelle changes.Michael Jennings2010-08-231-1/+2
| | | | | | | | | | Using !! instead of != NULL results in significantly and unacceptably less readable code, and I refuse to accept those changes. Unfortunately, since they were all done at once, I have to revert the whole thing. Oh well. :( SVN revision: 51583
* Convert (hopefully) all comparisons to NULLLucas De Marchi2010-08-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply badzero.cocci, badnull.coci and badnull2.cocci This should convert all cases where there's a comparison to NULL to simpler forms. This patch applies the following transformations: code before patch ||code after patch =============================================================== return a == NULL; return !a; return a != NULL; return !!a; func(a == NULL); func(!a); func(a != NULL); func(!!a); b = a == NULL; b = !a; b = a != NULL; b = !!a; b = a == NULL ? c : d; b = !a ? c : d; b = a != NULL ? c : d; b = a ? c : d; other cases: a == NULL !a a != NULL a SVN revision: 51487
* Sun Oct 26 15:56:20 2008 Michael Jennings (mej)Michael Jennings2008-10-261-98/+98
| | | | | | | | | | | Remove unnecessary typecasting macros. They were supposed to save typing and improve readability, but I've concluded that they tend to do neither. More cleanups to come; there appear to be some new warnings I need to deal with. ---------------------------------------------------------------------- SVN revision: 37181
* Tue Apr 25 10:19:10 2006 Michael Jennings (mej)Michael Jennings2006-04-251-0/+33
| | | | | | | | | | Added sprintf() routines for string classes. Began work on UTF-8/Unicode strings. ---------------------------------------------------------------------- SVN revision: 22350
* Thu Apr 20 16:44:39 2006 Michael Jennings (mej)Michael Jennings2006-04-201-1/+1
| | | | | | | | | | | | Added mbuff and ustr to testing routines. Fleshed out ustr class; doesn't do UTF-8 yet though. Fixed array removal code. I have no idea how that was working before. ---------------------------------------------------------------------- SVN revision: 22271
* Tue Dec 14 17:51:20 2004 Michael Jennings (mej)Michael Jennings2004-12-151-17/+59
| | | | | | | | | | | | | | | | | | | More work from my vacation. Turned the string class into both an interface and an implementation, and created a new multipurpose buffer class (untested) for arbitrary text/binary data. (Think "strings with embedded newlines" if that helps.) Now, if someone were so inclined, (s)he could create a LibAST implementation of the "str" interface based on glib strings, or QStrings, or whatever with almost no changes to the code using the libast string API (once the function calls like spif_str_new() are replaced with macro calls like SPIF_STR_NEW()). A UTF-8-based string implementation is forthcoming. ---------------------------------------------------------------------- SVN revision: 12473
* Fri Jul 23 17:36:45 2004 Michael Jennings (mej)Michael Jennings2004-07-231-21/+47
| | | | | | | | Finally we have strict C99 compliance. ---------------------------------------------------------------------- SVN revision: 10995
* Tue Jul 20 18:30:54 2004 Michael Jennings (mej)Michael Jennings2004-07-201-1/+1
| | | | | | | | Tasty treats! ---------------------------------------------------------------------- SVN revision: 10948
* Wed Mar 10 17:15:14 2004 Michael Jennings (mej)Michael Jennings2004-03-101-0/+75
| | | | | | | | | Working map implementation using the linked_list class. Added some new string functions. SVN revision: 9316
* Tue Feb 3 18:18:32 2004 Michael Jennings (mej)Michael Jennings2004-02-031-21/+39
| | | | | | | Cleanups are done. Almost done with the NULL handling for lists too. SVN revision: 8790
* Mon Feb 2 17:22:42 2004 Michael Jennings (mej)Michael Jennings2004-02-021-237/+253
| | | | | | | More cleanups. And yes, I know "make test" doesn't work. SVN revision: 8772
* Sat Jan 10 16:12:42 2004 Michael Jennings (mej)Michael Jennings2004-01-101-2/+1
| | | | | | | | | Step #1: Update copyright statements. Step #2: ??? Step #3: Profit. SVN revision: 8333
* Fri Dec 12 22:01:42 2003 Michael Jennings (mej)Michael Jennings2003-12-131-4/+27
| | | | | | | Finished up namespace cleanups. SVN revision: 8107
* Thu Nov 27 00:22:16 2003 Michael Jennings (mej)Michael Jennings2003-11-271-1/+1
| | | | | | | More namespace cleaning. Just one more set to go. SVN revision: 7956
* Wed Nov 26 17:18:20 2003 Michael Jennings (mej)Michael Jennings2003-11-261-1/+1
| | | | | | | | | Added sysdefs.h so that client programs who don't employ some/all of the AST_* m4 macros can still get all the #define's they need for the auto* stuff. SVN revision: 7951
* Mon Nov 10 14:28:09 2003 Michael Jennings (mej)Michael Jennings2003-11-101-17/+70
| | | | | | | | | | | | Added assertions/requirements for string member functions. Changed pointer printouts to %010p instead of %8p, since the latter didn't account for the possibility of a leading "0x". Fixed typos in hex_dump(). SVN revision: 7860
* Fri Oct 31 15:21:53 2003 Michael Jennings (mej)Michael Jennings2003-10-311-11/+39
| | | | | | | | | | | | Fixes to string class find/splice routines. Added SPIF_DEFINE_PROPERTY_FUNC_NONOBJ() macro for defining get/set methods of a property which is not an object. It should be used in place of SPIF_DEFINE_PROPERTY_FUNC() for spif_*_t types that are not objects, such as spif_int32_t and spif_sockport_t. SVN revision: 7774
* Thu Oct 30 18:12:35 2003 Michael Jennings (mej)Michael Jennings2003-10-301-87/+44
| | | | | | | | | | Added support for object "properties." A property is a member variable with corresponding get/set methods. I'll probably flesh this out more as I use it more. SVN revision: 7769
* Thu Jul 3 23:37:45 2003 Michael Jennings (mej)Michael Jennings2003-07-041-1/+1
| | | | | | | Forgot to fix these before committing. :( SVN revision: 7111
* Tue Apr 8 17:14:32 2003 Michael Jennings (mej)Michael Jennings2003-04-081-6/+6
| | | | | | | | Finished documenting libast_internal.h. Also some 64-bit cleanliness fixes. SVN revision: 6838
* Wed Feb 19 16:09:32 2003 Michael Jennings (mej)Michael Jennings2003-02-191-1/+1
| | | | | | | Updated copyright statements for 2003. SVN revision: 6697
* Wed Jul 31 17:49:17 2002 Michael Jennings (mej)Michael Jennings2002-07-311-2/+35
| | | | | | | | | | | | | Added the _reverse() and _to_array() routines to all 3 list classes (finally). Also added unit tests for those. The tests for the socket code no longer download my home page. Now, I create a listening socket and a sending socket for a TCP/IP and a UNIX socket. Then I send/receive data across the socket and compare what I received with what I sent. Self-contained is better. :-) SVN revision: 6353
* Tue Jul 30 17:34:38 2002 Michael Jennings (mej)Michael Jennings2002-07-301-3/+7
| | | | | | | | | | | Send/receive on the socket works now. Also cleaned up the show method for strings to eliminate the 4K length limit. The current socket test will actually download the HTML for my home page. Uncomment the SPIF_SHOW() call in test_socket() to see it work. SVN revision: 6351
* Fri Jul 26 00:12:25 2002 Michael Jennings (mej)Michael Jennings2002-07-261-1/+1
| | | | | | | Mmmm, sockets that connect. :) SVN revision: 6346
* Wed May 22 00:16:31 2002 Michael Jennings (mej)Michael Jennings2002-05-221-4/+5
| | | | | | | | Brought the performance tests up to date and cleaned up some memory leaks in them. SVN revision: 6266
* Tue May 21 00:15:37 2002 Michael Jennings (mej)Michael Jennings2002-05-211-9/+13
| | | | | | | | | | | Fixed a number of memory leaks in both the testing code and the object classes themselves. Also rearranged some header stuff and created a few new helper macros for object declarations. SVN revision: 6265
* Wed May 1 23:21:23 2002 Michael Jennings (mej)Michael Jennings2002-05-021-0/+2
| | | | | | | Fleshed out the URL class. SVN revision: 6198
* Fri Apr 19 18:35:21 2002 Michael Jennings (mej)Michael Jennings2002-04-191-2/+27
| | | | | | | | | Working tokenizer. The question is, how much do I need to add in the way of flexibility.... Shell-style parsing? Null-field support? *ponders* SVN revision: 6157
* Thu Apr 11 18:15:11 2002 Michael Jennings (mej)Michael Jennings2002-04-111-0/+2
| | | | | | | Fix "make distcheck" SVN revision: 6128
* Thu Apr 11 18:03:46 2002 Michael Jennings (mej)Michael Jennings2002-04-111-7/+25
| | | | | | | | The list interface is complete (for now) as is its first implementation: the linked_list class. Unit tests are also in. SVN revision: 6127
* Thu Apr 4 22:24:36 2002 Michael Jennings (mej)Michael Jennings2002-04-051-6/+12
| | | | | | | Oops... SVN revision: 6107
* Thu Apr 4 21:13:01 2002 Michael Jennings (mej)Michael Jennings2002-04-051-34/+27
| | | | | | | Re-indenting code. SVN revision: 6106
* Thu Apr 4 20:45:30 2002 Michael Jennings (mej)Michael Jennings2002-04-051-212/+233
| | | | | | | | | | | Lots of updates. This should compile, but if it doesn't, don't blame me. (Well, blame me, just don't whine at me.) :-) Also a bit of a design doc here...hopefully it will clarify some things. SVN revision: 6105
* Mon Feb 18 21:54:25 2002 Michael Jennings (mej)Michael Jennings2002-02-191-36/+66
| | | | | | | Mmmmm...reusability. :-) SVN revision: 5955
* Sun Feb 17 12:10:59 2002 Michael Jennings (mej)Michael Jennings2002-02-171-3/+356
| | | | | | | | Hopefully now this will make more sense. The string class is now fleshed out...along with a complete set of unit tests. :) SVN revision: 5945
* Tue Feb 12 10:40:37 2002 Michael Jennings (mej)Michael Jennings2002-02-121-1/+16
| | | | | | | Still not fleshed out, but at least the warnings are gone. :-) SVN revision: 5925
* Tue Feb 12 00:03:12 2002 Michael Jennings (mej)Michael Jennings2002-02-121-0/+53
Please ignore the warnings during compile. I didn't want to check this in just yet, but I kinda broke Eterm and committed it. :( SVN revision: 5919