+
+memcached_return memcached_increment_with_initial(memcached_st *ptr,
+ const char *key,
+ size_t key_length,
+ uint64_t offset,
+ uint64_t initial,
+ time_t expiration,
+ uint64_t *value)
+{
+ memcached_return rc= memcached_validate_key_length(key_length, ptr->flags & MEM_BINARY_PROTOCOL);
+ unlikely (rc != MEMCACHED_SUCCESS)
+ return rc;
+
+ LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START();
+ if (ptr->flags & MEM_BINARY_PROTOCOL)
+ rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_INCREMENT, key,
+ key_length, offset, initial, expiration, value);
+ else
+ rc= MEMCACHED_PROTOCOL_ERROR;
+
+ LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END();
+
+ return rc;
+}
+
+memcached_return memcached_decrement_with_initial(memcached_st *ptr,
+ const char *key,
+ size_t key_length,
+ uint64_t offset,
+ uint64_t initial,
+ time_t expiration,
+ uint64_t *value)
+{
+ memcached_return rc= memcached_validate_key_length(key_length, ptr->flags & MEM_BINARY_PROTOCOL);
+ unlikely (rc != MEMCACHED_SUCCESS)
+ return rc;
+
+ LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_START();
+ if (ptr->flags & MEM_BINARY_PROTOCOL)
+ rc= binary_incr_decr(ptr, PROTOCOL_BINARY_CMD_DECREMENT, key,
+ key_length, offset, initial, expiration, value);
+ else
+ rc= MEMCACHED_PROTOCOL_ERROR;
+
+ LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_END();
+
+ return rc;
+}