cmdline (merge-intel): add intel licences
[libcmdline.git] / src / lib / cmdline_rdline.h
index f8437a5..fac36ae 100644 (file)
@@ -1,3 +1,37 @@
+/*-
+ * Copyright (c) <2010>, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in
+ *   the documentation and/or other materials provided with the
+ *   distribution.
+ *
+ * - Neither the name of Intel Corporation nor the names of its
+ *   contributors may be used to endorse or promote products derived
+ *   from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  * Copyright (c) 2009, Olivier MATZ <zer0@droids-corp.org>
  * All rights reserved.
@@ -34,7 +68,7 @@
  * microcontrollers (8 bits). Indeed, we don't use any malloc that is
  * sometimes not implemented (or just not recommended) on such
  * systems.
- * 
+ *
  * Obviously, it does not support as many things as the GNU readline,
  * but at least it supports some interresting features like a kill
  * buffer and a command history.
  * time, even on a monothread program, since it works with callbacks.
  *
  * The lib is designed for a client-side or a server-side use:
- * - server-side: the server receives all data from a socket, including 
- *   control chars, like arrows, tabulations, ... The client is 
+ * - server-side: the server receives all data from a socket, including
+ *   control chars, like arrows, tabulations, ... The client is
  *   very simple, it can be a telnet or a minicom through a serial line.
  * - client-side: the client receives its data through its stdin for
- *   instance. 
+ *   instance.
  */
 
 #include <cmdline_cirbuf.h>
@@ -137,12 +171,12 @@ struct rdline {
  * of your program.
  * \param rdl A pointer to an uninitialized struct rdline
  * \param write_char The function used by the function to write a character
- * \param validate A pointer to the function to execute when the 
+ * \param validate A pointer to the function to execute when the
  *                 user validates the buffer.
- * \param complete A pointer to the function to execute when the 
+ * \param complete A pointer to the function to execute when the
  *                 user completes the buffer.
  */
-void rdline_init(struct rdline *rdl, 
+void rdline_init(struct rdline *rdl,
                 rdline_write_char_t *write_char,
                 rdline_validate_t *validate,
                 rdline_complete_t *complete);
@@ -175,7 +209,7 @@ void rdline_redisplay(struct rdline *rdl);
 
 
 /**
- * append a char to the readline buffer. 
+ * append a char to the readline buffer.
  * Return 1 when the line has been validated.
  * Return 2 when the user asked to complete the buffer.
  * Return -1 if it is not running.