Loading...
Searching...
No Matches
coords.c File Reference

Telling a real fix from the phone's way of saying it has none. More...

#include "wire/coords.h"

Functions

static bool has_digit (const char *s)
 Whether a string carries at least one digit.
bool coords_look_real (const char *lat, const char *lon)
 Whether a pair of coordinates is a place rather than the phone shrugging.

Detailed Description

Telling a real fix from the phone's way of saying it has none.

Function Documentation

◆ has_digit()

bool has_digit ( const char * s)
static

Whether a string carries at least one digit.

A digit is the whole tell, so this walks for one rather than calling strpbrk. The tree has one other caller of that family and it drags a few hundred bytes of libc in behind it.

Parameters
sThe string to check, or NULL.
Returns
Whether it holds a digit.