1*3117ece4Schristos /* 2*3117ece4Schristos * Copyright (c) Meta Platforms, Inc. and affiliates. 3*3117ece4Schristos * All rights reserved. 4*3117ece4Schristos * 5*3117ece4Schristos * This source code is licensed under both the BSD-style license (found in the 6*3117ece4Schristos * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7*3117ece4Schristos * in the COPYING file in the root directory of this source tree). 8*3117ece4Schristos * You may select, at your option, one of the above-listed licenses. 9*3117ece4Schristos */ 10*3117ece4Schristos 11*3117ece4Schristos /* lorem ipsum generator */ 12*3117ece4Schristos 13*3117ece4Schristos #include <stddef.h> /* size_t */ 14*3117ece4Schristos 15*3117ece4Schristos /* 16*3117ece4Schristos * LOREM_genBuffer(): 17*3117ece4Schristos * Generate @size bytes of compressible data using lorem ipsum generator 18*3117ece4Schristos * into provided @buffer. 19*3117ece4Schristos */ 20*3117ece4Schristos void LOREM_genBuffer(void* buffer, size_t size, unsigned seed); 21*3117ece4Schristos 22*3117ece4Schristos /* 23*3117ece4Schristos * LOREM_genBlock(): 24*3117ece4Schristos * Similar to LOREM_genBuffer, with additional controls : 25*3117ece4Schristos * - @first : generate the first sentence 26*3117ece4Schristos * - @fill : fill the entire @buffer, 27*3117ece4Schristos * if ==0: generate one paragraph at most. 28*3117ece4Schristos * @return : nb of bytes generated into @buffer. 29*3117ece4Schristos */ 30*3117ece4Schristos size_t LOREM_genBlock(void* buffer, size_t size, 31*3117ece4Schristos unsigned seed, 32*3117ece4Schristos int first, int fill); 33