summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-15 19:52:31 +0100
committerHaru <haru@dotalux.com>2015-12-15 20:21:28 +0100
commit0c4b3b1c57a8e75f1b13456fb60de3a69e680f45 (patch)
tree0b866d1314da19d77f2f67c04d3f86d2b7b11fae /src/map/npc.c
parent7881ebb6cb8f90a3f586c1f7af1543a2c3e1b661 (diff)
downloadhercules-0c4b3b1c57a8e75f1b13456fb60de3a69e680f45.tar.gz
hercules-0c4b3b1c57a8e75f1b13456fb60de3a69e680f45.tar.bz2
hercules-0c4b3b1c57a8e75f1b13456fb60de3a69e680f45.tar.xz
hercules-0c4b3b1c57a8e75f1b13456fb60de3a69e680f45.zip
Added const qualifier to the w1~w4 arguments of npc_parse_shop
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index a70d3798d..1912235b8 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2695,11 +2695,24 @@ const char *npc_parse_warp(const char *w1, const char *w2, const char *w3, const
}
/**
- * Parses a SHOP/CASHSHOP npc
- * @param retval Pointer to the status, used to know whether there was an error or not, if so it will be EXIT_FAILURE
- * @retval Parsing position (currently only '\n')
- **/
-const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+ * Parses a SHOP/CASHSHOP NPC.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_shop(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
//TODO: could be rewritten to NOT need this temp array [ultramage]
// We could use nd->u.shop.shop_item to store directly the items, but this could lead
// to unecessary memory usage by the server, using a temp dynamic array is the