OSSP CVS Repository

ossp - Difference in ossp-pkg/rc/rc_sect.c versions 1.11 and 1.12
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/rc/rc_sect.c 1.11 -> 1.12

--- rc_sect.c    2003/05/27 13:14:08     1.11
+++ rc_sect.c    2003/06/11 16:18:48     1.12
@@ -115,6 +115,26 @@
     return(0); /* Not reached */
 }
 
+const char *sectionGetname(rc_section_t *pSec)
+{ /* Name of section, used for display during verbose */
+    if (pSec)
+        return(pSec->m_szName);
+    else
+        RC_THROW(RC_ERR_USE);
+
+    return(0); /* Not reached */
+}
+
+const char *sectionGetlabel(rc_section_t *pSec)
+{ /* Rc label, used for display during verbose */
+    if (pSec)
+        return(pSec->m_szLabel);
+    else
+        RC_THROW(RC_ERR_USE);
+
+    return(0); /* Not reached */
+}
+
 const char *sectionGetlogin(rc_section_t *pSec)
 { /* User name of section, used for display during print */
     if (pSec)
@@ -166,6 +186,28 @@
         return(RC_THROW(RC_OK));
     }
 
+    return(RC_THROW(RC_ERR_USE));
+}
+
+rc_return_t sectionSetname(rc_section_t *pSec, const char *szName)
+{ /* Name of section, used for display during verbose */
+    if (pSec) {
+        pSec->m_szName = malloc((strlen(szName) + 1) * sizeof (char));
+        strcpy(pSec->m_szName, szName);
+        return(RC_THROW(RC_OK));
+    }
+
+    return(RC_THROW(RC_ERR_USE));
+}
+
+rc_return_t sectionSetlabel(rc_section_t *pSec, const char *szLabel)
+{ /* Rc label, used for display during verbose */
+    if (pSec) {
+        pSec->m_szLabel = malloc((strlen(szLabel) + 1) * sizeof (char));
+        strcpy(pSec->m_szLabel, szLabel);
+        return(RC_THROW(RC_OK));
+    }
+
     return(RC_THROW(RC_ERR_USE));
 }
 

CVSTrac 2.0.1