void dongle_potgo (uae_u16 val) { if (!currprefs.dongle) return; switch (currprefs.dongle) { case ITALY90: case LOGISTIX: case DAMESGRANDMAITRE: flag = (uaerand () & 7) - 3; break; } }
static int load (struct CapsTrackInfoT2 *ci, int drv, int track, bool seed) { int flags; flags = caps_flags; if (canseed) { ci->type = 2; if (seed) { flags |= DI_LOCK_SETWSEED; ci->wseed = uaerand (); } } else { ci->type = 1; } if (pCAPSLockTrack ((PCAPSTRACKINFO)ci, caps_cont[drv], track / 2, track & 1, flags) != imgeOk) return 0; return 1; }
char *fsdb_create_unique_nname (a_inode *base, const char *suggestion) { char tmp[256] = "__uae___"; strncat (tmp, suggestion, 240); for (;;) { int i; char *p = build_nname (base->nname, tmp); if (access (p, R_OK) < 0 && errno == ENOENT) { printf ("unique name: %s\n", p); return p; } free (p); /* tmpnam isn't reentrant and I don't really want to hack configure * right now to see whether tmpnam_r is available... */ for (i = 0; i < 8; i++) { tmp[i] = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[uaerand() % 63]; } } }
int amiga_get_rand_checksum() { return uaerand() & 0x00ffffff; }