Displaying 5 results from an estimated 5 matches for "parse_s".
Did you mean:
  parses
  
2000 Jan 26
0
coding volunteers needed for msrpc server-side API conversion
ok, people, i _really_ need help with this.  i estimate that if i work on
this full-time it's going to take about... two weeks.
i have one volunteer for the samr functions.  it's been two days, already,
and i'm only half-way through samr.
that means, nothing else gets done, and samba-tng current cvs is broken
because the _samr_lookup_rids() function goes into an infinite loop on
that
2019 Sep 23
0
Re: [PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...include <inttypes.h>
> +#include <stdlib.h>
>  #include <stdbool.h>
> +#include <stdint.h>
> +#include <inttypes.h>
> +#include <limits.h>
>  #include <string.h>
>  #include <unistd.h>
>  
> @@ -153,6 +156,180 @@ test_nbdkit_parse_size (void)
>    return pass;
>  }
>  
> +static bool
> +test_nbdkit_parse_ints (void)
> +{
> +  bool pass = true;
> +
> +#define PARSE(...) PARSE_(__VA_ARGS__)
> +#define PARSE_(TYPE, FORMAT, TEST, RET, EXPECTED)                        \
> +  do {...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...concern that 32-bit platforms are not tested as frequently.
>>> +++ b/include/nbdkit-common.h
>>> @@ -84,6 +84,28 @@ extern void nbdkit_vdebug (const char *msg, va_list args);
>>>  extern char *nbdkit_absolute_path (const char *path);
>>>  extern int64_t nbdkit_parse_size (const char *str);
>>>  extern int nbdkit_parse_bool (const char *str);
>>> +extern int nbdkit_parse_int (const char *what, const char *str,
>>> +                             int *r);
>>
>> Should we mark 'what' and 'str' as being non-null p...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...sually be a short descriptive string of what you are trying
+to parse, eg:
+
+ if (nbdkit_parse_int ("random seed", argv[1], &seed) == -1)
+   return -1;
+
+might print an error:
+
+ random seed: could not parse number: "lalala"
+
 =head2 Parsing sizes
 
 Use the C<nbdkit_parse_size> utility function to parse human-readable
diff --git a/filters/cache/cache.c b/filters/cache/cache.c
index 14a3c0a..faf6023 100644
--- a/filters/cache/cache.c
+++ b/filters/cache/cache.c
@@ -70,7 +70,7 @@ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
 unsigned blksize;
 enum cache_...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...char *str, uint32_t *r);
> > + int nbdkit_parse_int64_t (const char *what,
> > +                           const char *str, int64_t *r);
> > + int nbdkit_parse_uint64_t (const char *what,
> > +                            const char *str, uint64_t *r);
> > + int nbdkit_parse_ssize_t (const char *what,
> > +                           const char *str, ssize_t *r);
> > + int nbdkit_parse_size_t (const char *what,
> > +                          const char *str, size_t *r);
> 
> [s]size_t is another one that can differ between 32- and 64-bit
> platf...